MathGroup Archive 1996

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

Search the Archive

Re: Combinatorics question

  • Subject: [mg3321] Re: Combinatorics question
  • From: jorma.virtamo at vtt.fi (Jorma Virtamo)
  • Date: 26 Feb 1996 07:07:46 -0600
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon at wri.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



  • Prev by Date: Re: Combinatorics question
  • Next by Date: Job Opportunities
  • Previous by thread: Re: Combinatorics question
  • Next by thread: Re: Combinatorics question