Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » uniquePermutations
next | previous | forward | backward | up | index | toc

uniquePermutations -- produce all unique permutations of a list

Description

i1 : uniquePermutations {a,b,a,b}

o1 = {{a, b, a, b}, {a, b, b, a}, {a, a, b, b}, {b, a, a, b}, {b, a, b, a},
     ------------------------------------------------------------------------
     {b, b, a, a}}

o1 : List

Ways to use uniquePermutations:

  • uniquePermutations(VisibleList)
  • uniquePermutations(ZZ)

For the programmer

The object uniquePermutations is a method function.


The source of this document is in Macaulay2Doc/functions/permutations-doc.m2:33:0.