-Dhyanesh
On 3/8/06, Karthik Singaram L <[EMAIL PROTECTED]> wrote:
This is the problem of dividing a set into two such that the sum of their differences is minimum.This can be solved using dynamic programming as follows:algo:1. Create an array of size L say Arr[L] and initialize to zeroes2. Put Arr[0]=13. For each program PiScan the array Arr from the right and if Arr[j]=1 then set Arr[j+Li]=14. From the right choose the first j such that Arr[j]=1 that will be the Length in S1 and the remaining will be Length in S2
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---