Petrea Corneliu Ştefan > CM-Permutation-0.94 > CM::Permutation

CM-Permutation-0.94.tar.gz

Dependencies

Annotate this POD

# CPAN RT

 Open 0
View/Report Bugs
Module Version: 0.94

# DESCRIPTION

Permutations can be viewed as braids but braids are much more general. (if you consider a permutation and apply it to itself it returns to the identical permutation, if you have a braid that's a transposition and apply it to itself you get a double-twist, one more time you get a triple twist and so forth this continues indefinitely).

# NAME

CM::Permutation - Module for manipulating permutations

version 0.94

# DESCRIPTION

The module was written for carrying out permutation operations. This module treats permutations as bijections on finite sets. The module is not written for generating permutations or counting them(to that end you can use Algorithm::Permute or Math::Counting)

At the moment the following are implemented(any feature that is currently listed as implemented has tests proving it):

• permutation composition and conjugate permutations
• inverse of a permutation
• "power" of a permutation
• '==' operator implemented (eq is the same)
• order() method
• even_odd(x) to classify even and odd permutations
• conjugate(x,y) which test if there is a g so that x = g y g^-1
• get_cycles() decomposes permutation into cycles and returns them

# Permutations in relation to braids

There's also a draw() method so if you want to visualize permutations as braids you can.

For example permutation (9,6,4,8,5,3,7,10,1,2) can be representated as a braid like this:

and permutation (6,10,2,9,6,1,7,8,4,5) is like this

Then you can also compute a*b

And also a*b*a^-1

And also [a,b] which is a*b*a^-1*b^-1

# Viewing cycles

Cycles have the following shape (except they can have some fixed points inside them)

[1,2,3,4,5]

or like this

# Some differences between brides and permutations

However, braids are more general than permutations. The twists that are the analog of transpositions(in symmetric groups) for braids have infinite order since you can twist 2 strands as many times you want. Another difference is that for a transposition x we have x = x^-1, but with braids that isn't true since you have the first strand above the second for x and for x^-1 you have the second over the first so you can un-twist the braid using x^-1.

# Transpositions and cycles

To understand better how transpositions and cycles interact let's take a look at the following diagram which shows the effects of multiplying a permutation formed of two cycles with a transposition containing members from each of the cycles:

Let's have an example of this with the cycles [1,2,3,4] , [5,6,7,8] and the transposition [3,7] :

```    ./shell.sh

\$ decomp(cycle(1,2,3,4)*cycle(5,6,7,8))
(2,3,4,1)*(6,7,8,5)
\$ decomp(cycle(1,2,3,4)*cycle(5,6,7,8)*cycle(3,7))
(2,3,8,5,6,7,4,1)```

# ACKNOWLEDGMENTS

Thanks for the colour ramp routine goes to BrowserUk @perlmonks

# AUTHOR

Stefan Petrea, `<stefan.petrea at gmail.com>`