This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Structure Manipulation  /
Permutations

  • Permutations[ list ] generates a list of all possible permutations of the elements in list.
  • Example: Permutations[ a,b,c ].
  • There are permutations of a list of distinct elements.
  • Repeated elements are treated as identical.
  • The object list need not have head List.
  • See the Mathematica book: Section 1.8.13.
  • See also: Sort, Signature, Reverse, RotateLeft.
  • Related package: DiscreteMath`Permutations`, DiscreteMath`Combinatorica`.

    Further Examples

    Here are all the 24 permutations on 4 letters.

    In[1]:=

    Out[1]=