Thanks everybody for wonderful support and special thanks to Vishal raja. . But i was bit apprehensive about your last solution . . i will test it :) and let you know as well . Thanks . . . .
On Thu, Dec 30, 2010 at 11:52 AM, vishal raja <[email protected]> wrote: > But the same solution I've given above can give you the solution for this > problem . > In the formed table of P[i][j] , you can take another variable attached to > it as count[i][j] for how many items we have selected yet. > So you gotta find , the max. value of j which has count = 50. > count[i][j] = count[i-1][j] if P(i-1,j) ==1 > count[i][j] = count[i-1][j-a[i]] if P(i-1,j-a[i]) ==1 > else count[i][j] = 0 > > > > > On Thu, Dec 30, 2010 at 11:42 AM, vishal raja <[email protected]> > wrote: >> >> yeah, My bad. >> Missed that. >> >> On Wed, Dec 29, 2010 at 10:52 PM, Wladimir Tavares <[email protected]> >> wrote: >>> >>> Sum up all the number and divide by 2 >>> >>> Using the algorithm subset problem to find a number close to median >>> >>> >>> Wladimir Araujo Tavares >>> Federal University of Ceará >>> >>> >>> >>> >>> >>> >>> On Wed, Dec 29, 2010 at 2:07 PM, Ankur Khurana <[email protected]> >>> wrote: >>>> >>>> How will you divide and array of approx 100 elements into two sub sets >>>> of 50 each such that the difference between both the subsets is the >>>> minimum possible one . . >>>> >>>> Thanks in advance . >>>> Ankur >>>> >>>> -- >>>> 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. >> > > -- > 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.
