Math 157: Intro to Mathematical Software
UC San Diego, fall 2018
Created by Zhen Duan on December 5th.
December 6, 2018: Permutation groups in Sage
In this lecture, we are going to discuss permutation groups. We will learn about its basic concepts, and its expressive method and usage in Sage.
Permutations
Before we discuss permutation groups, let's make sure we are clear about permutations. A permutation of a set is a bijection function from this set to this set.
Examples:
Let be a set, where So, a permutation of set would be: We can see that a permutation is a function or a relation from set to itself. Let be a permutation of Then, we can denote as:
Let be a set, where A permutation of is: This permutation would be denoted as
Permutations in Sage:
Sage uses “disjoint cycle notation” for permutations. Composition occurs left to right, which is not what you might expect and is exactly the reverse of what Judson and many others use. (There are good reasons to support either direction, you just need to be certain you know which one is in play.) There are two ways to write the permutation :
As a text string (include quotes):
"(1,2,3) (4,5,6)"
As a Python list of “tuples”:
[(1,2,3), (4,5,6)]
(see details at Sage Documentation v8.4)
In Sage, we use command SymmetricGroup(n)
to build symmetric group of all possible permutations of to .
Also, we can do multiplication of permutation in Sage
We will get the same permutation if it's multipled by identity.
Also, we have sign
as one of attributes of permutatin, where
even permutations have sign of 1
odd permutations have sign of -1
The order of a permutation is the smallest number such that equals the identity permutation.
This line of code shows that the order of is , which means is equal to the identity, , and is the smallest number that satisfies this equation. We can use permutation multiplication to verify it.
Here we go! The third power of is , which is the identity!
Permutation Groups
In mathematics, a permutation group is a group whose elements are permutations of a given set and whose group operation is the composition of permutations in . The group of all permutations of a set is the symmetric group of , often written as . The term permutation group thus means a subgroup of the symmetric group. If then, , the symmetric group on letters is usually denoted by . (from wikipedia permutation group)
Creating Groups
Following are some popular permutation groups, and commands to build them in Sage.
SymmetricGroup(n)
: All permutations on symbols.DihedralGroup(n)
: Symmetries of an . Rotations and flips, in total.CyclicPermutationGroup(n)
: Rotations of an (no flips), in total.AlternatingGroup(n)
: Alternating group on symbols having elements.KleinFourGroup()
: The non-cyclic group of order .
Abelian
An Abelian group, also known as commutative group, is a group that satisfies the operation on its elements but not depend on the order of element as operands. In sage, we can use a simple command is_ablelian()
to check if a group is a Abeliam group.
We can briefly check this.