MathGroup Archive 1996

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

Search the Archive

Re: Combinatorics question

  • To: mathgroup at
  • Subject: [mg3322] Re: [mg3288] Combinatorics question
  • From: Robert Pratt <rpratt at>
  • Date: Mon, 26 Feb 1996 02:56:20 -0500
  • Sender: owner-wri-mathgroup at

Open the Combinatorica Package.


Then use the command KSubsets.

KSubsets[list, 6]

where list is your list of twenty elements.

KSubsets returns the 38760 combinations in lexicographic order.

Rob Pratt
Department of Mathematics
The University of North Carolina at Chapel Hill
CB# 3250, 331 Phillips Hall
Chapel Hill, NC  27599-3250

rpratt at

On Fri, 23 Feb 1996 PESCC at CUNYVM.CUNY.EDU wrote:

> Can somenone help me find the following:
> I have a list of 20 numbers, and I would like to list all the
> combinations of these numbers taken 6 at a time.  The Binomial
> function tells me there are 38760, but I would like to actually
> see all of them.
> Thanks in advance for your help.


  • Prev by Date: Mathematica on MacOS 7.52
  • Next by Date: Mathematica on MacOS 7.52
  • Previous by thread: Re: Combinatorics question
  • Next by thread: Re: Combinatorics question