Re: [algogeeks] Knapsack problem

2010-10-30 Thread mo...@ismu
@rashmi u missed p7 i took it as 2 -- 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

Re: [algogeeks] Knapsack problem

2010-10-30 Thread mo...@ismu
by greedy method : always try to fill the knapsack with job havin highest p/w ratio at each time p/w={ 5 ,1.66 ,3 , 1 ,18 , .75 ,2 } sort objects according to their p/w ratio {18 ,10 , 15. 2, 5, 7, 3 }

[algogeeks] Knapsack problem

2010-10-30 Thread Rashmi Shrivastava
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,p2...p7)=(10,5,15,7,18,3) and (W1,W2,..W7)=(2,3,5,7,1,4,1)? Thanx in advance. -- You received this message because you are subscribed to the Go

[algogeeks] knapsack

2010-06-21 Thread ANUJ KUMAR
How can i maintain the list of objects selected in the knapsack problem. -- 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

Re: [algogeeks] Knapsack - 0-1 - Brute force

2010-06-08 Thread Varun Nagpal
Why do you want to try a brute force approach, when you have some better algorithms and heuristics available? On Mon, Jun 7, 2010 at 10:07 PM, Jean Carlo Mendes wrote: > Hello Guys > > > > Anyone have a implementation of knapsack 0-1 using brute force approach ? > > Or… Do you have some link wit

[algogeeks] Knapsack - 0-1 - Brute force

2010-06-07 Thread Jean Carlo Mendes
Hello Guys Anyone have a implementation of knapsack 0-1 using brute force approach ? Or. Do you have some link with a sample in C language? Thanks jean -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send e

[algogeeks] Knapsack problem

2007-11-06 Thread Pala
Hi, I'm trying to implement an unbounded knapsack problem. It works just fine, in it's classic form (need to find the maximum benefit by taking total weights < capacity of knapsack). However I need it a little bit changed -- I need to find the minimum benefit instead of maximum. If I try just t

[algogeeks] Knapsack Problem Solved Row-by-Row

2007-04-26 Thread Bootlegger
If I have the following dynamic programming psudo-code for the Knapsack problem: for w = 0 to W do V[0][w] = 0 for w = 0 to W do begin for k = 1 to n do begin if (w < w(k)) then V[k][w] = V[k - 1][w] else V[k][w] = max(V[k - 1][w],V[k -

[algogeeks] knapsack problem with dynamic capacity

2005-12-01 Thread [EMAIL PROTECTED]
Hello. Does here anybody know an example of a knapsack problem, where the capacity of the knapsack is dynamic? What i mean is, that the capacity is calculated over some attributes of the items which are already in the knapsack. Regards, Alex