10182

# Cycles in Random Sample Permutations

The top left plot represents a random permutation of grays. The top right plot colors the pixels according to the memberships of sampled numbers in the cycles of this sampled permutation. Members of the largest cycle are marked black. The lower plot sorts the pixels according to cycle membership. The red numbers in the grid count the elements in the cycles; the black numbers give these cycles or the first few members of longer cycles.

### DETAILS

As an example, the permutation {1, 3, 2, 5, 6, 4, 8, 9, 7, 11, 12, 13, 14, 15, 16, 10} can be written in terms of cycles as (1)(2, 3)(4, 5, 6)(7, 8, 9)(10, 11, 12, 13, 14, 15, 16).
For these five cycles black pixels mark the positions {10, 11, 12, 13, 14, 15, 16}. Two colors would mark positions corresponding to members of the two length-three cycles (4, 5, 6) and (7, 8, 9). A fourth color is needed to represent the transposition pair (2, 3) and a fifth color marks the singleton cycle (1). Sorting all pixel color values and partitioning gives the matrix: {{1, 1, 1, 1}, {1, 1, 1, 2}, {2, 2, 3, 3}, {3, 4, 4, 5}}.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.