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

MathGroup Archive 2007

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

Search the Archive

Re: Combination List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77912] Re: Combination List
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Tue, 19 Jun 2007 06:48:26 -0400 (EDT)

On 6/18/07 at 7:09 AM, BC at gmail.com (Bruno Campanini) wrote:

>I know combinations of 4 elements taken 3 by 3 is 4, that is
>Binomial[4,3] = 4 How can I get the list:

>1 2 3 1 2 4
>1 3 4
>1 4 2

>The same way I get permuations list from Permutations[{...}] ???

The last line above should be 2 3 4 for the set of combinations
of 3 of 4 items rather than what you have posted. One way (not
necessarily the most computationally efficient) would be

In[5]:= Union[Sort /@ Permutations[Range[4], {3}]]

Out[5]= {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}}
--
To reply via email subtract one hundred and four


  • Prev by Date: Re:QuestionUsenet
  • Next by Date: Re: Combination List
  • Previous by thread: Re: Combination List
  • Next by thread: Re: Combination List