I told you the spirit is greedy backed up by DP for creating correct optimal substructures....A pure greedy solution wont create the right substructure...
On Thu, Aug 4, 2011 at 9:06 PM, Amol Sharma <[email protected]> wrote: > original knapsack is called fractional knapsack in which greedy works...but > we were talking abt 0-1 knapsack :P > > -- > > > Amol Sharma > Third Year Student > Computer Science and Engineering > MNNIT Allahabad > > > > > On Thu, Aug 4, 2011 at 8:19 PM, Gaurav Menghani <[email protected] > > wrote: > >> >> >> On Thu, Aug 4, 2011 at 8:13 PM, saurabh singh <[email protected]>wrote: >> >>> think its NP complete once the number of teams become varaible,,,,, >>> corrct me if wrong i am weak with the theoritical stuffs... >>> >> >> Err, it is NP-complete, the thing is when the set of integers is small, a >> DP solution runs in reasonable time. When you increase the set size, the >> time taken increases. >> >> -- >> Gaurav Menghani >> Stony Brook University >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Saurabh Singh B.Tech (Computer Science) MNNIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
