Groups and their application

What are Groups?

Groups are mathematical entities that display a lot of symmetry. In fact
they are used as a tool to study symmetries in particle physics. Essentially, they are
non-empty sets with an operation, that satisfies the following
properties:

  1. If x and y belongs to a group G then their operation xy is in G too.
    This property is the closure.
  2. There is an neuter element e such that for all x in G $$ex = xe = x$$
  3. There is an inverse element y such that $$xy = yx = e$$
  4. The associative law works in the set for $$x,y,z \in G$$ such that $$(xy)z = x(yz)$$

As examples we have:

  1. The integers with addition operation.
  2. The group $$\mathbb{Z}_26$$ permutation of the alphabet with shift operation.
  3. $$S_n$$ symmetry groups, used to solve Rubik's Cube and to show that the
    the cube requires less than 20 moves to solve. Used also and data sorting and shuffling of
    cards.

Problem: We have a set of four 8 bit registers $$\D = {A,B,C,D\}$$ and we want to operate then with
a group for the square's symmetry $$G = {e,r,s_1,s_2,s_3,s_4,s_5,s_6}$$
} We dispose the elements of D in the corners of the square. Each operation $$r: xor reg, reg$$ and operation $$s_n$$ is
is a reflexion operation $$s_n: xor reg reg$$ and finally e: NOP. Example:
Starting with $$A = 0x0F$$, $$B = 0xAA $$, $$C = 0x55$$ and $$D = 0xFF$$
What is the final result in the A
register.