Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*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 1998

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

Search the Archive

Re: The Power Set

  • To: mathgroup at smc.vnet.net
  • Subject: [mg12847] Re: [mg12819] The Power Set
  • From: BobHanlon at aol.com
  • Date: Wed, 17 Jun 1998 00:27:51 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Jasvinder,

Needs["DiscreteMath`Combinatorica`"]

ColumnForm[Sort[Subsets[{x1, x2, x3, x4}]]]

Bob Hanlon

In a message dated 6/12/98 8:02:06 AM, jsk97r at ecs.soton.ac.uk wrote:

>Since I am new to Mathematica, I apologise if this question is trivial!!
>I am trying to list all the subsets of a set of variables, ie
>
>I have a set X containing 4 variables X1, X2, X3 and X4 - so what I want
>to do is list all the subsets, so for this case it would be:
>
>X1
>X2
>X3
>X4
>X1,X2
>X1,X3
>X1,X4
>X2,X3
>X2,X4
>X3,X4
>X1,X2,X3
>X1,X2,X4
>X1,X3,X4
>X2,X3,X4
>X1,X2,X3,X4
>
>The problem is as the set becomes larger, there are 2^n possible
>subsets, as such I would like to know if there is a quick way of
>displaying this information in this format.


  • Prev by Date: Re: Split in Mathematica 2.2
  • Next by Date: help need--printout setting problem.
  • Previous by thread: The Power Set
  • Next by thread: Simplify Trig expressions