Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Fwd: List manipulation

  • To: mathgroup at
  • Subject: [mg7428] Fwd: [mg7390] List manipulation
  • From: BobHanlon at
  • Date: Sat, 31 May 1997 15:08:05 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

The function that you want is KSubsets within the standard package 


data1 = Range[4];  data2 = Range[8];

KSubsets[data1, 3]


Length[KSubsets[data2, 4]]


Bob Hanlon
Forwarded message:
From:	nandgopa at (V. Nandagopal)
To: mathgroup at
To:	mathgroup at


	I have a list X={1,2,3,4,5,6,7,8}. How do I get a list of the
folllowing kind:

	S={{1,2,3,4}, {1,2,3,5}, {1,2,3,6}, .....}. 

S will have 8-choose-2 = 70 elements. Each element of S should have length

	Is there any function which does such list making? Something of
the form 

	?????[list, n]

	Thanks in advance.

	V. Nandagopal
	School of Mathematics
	Tata Institute of Fundamental Research
	Colaba, Bombay 400 005, India

	e-mail: nandgopa at

  • Prev by Date: Re: How to output matrix to file
  • Next by Date: Re: variable declarations in mathematica?
  • Previous by thread: List manipulation
  • Next by thread: Re: List manipulation