hi i recently came across this problem.. there are K sets each sets can contain n numbers from 0 to n we've to choose exactly one number from each set the sum of all the elements that we chose should be equal to P. we have to find how many such possibilities are there to choose so..
for example assume there are 3 sets containing 1,2,3 elements in them so the first set contains 0 and 1 second set contains 0,1 and 2 third set contains 0,1,2 and 3 assume P=2 in this case there are 5 possibilities (0,0,2), (0,1,1), (0,2,0), (1,0,1), (1,1,0) i'm struggling for a DP solution!! help me out -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.