Mathematica 9 is now available
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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3321] Re: Combinatorics question
  • From: Jorma Virtamo <jorma.virtamo at vtt.fi>
  • Date: Mon, 26 Feb 1996 02:56:09 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

<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.

Use the function KSubsets of the standard package DiscreteMath`Combinatorica`:

  <<DiscreteMath`Combinatorica`
  subs = KSubsets[ListOf20Numbers,6];

-- Jorma Virtamo

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jorma Virtamo                      VTT Information Technology
phone: +358 0 456 5612             Telecommunications
fax:   +358 0 455 0115             P.O. Box 1202  
email: jorma.virtamo at vtt.fi        FIN-02044 VTT                        
web:   http://www.vtt.fi/tte/      Finland


==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Changing the default plot size under Mma for Win?
  • Next by Date: Re: Combinatorics question
  • Previous by thread: Re: Combinatorics question
  • Next by thread: Re: Combinatorics question