Cycles from Permutations

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

A permutation is a list in which each element occurs only once. If the members of the permutation have values , where is the length of the permutation, then you can think of a permutation as an "onto" ("surjective") function of the set to itself. If you successively apply this function to any member of the set, you obtain its "cycle" or "orbit". This Demonstration shows how you can write a permutation as a list of these cycles and how these cycles can be visualized as a graph.

Contributed by: Seth J. Chandler (March 2011)
Open content licensed under CC BY-NC-SA


Snapshots


Details

This Demonstration uses its own code and the Sow/Reap construct as well as NestWhile to find the cycles of a permutation. The Combinatorica package contains alternative code for finding cycles that has a more "procedural" style.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send