Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

knapsack problem

Status
Not open for further replies.

ilanrayn

Programmer
Jul 17, 2004
21
IL
Hi, I have a problem with writting the knapsack in prolog, I just started prolog, can someone help me please???
The input should be
?-knapsack([a-7-9,b-11-14,c-19-24],100,Amount,Profut)
Amount=[10,1,1]
Profit=128

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top