Home/Blog/Programming/Visual representation of group axioms
Home/Blog/Programming/Visual representation of group axioms

Visual representation of group axioms

10 min read
Jan 23, 2024

Become a Software Engineer in Months, Not Years

From your first line of code, to your first day on the job — Educative has you covered. Join 2M+ developers learning in-demand programming skills.

Groups are mathematical structures mostly discussed by learners pursuing a degree in mathematics. They are one of the most difficult topics in the undergraduate mathematics degree.

This blog aims to relate it to computer science by discussing axioms in terms familiar to computer science students. This blog will discuss how groups can be represented using an automaton and how its axioms can be understood visually. This visual representation will help in understanding some of the fundamental concepts of group theory, not related to the axioms alone, but also concepts like subgroups, cyclic groups, normal subgroups, etc.

In this blog, we’ll restrict our discussion to the finite groups.

Group axioms#

Let’s start by defining a group. A group is a structure that consists of a set SS of elements and a binary operator ()(*) such that the following four properties hold. These properties are also called the axioms of groups.

  • Closure: If aa and bb are two elements of the set SS, then applying a binary operator on these elements (ab)(a*b) will result in an element that also belongs to the set SS.

  • Associativity: The binary operator is associative, i.e., a(bc)=(ab)ca*(b*c) = (a*b)*c. In simpler words, if we want to perform the calculation abca*b*c, then the order in which we operate the binary operators doesn’t matter because they’ll give the same results.

  • Identity: In the set SS, there’s an identity element ee such that ae=a=eaa*e = a = e*a.

  • Inverse: For every element aa in SS, there’s another element a1a^{-1} in SS such that aa1=a1a=ea * a^{-1} = a^{-1} * a = e.

An example of a group#

Z\mathbb{Z} is the set of integers, Z+\mathbb{Z}^+ is the set of positive integers, and Zn\mathbb{Z}_n is the set containing the first nn non-negative integers, {0,1,2,,n1}\{0, 1, 2, \cdots, n-1\}. Z5={0,1,2,3,4}\mathbb{Z}_5 = \{0, 1, 2, 3, 4\}. Z5\mathbb{Z}_5 is a group under addition modulo 55. This means that the binary operator for this group is defined as follows:

ab=a+b(mod 5)a*b = a+b\hspace{2em} (mod \space 5)

This group can also be represented by the group table, which is shown below.

a*b

b = 0

b = 1

b = 2

b = 3

b = 4

a = 0

0

1

2

3

4

a = 1

1

2

3

4

0

a = 2

2

3

4

0

1

a = 3

3

4

0

1

2

a = 4

4

0

1

2

3

Consider the cell highlighted in green. It represents the result of the binary operator aba*b with the values of a=3a=3 and b=4b=4. The value of 3+43+4 in mod 5mod\space 5 (remainder when divided by 55) is 22.

Now, we’ll briefly discuss automata.

Finite automata#

Finite automata is a mathematical structure consisting of the following:

  • A finite set of states, usually represented by QQ

  • A start state, usually represented by q0q_0, (q0Q)(q_0 \in Q)

  • A set of alphabets, usually represented by Σ\Sigma

  • A transition function, δ:Q×ΣQ\delta: Q \times \Sigma \rightarrow Q

A transition function takes an element from the set of states, QQ, and another element from the set of alphabets, Σ\Sigma. Based on the combination, it produces an output, which is an element from the set of states, QQ.

Consider an example where we want to compute the remainder when the given binary number is divided by 55. There are five possible remainders, so the set of states, Q={0,1,2,3,4}Q = \{0, 1, 2, 3, 4\}. The number is given in binary, which means that the set of alphabets that represents the binary by number at the input, Σ={0,1}\Sigma = \{0, 1\}. In the beginning, we don’t have any number of bits, which corresponds to the number zero. Since the remainder of 00 when divided by 55 is also 0,0, the start state will be 00. The transition function can be represented by the following table. It’s important to note that the focus of this blog is not to discuss the methods to create finite automaton; we just want to represent finite groups using them.

Alphabet = 0

Alphabet = 1

State = 0

0

1

State = 1

2

3

State = 2

4

0

State = 3

1

2

State = 4

3

4

In the table above, consider the cell in green, where state = 33 and alphabet = 11. The state = 33 means that the remainder of the numbers (bits) read so far is 33, and alphabet = 11 means that the next bit has a value of 11. Appending a zero (in binary) at the end is equivalent to multiplication by 22, and appending a 11 instead adds a value of 11 to this figure. This means that if the next bit (alphabet) is one, then the remainder, or the number, gets multiplied by 22, and then we add 11. This means that 3×2+1=73\times2+1=7, and the remainder is 22 when we divide it by 55. This is how we reach the number 22 as the value placed in the cell.

The good thing about this transition function is that it can be represented by state diagrams. The state diagram for this table is given below. All the states are shown in circles, and the alphabets that correspond to the transitions are shown by arrows. The above-mentioned transition starts from state = 33 (shown in green), and on reading the input alphabet 11 (shown in red), goes to the output state 22 (shown in blue). The start state is 00, so there’s an arrow pointing at this state.

canvasAnimation-image

Among the four axioms of group theory, we won’t be discussing the closure property, mainly because this property is apparent from the group table. If all the entries of the group table belong to the set of elements SS, then this property holds. We will be discussing the remaining three axioms in this blog.

Visualizing group axioms#

Now, it’s time to represent the group table using automata. This process is very straightforward. We take the group table and simply use it as a transition table. By doing this, we can visualize groups in the form of state diagrams. Let’s visualize the group that we discussed earlier. There are many overlapping arrows, so we color-coded them, making them distinguishable from each other. It makes the visualizing easy.

Visual representation of a group
Visual representation of a group

Visualizing the identity element#

Now, let’s visualize the axioms one by one, starting from the identity element.

The identity element has two parts.

Visualizing the right identity#

Consider the following:

ae=aa*e=a (This is called right identity because the identity element is on the right-hand side).

In terms of transitions, it means that if we’re at state aa and move on to the transition with the label ee, then we’ll go back to state aa. Let’s focus on this point in the state diagram.

Visualizing the right identity in a state diagram
Visualizing the right identity in a state diagram

We can see that all the identity elements are forming a self-loop over all the states. Given a state diagram of a finite group, this is perhaps the easiest way to figure out the identity element.

Visualizing the left identity#

Consider the following:

ea=ae*a=a (This is called left identity because the identity element is on the left-hand side).

In terms of transitions, it means that if we’re at the state corresponding to the identity element, then following any transition aa will lead us to the state aa. Let’s visualize this in the following snapshot of group automata.

Visualizing the left identity in a state diagram
Visualizing the left identity in a state diagram

If we start from the identity element 00 and follow the transition with a label 33, then we’ll reach the state with the same label 33.

Visualizing inverse#

An inverse generally means the opposite. In addition, adding +5+5 and 5-5 has an inverse effect. They also cancel out the effect of each other. Moreover, the result of (+5)+(5)=0(+5) + (-5)=0, and 00 is the identity element in addition. It’s interesting to note that the inverse mostly occurs in pairs. Here, +5+5 and 5-5 are the inverse of each other.

Similarly, moving 55 steps forward and moving 55 steps backward are the inverse of each other, and their effects cancel out each other. The same is the case in groups. Like the identity element, we can visualize the inverse in two ways.

Visualizing the inverse in relation to the identity element.#

For an inverse, we know that aa1=ea*a^{-1}=e. In automata, this translates to a transition that starts from a state labeled aa, with a transition with a label a1a^{-1}, and leads to the state corresponding to the identity element ee. This means that for inverse, in our case, we need to look at the transitions going to the state with the label 00. Let’s visualize this in the diagram below.

Visual representation of an inverse
Visual representation of an inverse

Here, we can see that the inverse of 22 is 33 because there’s a transition from the state 22 to the identity element 00, and the label of this transition is 33. Similarly, the inverse of 22 is 33. Recall the earlier discussion about inverse pairs. We can see that the elements 22 and 33 are the inverse of each other.

Visualizing inverse as opposite transitions#

We mentioned earlier that inverse pairs are literally the opposite of each other. We’ve also seen that in this group, the elements 22 and 33 are the inverse of each other. Let’s look at the transition of these two elements throughout the state diagram below.

Visual representation of a group
Visual representation of a group

Wherever the element 33 appears, there’s always a 22 there, but in the opposite direction. This is in line with the mathematics involved behind the inverse because inverses cancel out the effect of each other. Here, we can conclude that the inverse of an element (transition) appears between the same states, but in the opposite direction.

Visualizing the associative law#

According to the associative law, a(bc)=(ab)ca*(b*c) = (a*b)*c. Let’s take a look at this with an example.

Suppose a=3,b=2,c=4a=3, b=2, c= 4. From the group table, we can conclude that (bc)=(24)=1(b*c) = (2*4) = 1. This translates to the following in the state diagram.

Understanding associative law
Understanding associative law

We start from the state a (3)a\space(3). Then, we follow the transition of b (2)b\space(2) and reach state 00. Now, from state 00, we take the transition of c (4)c\space(4) and reach state 44. This corresponds to the right-hand side of the associative law.

(ab)c=(32)4=04=4(a*b)*c = (3*2)*4 = 0*4 = 4

Now, let’s look at the left-hand side of the associative law.

a(bc)=3(24)=31=4a*(b*c) = 3*(2*4) = 3*1 = 4

This means that if we start at the same state 33 and follow the transition, which is equivalent to (bc)(b*c) and happens to be 11 in our case, we’ll reach the same state 44. If we look at the diagram closely, we can see a triangle. This triangle forms something that we can refer to as the shortcut rule. Regardless of our starting point aa, if we perform transitions of 22 and 44 in succession, we can reach the same result by performing a single transition of 11. We can verify this by looking at the state diagram of this group or of any other finite group of our choice.

In this blog, we discussed a visual representation of group axioms. Stay tuned for another blog where we extend this visual representation to subgroups, cyclic groups, normal subgroups, etc.

Meanwhile, take a look at some of our courses that are related to this state diagram, e.g., a course on the theory of computation.


 
Join 2.5 million developers at
Explore the catalog

Free Resources