i am researcher student. I am searching large data for knapsack problem. I wanted test my algorithm for knapsack problem. But i couldn't find large data. I need data has 1000 item and capacity is no matter. The point is item as much as huge it's good for my algorithm. Is there any huge data available in internet. Does anybody know please guys i need urgent.
You can quite easily generate your own data. Just use a random number generator and generate lots and lots of values. To test that your algorithm gives the correct results, compare it to the results from another known working algorithm.
Hi,
I have the same requirement. Obviously only Brute force will give the optimal answer and that won't work for large problems. However we could pitch our algorithms against each other...
To be clear, my algorithm works for 0-1 problems (i.e. 0 or 1 of each item), Integer or decimal data. I also have a version that works for 2 dimensions (e.g. Volume and Weight vs. Value).
My file reader uses a simple CSV format (Item-name, weight, value):
X229257,9,286 X509192,11,272 X847469,5,184 X457095,4,88 etc ....
If I recall correctly, I've tested mine on 1000 items too.
Regards
Walt
PS I ran my algorithm again the problem on Rosette Code that Mark highlighted (thank you). I got the same result but my solution is much more scaleable than the dynamic programming / LP solutions and will work on much bigger problems
In case anyone else wants a Large data set to test their Knapsack algorithm, I've published some data files and my results, here:
http://homepage.ntlworld.com/walter.barker2/Knapsack%20Problem.htm
I'd love to hear from anyone working on this problem, My email address is on the page.
Walt