@Piyush : you are re-posting same problem which you had posted on 5 dec 2011.
check this link :- http://groups.google.com/group/algogeeks/browse_thread/thread/8a58ea05c96f811b/ee74f8a4d7b68561?lnk=gst&q=Maximal+possible+subsets+Algorithm#ee74f8a4d7b68561 On Mon, Jan 9, 2012 at 3:27 AM, Piyush Grover <[email protected]>wrote: > Given a set S, find all the maximal subsets whose sum <= k. For example, > if S = {1, 2, 3, 4, 5} and k = 7 > Output is: {1, 2, 3} {1, 2, 4} {1, 5} {2, 5} {3, 4} > > Hint: > - Output doesn't contain any set which is a subset of other. > - If X = {1, 2, 3} is one of the solution then all the subsets of X {1} > {2} {3} {1, 2} {1, 3} {2, 3} are omitted. > - Lexicographic ordering may be used to solve it > > -- > 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.
