9464

Random Permutations of a Given Length

Generate random permutations on letters that have a "length" within a fixed range. The space of all permutations on letters is stratified by the degree to which a given permutation mixes up the letters. This Demonstration shows how to generate permutations of a given length using essentially Gaussian copula. The parameter determines the degree of disorder, with being total disorder, signifying no disorder, and indicating reversal of order. The red dots are a graph of the points for the given permutation chosen. The gold line is the permutation length scaled by the number of samples. You can change the number of samples or look at many samples with similar permutation lengths by changing the new random case slider. Notice that scrolling through new cases with a given produces almost no variation in permutation length though many different permutations.

THINGS TO TRY

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

DETAILS

Permutation length for a permutation on the set is defined as the cardinality of the set of all such that if . The greater the permutation length, the more disordered the permutation. The question is how to generate random permutations of similar lengths. We accomplish this using samples from a bivariate normal with correlation and then sorting the resultant pairs by their first element and measure of disorder. The resulting pairs give the permutation . The maximal permutation, ranked by length, is the permutation that takes to . This has a length of and is the longest permutation possible. The height of the gold line in the graph is the permutation length of the given displayed permutation divided by the length of the maximal permutation multiplied by the number of samples. That is, if is permutation length and is the maximal permutation, then the height of the gold bar is .
    • 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 »

Files require Wolfram CDF Player or Mathematica.









 
RELATED RESOURCES
Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Powered by Wolfram Mathematica © 2014 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+