Permutations

Permutations[list]
generates a list of all possible permutations of the elements in list.

Permutations[list,n]
gives all permutations containing at most n elements.

Permutations[list,{n}]
gives all permutations containing exactly n elements.

DetailsDetails

  • There are n! permutations of a list of n distinct elements.
  • Repeated elements are treated as identical.  »
  • The object list need not have head List.
  • Permutations[list] is effectively equivalent to Permutations[list,{Length[list]}].
  • Permutations[list,{nmin,nmax}] gives permutations of between and elements.
Introduced in 1988
(1.0)
| Updated in 2007
(6.0)