{"id":20448957,"url":"https://github.com/damascenorafael/mcmc-knapsack-problem","last_synced_at":"2025-04-13T01:40:12.515Z","repository":{"id":71854674,"uuid":"135743910","full_name":"DamascenoRafael/mcmc-knapsack-problem","owner":"DamascenoRafael","description":"Python development to solve the 0/1 Knapsack Problem using Markov Chain Monte Carlo techniques, dynamic programming and greedy algorithm.","archived":false,"fork":false,"pushed_at":"2018-07-10T02:24:22.000Z","size":232,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T01:40:00.428Z","etag":null,"topics":["hill-climbing","knapsack","knapsack-problem","markov-chain","mcmc","metropolis-hastings","monte-carlo","random-walk","simulated-annealing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DamascenoRafael.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":"2018-06-01T17:07:27.000Z","updated_at":"2025-04-06T14:23:47.000Z","dependencies_parsed_at":"2023-09-11T20:01:29.164Z","dependency_job_id":null,"html_url":"https://github.com/DamascenoRafael/mcmc-knapsack-problem","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/DamascenoRafael%2Fmcmc-knapsack-problem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamascenoRafael%2Fmcmc-knapsack-problem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamascenoRafael%2Fmcmc-knapsack-problem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamascenoRafael%2Fmcmc-knapsack-problem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DamascenoRafael","download_url":"https://codeload.github.com/DamascenoRafael/mcmc-knapsack-problem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654027,"owners_count":21140236,"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":["hill-climbing","knapsack","knapsack-problem","markov-chain","mcmc","metropolis-hastings","monte-carlo","random-walk","simulated-annealing"],"created_at":"2024-11-15T10:37:51.080Z","updated_at":"2025-04-13T01:40:12.478Z","avatar_url":"https://github.com/DamascenoRafael.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markov Chain Monte Carlo - 0/1 Knapsack Problem\n\nThis repository refers to the final work of the discipline: **Special Topics in Monte Carlo Algorithms and Markov Chains**, PESC / COPPE / UFRJ [CPS767](http://land.ufrj.br/~daniel/mcmc/), taught by Professor [Daniel R. Figueiredo](http://www.land.ufrj.br/~daniel/) during the first semester of 2018.\n\n**Students:**\n\n* [Marcos Aurélio C de S Filho](https://github.com/Maasouza)\n* [Rafael G Damasceno](https://github.com/DamascenoRafael)\n\n\n## About\n\nThe objective of this repository is to establish solutions for the 0/1 Knapsack Problem, that is, each element may or may not be in the solution without repetition. The developed code aims to evaluate the results and performance of different algorithms involving Markov Chains Monte Carlo. The techniques covered involved the algorithms of Random Walk, Metropolis Hastings, Simulated Annealing in different cooling and transition strategies in contrast to the pseudo-polynomial solution algorithm and also the greedy algorithm known as Hill Climbing. In addition, this repository seeks to raise the possible scenarios in which Markov Chain Monte Carlo have an advantage over the deterministic algorithms.\n\n## Running algorithms\n\nAll algorithms are written using [Python 3](https://www.python.org/) and are available in the `src` directory. In the `data` directory you can find some problems that can be executed by the algorithms.\n\nThe different algorithms involving Markov Chains Monte Carlo can be run through the file `src/main.py`, where there are comments explaining how to select the problems, the algorithms and the ways of performance evaluation.\n\nThe greedy solution can be executed through the `src/dynamic-solution.py` file where the problems to be executed can be selected. This solution is feasible only for small instances.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamascenorafael%2Fmcmc-knapsack-problem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamascenorafael%2Fmcmc-knapsack-problem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamascenorafael%2Fmcmc-knapsack-problem/lists"}