Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Subsets

Usage

Subsets[list] gives a list of all possible subsets of list.
Subsets[list, n] gives all subsets containing at most n elements.
Subsets[list, {n}] gives all subsets containing exactly n elements.
Subsets[list, { ,  }] gives all subsets containing between  and  elements.
Subsets[list, nspec, s] gives the first s subsets.
Subsets[list, nspec, {s}] gives the s subset.


Notes

Subsets[list] gives the power set of list.
Subsets[list] orders subsets with shortest first, and later elements in list omitted first.
• If the elements of list are in the order returned by Sort, then the complete result from Subsets[list] will also be in this order.
Subsets[list, All] is equivalent to Subsets[list].
Subsets[list, { ,  , dn}] gives subsets containing  ,  + dn, ... elements.
Subsets[list, nspec, spec] gives the same result as Take[Subsets[list, nspec], spec].
• See Section 1.8.8.
• See also: Tuples, IntegerDigits.
• New in Version 5.1.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: