MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Find combinations in k-subsets

I would like to solve the following problem:

Having k-subsets given in lexicographic order as input:

I would like to determine the possible combinations.

In this case the k-subsets:


correspond to the combination:  [{1, 2, 3, 4, 6}, 3] 

and there are  two remaining k-subsets: {1,2,5} and {1,3,5}

This is more or less the opposite of the function KSubsets[ ].

Is there any function to do this? 
Can you think of an efficient algorithm? 

Thank you for your help

-:- Carlos

  • Prev by Date: Plotting (x,y,z) style data
  • Next by Date: Re: Cut and paste edits mis...
  • Previous by thread: Re: Bad error messages
  • Next by thread: Re: Find combinations in k-subsets