Re: [algogeeks] Re: Knapsack problem

2010-10-30 Thread Rashmi Shrivastava
> > thnx a lot chi n mohan... > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For mo

[algogeeks] Re: Knapsack problem

2010-10-30 Thread Chi
> http://rosettacode.org/wiki/Knapsack_problem/0-1 > http://jhave.org/learner/misc/knapsack/knapsack.shtml On Oct 30, 4:26 pm, Rashmi Shrivastava wrote: > pls any one give me solution of this question with detailed description, > > Find an optimal solution to the Knapsack instance > n=7,m=15,(p1,

[algogeeks] Re: knapsack

2010-06-21 Thread ANUJ KUMAR
i used this code but its giving me segmentation fault. vectorans;//maintains the list of selected objects for(int x=t-1;x>0;x--)//t is the no. of objects { if(knap[x][tt]!=knap[x-1][tt])//tt is the capacity of knapack { ans.push_back(ar[x].index); tt=tt-ar

[algogeeks] Re: knapsack problem with dynamic capacity

2005-12-01 Thread adak
NO! (in a word). The whole restraint in the knapsack problem is that there is NO way to somehow "trim" an item that's just a little too large, down to the ideal size, or to increase the capacity of the knapsack to accomodate the items we'd like it to ideally, hold. It seems to me that if the "kn