# Difference between revisions of "ApCoCoA-1:Alternating groups"

### Alternating groups

#### Description

The alternating groups is the group of all even permutations of a finite set. Every alternating group is a subgroups of the correspondent symmetric group. A finite representation is given by:

```  A_{n+2} = <x_{1},..x_{n} | x_{i}^{3} = (x_{i}x_{j})^2 = 1 for every i != j>
```

#### Reference

PRESENTATIONS OF FINITE SIMPLE GROUPS: A COMPUTATIONAL APPROACH R. M. GURALNICK, W. M. KANTOR, M. KASSABOV, AND A. LUBOTZKY

#### Computation

``` /*Use the ApCoCoA package ncpoly.*/

// Number of alternating group
MEMORY.N:=3;
Use ZZ/(2)[a[1..MEMORY.N]];
NC.SetOrdering("LLEX");

Define CreateRelationsAlternating()
Relations:=[];

// add the relation a_{i}^{3} = 1
For Index0 := 1 To MEMORY.N Do
Append(Relations,[[a[Index0]^3],[1]]);
EndFor;

// add the relation (a_{i}a_{j})^2 = 1 for every i != j
For Index1 := 1 To MEMORY.N Do
For Index2 := 1 To MEMORY.N Do
If (Index1 <> Index2) Then
Append(Relations,[[a[Index1],a[Index2],a[Index1],a[Index2]],[1]]);
EndIf;
EndFor;
EndFor;
Return Relations;
EndDefine;

Relations:=CreateRelationsAlternating();
Gb:=NC.GB(Relations);
```

#### Examples in Symbolic Data Format

##### Alternating group 3
``` <FREEALGEBRA createdAt="2014-01-20" createdBy="strohmeier">
<vars>a1,a2,a3</vars>
<basis>
<ncpoly>a1^3-1</ncpoly>
<ncpoly>a2^3-1</ncpoly>
<ncpoly>a3^3-1</ncpoly>
<ncpoly>a1*a2*a1*a2-1</ncpoly>
<ncpoly>a1*a3*a1*a3-1</ncpoly>
<ncpoly>a2*a1*a2*a1-1</ncpoly>
<ncpoly>a2*a3*a2*a3-1</ncpoly>
<ncpoly>a3*a1*a3*a1-1</ncpoly>
<ncpoly>a3*a2*a3*a2-1</ncpoly>
</basis>
<Comment>Alternating_group_3</Comment>
</FREEALGEBRA>
```