This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
 DiscreteMath`Permutations` A permutation is a rule for rearranging a finite collection of elements. In this package, a permutation on elements is represented by a list containing the first positive integers. If the integer is in the place in the list, this means that the permutation moves the element to the place. Thus, for example, 3,1,2 represents the permutation that moves to , to , and to . Working with permutations. A cyclic permutation or cycle is a permutation in which any element can be moved to any other element by repeated application of the permutation. All permutations are not cycles, but it is a basic fact that any permutation can be decomposed into a product of cycles. This cyclic decomposition is represented as a list containing the cycles as sublists. Cycles are represented differently than permutations. If the integer follows the integer in the sublist representing the cycle, this means that the cycle moves the element to the element. The sublist is treated cyclically so the last element is thought of as being "before" the first. As an example, {{1, 3,2},{5,4}} represents a permutation containing a cycle that sends to , to and to and a cycle that switches and . This loads the package. In[1]:= <