Permutation Products

Richard Ambler / December 2019

Welcome to Permutation Products, a little demo of the trotter library.

Lots of alphabet permutations!

There are permutations of the letters of the alphabet! If we were to list all the permutations according to the Steinhaus-Johnson-Trotter ordering, the first and last ten permutations would be:


    

(And if we were to list them all, the above list - with each line taking up one centimeter, say - would span lightyears!)

If we were to store these permutations in a list such that each permutation took up only one bit of memory, the list would take up exabytes! If we needed to find a particular permutation in the list, and each check took only 10-12 seconds, a brute force search could take up to millennia!

However, we can use properties of the arrangement to create pseudo-lists that ostensibly store the permutations using an insignificant amount of memory, and that can look up permutations fairly instantaneously.

As a demonstration of this, use the text input fields below to input permutations P and Q in cyclic notation. (For example, we could input , which corresponds to .)

As you input P and Q, this page will calculate the composition, or group product, of P and Q, and locate each of the three permutations in the pseudo-list 'containing' all possible permutations.

Have fun!

Permutation P
Permutation Q
Product PQ

Thanks for your interest in trotter. Please see trotter for Dart (used for this demo) and trotter for Python for more information. The code for this demo can be seen here.