In [1]:

```
import racg_algorithms as r
```

We create three graphs. The "square" graph is a 4-cycle. The "pentagon_amalg_square" graph is a 5-cycle glued to a 4-cycle along one vertex. While, "G" corresponds to a thick RACG.

In [2]:

```
square = r.Graph(4)
square.set_edges([(0,2),(0,3),(1,2),(1,3)])
pentagon_amalg_square = r.Graph(8)
pentagon_amalg_square.set_edges([(0,1),(1,2),(2,3),(3,4),(4,0),(0,5),(0,6),(6,7),(5,7)])
G = r.Graph(9)
G.set_edges([(0,2),(0,3),(0,8),(0,4),(1,2),(1,3),(1,8),(1,4),(2,5),(3,5),(4,6),(4,7),(5,6),(5,7),(6,7)])
```

Edges of a graph object are encoded by an adjacency list.

In [3]:

```
G.edges
```

Out[3]:

The group_summary function summarizes what can be computed regarding the divergence, thickness and hypergraph index of the RACG associated to a graph.

In [4]:

```
r.group_summary(square)
```

Out[4]:

In [5]:

```
r.group_summary(pentagon_amalg_square)
```

Out[5]:

In [6]:

```
r.group_summary(G)
```

Out[6]:

We get further information on the group's divergence by finding the rank n pairs. get_rank_n_pairsreturns a list of lists, ranked_n_pairs. The pairs of vertices in ranked_pairs[i] are the rank i pairs. ranked_pairs[0] is the set of all pairs of non-adjacent vertices

In [7]:

```
rank_n_pairs = r.get_rank_n_pairs(G)
len(rank_n_pairs)
```

Out[7]:

From below, we know that the bi-infinite geodesic, ...060606... in the RACG corresponding to G has at least cubic divergence (actually by above we know the divergence is exactly cubic).

In [8]:

```
rank_n_pairs[2]
```

Out[8]:

We may also just compute the hypergraph index:

In [9]:

```
r.get_hyp_index(G)
```

Out[9]: