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

### Dicyclic groups

#### Description

The dicyclic groups are non-abelian groups with order 4n. For n = 2 the dicyclic group is isomporphic to the quarternion group Q. Note that every element of this groups can be written uniquely as a^k x^j for 0 < k < 2n and j = 0 or 1.

``` Dic(n) = <a,b | a^{2n} = 1, a^{n} = b^{2}, b^{-1}ab = a^{-1}>
```

(Reference: Coxeter, H. S. M. (1974), "7.1 The Cyclic and Dicyclic groups", Regular Complex Polytopes, Cambridge University)

#### Computation

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

// Number of Dicyclic group (note that  the order is 4N)
MEMORY.N:=5;

Use ZZ/(2)[a,b,c,d];
NC.SetOrdering("LLEX");
Define CreateRelationsDicyclic()
Relations:=[];
// add the relations of the invers elements ac = 1 and bd = 1
Append(Relations, [[a,c],[-1]]);
Append(Relations, [[c,a],[-1]]);
Append(Relations, [[b,d],[-1]]);
Append(Relations, [[d,b],[-1]]);

// add the relation a^{n} = b^2
Append(Relations, [[a^(MEMORY.N)], [-b,b]]);

// add the relation a^{2n} = 1
Append(Relations, [[a^(2*MEMORY.N)], [-1]]);

// add the relation bab^{-1} = a^{-1}
Append(Relations, [[b,a,d],[-c]]);
Return Relations;
EndDefine;

Relations:=CreateRelationsDicyclic();
Relations;
GB:=NC.GB(Relations);
GB;

```

// Second Implementation without invers elements

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

// Number of Dicyclic group (note that  the order is 4N)
MEMORY.N:=5;

Use ZZ/(2)[a,b,c,d];
NC.SetOrdering("LLEX");
Define CreateRelationsDicyclic()
Relations:=[];

// add the relation a^{n} = b^2
Append(Relations, [[a^(MEMORY.N)], [-b,b]]);

// add the relation a^{2n} = 1
Append(Relations, [[a^(2*MEMORY.N)], [-1]]);

// add the relation b^{-1}ab = a^{-1}
Append(Relations, [[b^(3),a,b],[a^(2*MEMORY.N-1)]]);
Return Relations;
EndDefine;
```