Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: Combinatorics question

  • Subject: [mg3322] Re: [mg3288] Combinatorics question
  • From: rpratt at math.unc.edu (Robert Pratt)
  • Date: 26 Feb 1996 09:05:52 -0600
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon at wri.com

Open the Combinatorica Package.

<<DiscreteMath`Combinatorica`

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 math.unc.edu

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