MathGroup Archive 1996

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

Search the Archive

Re: Combinatorics question

  • Subject: [mg3322] Re: [mg3288] Combinatorics question
  • From: rpratt at (Robert Pratt)
  • Date: 26 Feb 1996 09:05:52 -0600
  • Approved:
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon 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: Re: Combinatorics question
  • Previous by thread: Re: Combinatorics question
  • Next by thread: Re: Combinatorics question