Re: combinations
- To: mathgroup at smc.vnet.net
- Subject: [mg16725] Re: [mg16645] combinations
- From: "Tomas Garza" <tgarza at mail.internet.com.mx>
- Date: Wed, 24 Mar 1999 02:23:44 -0500
- Sender: owner-wri-mathgroup at wolfram.com
R.B. wrote:
> Hi. How can i get a list of combinations for a group of 'm'
> elements taken
> of 'n' in 'n', using mathematica 2.2.
> Thanks
Hola, R.B.
I suppose you mean a "set" of elements, not a "group".
In[1]:=
<< DiscreteMath`Combinatorica`
In[2]:=
KSubsets[{1,2,3,4,5},3]
Out[2]=
{{1,2,3},{1,2,4},{1,2,5},{1,3,4},{1,3,5},{1,4,5},{2,3,4},{2,3,5},{2,4,5},{3,
4,
5}}
Tomas Garza
Mexico City