Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Tuples

Usage

Tuples[list, n] generates a list of all possible  -tuples of elements from list.
Tuples[{ ,  , ... }] generates a list of all possible tuples whose   element is from  .


Notes

• Example: Tuples[ a, b , 2]LongRightArrow .
• The elements of list are treated as distinct, so that Tuples[list, n] for a list of length  gives output of length  .
• The order of elements in Tuples[list, n] is based on the order of elements in list, so that Tuples[{ , ... ,  }, n] gives {{ ,  , ... ,  }, { ,  , ... ,  }, ... , { ,  , ... ,  }}.
Tuples[list, { ,  , ... }] generates a list of all possible  arrays of elements in list.
• The object list need not have head List. The head at each level in the arrays generated by Tuples will be the same as the head of list.
• New in Version 5.1.


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



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