{"id":23726542,"url":"https://github.com/danrpts/min_ukp","last_synced_at":"2025-06-15T20:10:20.755Z","repository":{"id":87527963,"uuid":"84494494","full_name":"danrpts/min_ukp","owner":"danrpts","description":"Generalized solution to Minimization of Unbounded Knapsack Problem.","archived":false,"fork":false,"pushed_at":"2017-10-24T20:51:24.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-31T00:33:40.563Z","etag":null,"topics":["algorithm","dynamic-programming","knapsack","minimization"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danrpts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-09T22:26:08.000Z","updated_at":"2017-10-24T20:49:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"2421a1d0-e31e-4028-bb1c-7459542494ec","html_url":"https://github.com/danrpts/min_ukp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danrpts%2Fmin_ukp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danrpts%2Fmin_ukp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danrpts%2Fmin_ukp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danrpts%2Fmin_ukp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danrpts","download_url":"https://codeload.github.com/danrpts/min_ukp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239824980,"owners_count":19703199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","dynamic-programming","knapsack","minimization"],"created_at":"2024-12-31T00:32:04.567Z","updated_at":"2025-02-20T10:44:19.486Z","avatar_url":"https://github.com/danrpts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Problem\nGiven a set of items each with a weight w_i and cost c_i, add 0 or more of each item to a knapsack such that the total weight of the knapsack is at least some minimum weight W and the total cost C is minimized.\n\n\n## Solution\nLet x be the minimum weight desired for some arbitrary knapsack, and let M[x] be its minimum cost. Using dynamic programming, we define M[x] = min_{i=1}^{n} (c_i + m[x - w_i]). The optimal cost for a knapsack with minimum weight W is then given by M[W]. Using a backtracking algorithm the optimal solution can also be found.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanrpts%2Fmin_ukp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanrpts%2Fmin_ukp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanrpts%2Fmin_ukp/lists"}