This is a simple demonstration of a Monte Carlo Markov chain solution to the famous 0/1 knapsack problem. Monte Carlo Markov Chain Solution for 0/1 Knapsack Problem
This program demonstrates how the Metroplis-Hasting criteria can be used in the context of a Monte Carlo Markov chain in order to solve the 0/1 knapsack problem for an arbitrary knapsack. The function could be easily modified to accomodate any knapsack, but as is a specific knapsack is hardcoded.
----> written by Richard Tromacek, email@example.com. hello <----