State Machines and Hypergroups

: State machines are a type of mathematical modeling tool that is commonly used to in-vestigate how a system interacts with its surroundings. The system is thought to be made up of discrete states that change in response to external inputs. The state machines whose environment is a two-element magma are investigated in this study, focusing on the case when the magma is a group or a hypergroup. It is shown that state machines in any two-element magma can only have up to three states. In particular, the quasi-automata and quasi-multiautomata state machines are described and enumerated.


Introduction
The state machines and the hypergroups are mathematical achievements of the twentieth century. The state machines are mathematical models which are mostly used for the study of actual physical or behavioral processes. Their roots can be traced back to mathematical logic and they are the primary and major components of Computer Theory. Alan Mathison Turing  developed his theoretical universal-algorithm machine to address the question of whether an algorithm for providing proofs whenever they do exist can be found and he discovered that some tasks which this abstract machine is expected to be able to perform are impossible even for it. The usefulness of the state machines quickly began to spread in other sciences as well. For example, Warren Sturgis McCulloch  and Walter Harry Pitts ) created a mathematical model in neuroscience [1]. The model they constructed for a "neural net" was a state machine of the same nature as Turing's. Stephen Cole Kleene (1909Kleene ( -1994) later elaborated their model [2], while Noam Chomsky created mathematical models in linguistics for the description of languages [3,4]. The rapid development of technology in the twentieth century has made it possible to materialize such theoretical machines by creating the computers. This development fulfilled the timeless dream of mankind, to create machines like the Antikythera mechanism of the Hellenistic era (the earliest known analog computer, dated back to the second century BC [5][6][7]), and the mechanical calculating devices created by Blaise Pascal (1623-1662), by Gottfried Wilhelm von Leibniz (1646-1716), by Charles Babbade (1792-1871) and his co-worker Ada Augusta (1815-1852), the daughter of poet Lord Byron, all of which were as powerful as their respective technologies would allow.
The basic building blocks of a state machine are their internal qualities which are named internal states. The internal states are reacting to certain changes in their environment and this reaction causes state transitions. In the general case, it does not matter what the states and the environment of a state machine really are.
For example, in biology, we can consider the state of a cell in its environment, which consists of certain chemical and physical conditions, such as PH, temperature, light and

Preliminaries
The fundamental notion of the Hypercompositional Algebra is the hypercomposition, that is, a law of synthesis which yields a set of elements instead of a single element, when applied on any two elements. More specifically, we have the definitions [9]: Definition 1. Let E be a non-void set. A mapping from E × E into E is called a composition on E, while a mapping from E × E into the power set P(E) of E is called a hypercomposition on E. A hypercomposition is called partial, if ab = ∅, for some a, b in E. A set enriched with a composition or a hypercomposition is called a magma.
The above definition, which was introduced in [9], extends the definition of the magma given by Nicolas Bourbaki [8] in order to include laws of synthesis which are hypercompositions on a set E.
Let (E, ⊥) be a magma. For any two non-void subsets X, Y of E, X⊥Y = ={x⊥y ∈ E|x ∈ X, y ∈ Y}, if ⊥ is a composition and X⊥Y = ∪ x∈X, y∈Y (x⊥y), if ⊥ is a hypercomposition. If X or Y is empty, then X⊥Y is empty. If a ∈ E, we usually write a⊥Y instead of {a}⊥Y and X⊥a instead of X⊥{a}. In general, the singleton {a} is identified with its member a. Sometimes it is convenient to use the relational notation A ≈ B to assert that subsets A and B have a non-void intersection. Then, as the singleton {a} is identified with its member a, the notation a ≈ A or A ≈ a is used as a substitute for a ∈ A. The relation ≈ may be considered as a weak generalization of the equality, since, if A and B are singletons and A ≈ B, then A = B. Thus, a ≈ b⊥c means a = b⊥c, if the synthesis is a composition and a ∈ b⊥c, if the synthesis is a hypercomposition. This notation is extensively used when it is not necessary to distinguish between a composition or a hypercomposition with respect to a law of synthesis.

Definition 2.
A law of synthesis (x, y) → x⊥y on a set E is called associative if the property, (x⊥y)⊥z = x⊥(y⊥z) is valid, for all elements x, y, z in E, while it is called reproductive if for all elements x in E the equality x⊥E = E⊥x = E holds.

Definition 3.
An associative magma is called α semigroup if the law of synthesis on the magma is a composition, while it is called α semihypergroup if the law of synthesis is a non-partial hypercomposition.

Definition 4.
A reproductive magma is called α quasigroup if the law of synthesis on the magma is a composition, while it is called α quasihypergroup if the law of synthesis is a non-partial hypercomposition.
Definition 5. An associative and reproductive magma is called α group if the law of synthesis on the magma is a composition, while it is called α hypergroup if the law of synthesis is a hypercomposition.
The above Definition 5 appeared in [9], which also contains a detailed presentation of the fundamental properties that derive from the axioms of the associativity and the reproductivity in groups and hypergroups. Among other things, in [9] it is proved that: Theorem 1. If G is a group, then: there exists an element e ∈ G such that ea = a = ae for all a ∈ G ii.
for each element a ∈ G there exists an element a ∈ G such that a a = e = aa Theorem 2. If H is a hypergroup, then: ab = ∅ for all a, b ∈ H Thus, the hypercomposition in a hypergroup cannot be partial. In this paper, we will consider only non-partial hypercompositions.
It is very common in the bibliography to enrich a magma with the axiom of associativity. Besides, another equality that can be valid in the successive synthesis of the magma's elements is the inverted associativity. Recall that a composition or a hypercomposition on a non-void set E is called left inverted associative if (a⊥b)⊥c = (c⊥b)⊥a, for every a, b, c ∈ E, while it is called right inverted associative if a⊥(b⊥c) = c⊥(b⊥a), for every a, b, c ∈ E.
The notion of the inverted associativity was initially conceived by Kazim and Naseeruddin [62]. A magma equipped with a left inverted associativity is called left almost semigroup if the law of synthesis is a composition, while it is called left almost semihypergroup if the law of synthesis is a hypercomposition. The terminology is analogous for the right inverted associative magma.

Definition 6.
A reproductive magma which satisfies the axiom of the left inverted associativity is called a left almost-group (LA-group) when the law of synthesis on the magma is a composition, while it is called α left almost-hypergroup (LA-hypergroup) when the law of synthesis is a hypercomposition. A reproductive, right inverted associative magma is called a right almost-group (RA-group) or a right almost-hypergroup (RA-hypergroup) when the law of synthesis is a composition or a hypercomposition respectively.
Apparently, if the law of synthesis is commutative, then the almost left or almost right groups and hypergroups are groups and hypergroups, respectively. However, it is possible for both associativity and inverted associativity to be valid in a magma. Such cases can be found in the examples of [63], which presents a detailed study of the left/right almost-hypergroups. For the quasi-canonical LA-hypergroups, see [64].
Every law of synthesis in a magma induces two new laws of synthesis. If the law of synthesis is written multiplicatively, then the two induced laws are: Thus x ≈ a/b if and only if a ≈ xb and x ≈ b\a if and only if a ≈ bx. In the case of a multiplicative magma, the two induced laws are called inverse laws and they are named right division and left division, respectively. If the magma is commutative, it is obvious that the right and left divisions coincide.
Directly connected to the induced laws of synthesis is the transposition axiom, which was firstly introduced by W. Prenowitz (1906Prenowitz ( -2000 for the study of geometry with the tools of Hypercompositional Algebra (e.g., [65]) and afterwards it was generalized by J. Jantosciak (1942Jantosciak ( -2017 in [66].

Definition 7.
A magma E is called α transposition magma if it satisfies the axiom: b\a ≈ c/d implies ad ≈ bc, f or all a, b, c, d ∈ E It is obvious that in a transposition magma the following implication is valid as well. In [9], the above implications reversed and so we have the two reverse transposition axioms: Weak reverse transposition axiom:

Strong reverse transposition axiom:
ad ≈ bc implies b\a ≈ c/d and a\b ≈ d/c, f or all a, b, c, d ∈ E However, the following property also applies: This axiom was named bilateral transposition axiom [9].
Special notation: In the following pages, in addition to the typical algebraic notations, we are using Krasner's notation for the complement and difference. So, we denote by A··B the set of elements that are in the set A, but not in the set B.

Action of a Magma on a Set
Let E and S be two non-empty sets. A mapping of E into the set S S of the mappings of S into itself is called an action of E on S. Let a → δ a be an action of E on S. The mapping δ of S × E to S such that δ(s, a) = δ a (s) is an external law of composition on S, with E being the operating set. δ is called the law of right action of E on S. The law of left action of E on S is defined in a similar way. The element δ a (s) is also called the transform of s under a. It is usually denoted by a right (resp. left) multiplicative notation sa (resp. as). The elements of E are called operators.
A mapping δ of S × E to the power set P(S) of S is an external law of hypercomposition on S. Then, the elements of E are called hyperoperators [67]. If a ∈ E is a hyperoperator, then the multiplicative notation sa (resp. as) signifies an element of P(S), that is, sa ⊆ S (resp. as ⊆ S).
A subset T of S is called stable under the action a → δ a of E on S if δ a (T) ⊆ T for all a ∈ E. The intersection of a family of stable subsets of S under a given action is a stable subset of S as well. Therefore, if X is any subset of S, there exists a smallest stable subset of S that contains it. This subset is said to be generated by X and it consists of the elements (δ a 1 • δ a 2 • · · · • δ a n )(x), where x ∈ X, n > 0, a i ∈ E for all i.

Definition 8.
An element s 2 of S is called connected to an element s 1 of S if there exists an element a of E such that δ a (s 1 ) = s 2 .
It must be mentioned that s 2 being connected to s 1 does not necessarily imply that s 1 is connected to s 2 . If s 2 is connected to s 1 , there may be a sequence a 1 , a 2 , . . . , a n of elements of E such that (δ a 1 • δ a 2 • · · · • δ a n )(s 1 ) = s 2 . Thus, via the notion of the connected elements, a hypercomposition can be defined on S, as follows: {s ∈ S | s = s 1 a and s 2 = sb, with a, b ∈ E}, if s 2 is connected to s 1 {s 1 , s 2 }, if s 2 is not connected to s 1 Proposition 1. If the set of the operators E over a non-void set S is a unitary magma, then (S, +) becomes a hypergroup.
Proof. Since E is a unitary magma, the result of the hypercomposition always contains the two participating elements, thus s + S = S + s = S for all s ∈ S and so the reproductive axiom is valid. Moreover, the associativity holds. Indeed, if s 1 , s 2 and s 3 are not connected to each other, then Next, suppose that s 2 and s 3 are connected to s 1 . Also let s 3 be connected to s 2 . Then: If E is a magma, an equivalence relation ξ on E is called a congruence relation if When the law of synthesis in the magma is a composition, then ac and bd are singletons and the above definition is simplified to: The set E /ξ of all equivalence classes defined on E by ξ becomes an associative magma if we define ξ a ·ξ b = {ξ c | c ≈ ab} for all ξ a , ξ b ∈ E /ξ Proposition 2. Every congruence relation ξ on a magma E is a normal equivalence relation, and therefore the set E /ξ becomes a magma under the law of synthesis where C x is the class of an arbitrary element x ∈ E.
Proof. Since ξ is a congruence relation, for each x, y ∈ E it holds: Conversely now: Thus, C x ·C y = ∪ z≈xy C z , and so the quotient set E /ξ, enriched with the law of synthesis Obviously, if the law of synthesis is a composition, then the previous equality is simplified to C x ·C y = C xy .

Corollary 2.
Every congruence relation ξ on a hypergroup E is a normal equivalence relation, and therefore the quotient E /ξ becomes a hypergroup under the hypercomposition C x ·C y = {C z | z ≈ xy}. If E is a group, then E /ξ is a group as well, under the composition C x ·C y = C xy Proposition 3. If E is a transposition magma and ξ is a congruence relation on E, then E /ξ is a transposition magma.
Proof. Suppose that for some elements C x , C y , C z , C w , of the quotient set E /ξ it holds that C y \C x ≈ C z /C w . Then there exist elements x , y , z , w belonging to C x , C y , C z , C w , respectively, such that y \x ≈ z /w . Since the transposition axiom is valid in E, it derives that x w ≈ y z . Therefore, C x ·C w ≈ C y ·C z and hence the proposition.

Definition 9.
A state machine M is a triplet (S, E, δ) where S and E are sets and δ is mapping of S × E to S.
The set S describes the internal qualities of the system. The elements of S are called internal states of M. If S is finite, then M is called a finite state machine. The set E describes the environmental inputs that can affect the system. The mapping δ describes the environmental influences on the internal qualities of the system and it is called a state transition function. Such a system is obviously quite general and can be used in a variety of cases. From the mathematical standpoint, a state machine is a set with operators and the fact that we can successfully approach, describe and examine such systems via algebraic tools and techniques is one of the most impressive and remarkable achievements of modern algebra. Example 1. State machines can be depicted by the so-called transition diagrams. Thus, if S = {s 1 } and E is a finite set, then the relevant state machine is illustrated with the transition diagram presented in Figure 1: braic tools and techniques is one of the most impressive and remarkable achievements of modern algebra.    Another way of specifying a state machine is by writing out the transition function δ in tabular form, thus creating the so-called state transition    Another way of specifying a state machine is by writing out the transition function δ in tabular form, thus creating the so-called state transition table. For example, the state transition table of the last in the above figure state machine is the following one:  Another way of specifying a state machine is by writing out the transition function δ in tabular form, thus creating the so-called state transition  Suppose that a ∈ E is applied to the state s ∈ S of a state machine M. Then the machine moves to state δ(s, a) = δ a (s) = sa. Next, if another input, say b ∈ E, is applied to the machine, the resultant state is: , if E is a magma, we say that the state transition function satisfies the associativity if δ b (δ a (s)) = δ c (s), c ≈ ab. If the law of synthesis is a composition, then the associativity is of the form δ b (δ a (s)) = δ ab (s) or equivalently (sa)b = s(ab) and it is named mixed associativity, while if the law of synthesis is a hypercomposition, the associativity is fulfilled if (sa)b ∈ s(ab) and it is called generalized mixed associativity [26,29,68].

Definition 10.
A state machine M = (S, E, δ) is called quasi-automaton if E is a magma and the state transition function satisfies the mixed associativity, i.e., (sa)b = s(ab) for any pair a, b ∈ E and any state s ∈ S. Definition 11. A state machine M = (S,E,δ) is called quasi-multiautomaton if E is a magma and the state transition function satisfies the generalized mixed associativity, i.e., (sa)b ∈ s(ab) for any pair a, b ∈ E and any state s ∈ S.
A detailed presentation of the terminology, based on the historical development of the area, can be found in the well-written paper [29]. The above definitions are in line with [29]. Obviously, every quasi-automaton is a quasi-multiautomaton. Apparently, quasimultiautomata which are not quasi-automata can only exist when E is a hypercompositional magma. On the contrary, quasi-automata exist when either the magma is endowed with a composition or when it is endowed with a hypercomposition. A special case of quasiautomata occurs when E is a free semigroup or a free monoid instead of an arbitrary magma. In this case, computer theory tends to use the term "word" for the elements of E, the term "letter" for the elements of its generating set Σ and the term concatenation of words for the law of synthesis in E. Moreover, the free semigroup generated by Σ is denoted by Σ + and the corresponding free monoid by Σ * . Also, the quasi-automaton is denoted by M = (S,E,δ).

Proposition 4.
Let (S,E,δ) be a quasi-automaton and ∼ a binary relation on the magma, defined by Then ∼ is a congruence relation on E and the magma E / ∼ has the same algebraic structure as E.
Proof. This relation is easily seen to be an equivalence relation. Next, let a ∼ b and c ∼ d. From a ∼ b, it follows that δ a (s) = δ b (s) for all s ∈ S. Next, since c ∼ d, the following sequence of equivalent statements holds: Therefore, ∼ is a congruence relation on E. Next, it is easy to see that the magma E / ∼ is of the same type as E, that is, if E is a semigroup, semi-hypergroup, hypergroup, group, etc., then E / ∼ has the same algebraic structure, respectively. Now, if M = (S,E,δ) is a quasi-automaton, then the semigroup E = Σ + / ∼ or the monoid E = Σ * / ∼ can be constructed with the use of Proposition 4. In many cases, it is more convenient to study this semigroup rather than the original machine M. However, if we do not want to lose sight of the set of states, we consider the machine M = (S,E,δ). Each element of E is an equivalence class of Σ + or Σ * , which acts on S as follows: s[a] = δ a (s), where s ∈ S and a ∈ Σ + or a ∈ Σ * .

The Magma of 2 Elements
In this section, we will proceed to a detailed study and classification of the two-element magma, which is the binary state machines' environment.
While there exists only one single element magma which is a group and also a LA/RAgroup, there exist 3 4 = 81 magmas with 2 elements. These magmas can be constructed, classified and enumerated, with the techniques and methods which are developed in [69][70][71] and [63]. In the following propositions, these magmas are presented via their Cayley tables. Note that, in a Cayley table, the entry in the row headed by x and the column headed by y is the synthesis x·y.

i. Associative Magmas
Proposition 5. There exist 6 semigroups which are classified into 2 classes with 2 isomorphic semigroups each, and into 2 single-member classes, which are presented below via their Cayley tables. Moreover, since SG 1 and SG 2 are commutative, they satisfy both the left and the right inverted associativity.
Remark 1. When 0 a = and 1 b = in the two isomorphic semigroups SG2, we get the two well-known operations of the Boolean algebra: SH is commutative, it satisfies both the left and the right inverted associativity.
Remark 1. When a = 0 and b = 1 in the two isomorphic semigroups SG 2 , we get the two well-known operations of the Boolean algebra: Remark 1. When 0 a = and 1 b = in the two isomorphic semigroups SG2, we get the two well-known operations of the Boolean algebra: SH is commutative, it satisfies both the left and the right inverted associativity.
Proposition 6. There exist 10 semihypergroups which are classified into 5 classes with 2 isomorphic semihypergroups each. These are displayed below in the form of Cayley tables. Moreover, since SH 1 is commutative, it satisfies both the left and the right inverted associativity.
Remark 1. When 0 a = and 1 b = in the two isomorphic semigroups SG2, we get the two well-known operations of the Boolean algebra: SH is commutative, it satisfies both the left and the right inverted associativity.
Mathematics 2022, 10, x FOR PEER REVIEW 12 of 28 ii. Reproductive Magmas Proposition 7. There exist 21 quasihypergroups which are classified into 9 two-member classes and 3 single-member classes, which are presented below via their Cayley tables.
ii. Reproductive Magmas Proposition 7. There exist 21 quasihypergroups which are classified into 9 two-member classes and 3 single-member classes, which are presented below via their Cayley tables.
Mathematics 2022, 10, x FOR PEER REVIEW 12 of 28 ii. Reproductive Magmas Proposition 7. There exist 21 quasihypergroups which are classified into 9 two-member classes and 3 single-member classes, which are presented below via their Cayley tables.
ii. Reproductive Magmas Proposition 7. There exist 21 quasihypergroups which are classified into 9 two-member classes and 3 single-member classes, which are presented below via their Cayley tables.     H is the two-element B-hypergroup. B(inary)-hypergroups came into being during the study of formal languages and automata with the use of hypercompositional algebra [5,13,16,17]. The free monoid of the words generated by an alphabet Σ can be endowed with the B-hypergroup structure, and so become a join hyperringoid [21,[72][73][74], which is named linguistic hyperringoid [14,21,73,74]. If the B-hypergroup is fortified with a strong identity [31], which is necessary for the theory of formal languages and automata [14,21], then the join hyperring comes into being [72][73][74]. 7 H is the two-element total hypergroup. H are commutative; therefore, the two induced hypercompositions coincide, and so there is only one Cayley table corresponding to each one of them. As mentioned above, in the Cayley tables, the entry in the row headed by x and the column headed by y is the synthesis x/y or y\x respectively.
H 6 is the two-element B-hypergroup. B(inary)-hypergroups came into being during the study of formal languages and automata with the use of hypercompositional algebra [5,13,16,17]. The free monoid of the words generated by an alphabet Σ can be endowed with the B-hypergroup structure, and so become a join hyperringoid [21,[72][73][74], which is named linguistic hyperringoid [14,21,73,74]. If the B-hypergroup is fortified with a strong identity [31], which is necessary for the theory of formal languages and automata [14,21], then the join hyperring comes into being [72][73][74]. H 7 is the two-element total hypergroup. Proposition 10. All the two-element hypergroups are transposition hypergroups.
Proof. The Cayley tables of the induced hypercompositions for the seven two-element hypergroups are presented below. For the classes with two elements, we chose the first hypergroup for the presentation of the induced hypercomposition. Observe that the hypergroups H 3 , H 4 , H 5 , H 6 and H 7 are commutative; therefore, the two induced hypercompositions coincide, and so there is only one Cayley table corresponding to each one of them. As mentioned above, in the Cayley tables, the entry in the row headed by x and the column headed by y is the synthesis x/y or y\x respectively. The verification of the transposition axiom gives the rest. □ So, according to Proposition 10, there do not exist non-transposition hypergroups with cardinality 1 or 2. However, as shown in the following example, there exist nontransposition hypergroups if their cardinality is greater than or equal to 3.

Example 2.
The hypercomposition on hypergroup H6 can be written in the following two ways: and , , The verification of the transposition axiom gives the rest.
So, according to Proposition 10, there do not exist non-transposition hypergroups with cardinality 1 or 2. However, as shown in the following example, there exist nontransposition hypergroups if their cardinality is greater than or equal to 3. If H = {a, b}, then the above two formulas give the same hypercomposition, but if cardH ≥ 3, then they produce two different hypergroups. The first one, which is the B-hypergroup, satisfies the transposition axiom (see [13] for the proof), while the second one does not. Indeed, the induced hypercomposition of (2) is: Next, if a = b, we have: Moreover, the verification of the reverse transposition axiom for hypergroups H 1 -H 7 leads to the following result: Proposition 11. All the two-element hypergroups satisfy the strong reverse transposition axiom.
A consequence of Propositions 10 and 11 is the following Theorem: Theorem 3. All the two-element hypergroups satisfy the bilateral transposition axiom.
In [9], following the observation that the quasicanonical hypergroups, the canonical hypergroups, and of course, the groups and the abelian groups satisfy the bilateral transposition axiom, the question arose: Do there exist other hypergroups satisfying the bilateral transposition axiom apart from the quasicanonical and the canonical ones? The above Theorem 3 gives the affirmative answer to this question. , then the above two formulas give the same hypercomposition, but if cardH ≥ 3, then they produce two different hypergroups. The first one, which is the Bhypergroup, satisfies the transposition axiom (see [13] for the proof), while the second one does not. Indeed, the induced hypercomposition of (2) is: ≠ , we have: Moreover, the verification of the reverse transposition axiom for hypergroups 1 7 H H − leads to the following result:

Proposition 11. All the two-element hypergroups satisfy the strong reverse transposition axiom.
A consequence of Propositions 10 and 11 is the following Theorem:

Theorem 3. All the two-element hypergroups satisfy the bilateral transposition axiom.
In [9], following the observation that the quasicanonical hypergroups, the canonical hypergroups, and of course, the groups and the abelian groups satisfy the bilateral transposition axiom, the question arose: Do there exist other hypergroups satisfying the bilateral transposition axiom apart from the quasicanonical and the canonical ones? The above Theorem 3 gives the affirmative answer to this question. , then the above two formulas give the same hypercomposition, but if cardH ≥ 3, then they produce two different hypergroups. The first one, which is the Bhypergroup, satisfies the transposition axiom (see [13] for the proof), while the second one does not. Indeed, the induced hypercomposition of (2) is: ≠ , we have: Moreover, the verification of the reverse transposition axiom for hypergroups 1 7 H H − leads to the following result:

Proposition 11. All the two-element hypergroups satisfy the strong reverse transposition axiom.
A consequence of Propositions 10 and 11 is the following Theorem:

Theorem 3. All the two-element hypergroups satisfy the bilateral transposition axiom.
In [9], following the observation that the quasicanonical hypergroups, the canonical hypergroups, and of course, the groups and the abelian groups satisfy the bilateral transposition axiom, the question arose: Do there exist other hypergroups satisfying the bilateral transposition axiom apart from the quasicanonical and the canonical ones? The above Theorem 3 gives the affirmative answer to this question.   Τhe remaining 26 magmas are classified into 12 two-member classes and into two single-member classes. The law of synthesis on the 2 magmas of the single-member classes is a composition. The same goes for the magmas in three of the twelve two-member classes.

Proposition 16.
There exist only two non-isomorphic groupoids of two elements, which are presented in the following Cayley tables.

Definition 12. A magma is called rigid if its group of automorphisms is of order 1.
As it is shown in [75,76], there exist 21 rigid hypergroupoids whose classification is described in Theorem 4 of [76]. The following Theorem 4 applies to the two-element magmas: Theorem 4. There exist 9 rigid magmas of two elements, classified as follows: i.
2 non-commutative groupoids, which do not satisfy the transposition axiom; ii. 2 non-commutative transposition semigroups; Proposition 15. In addition to the five non-isomorphic commutative hypergroups (and hence left and right almost-hypergroups) that are mentioned in Proposition 9, there also exist two nonisomorphic right almost-hypergroups which are classified into one two-member class and into one single-member class, as they are presented in the following Cayley tables. Τhe remaining 26 magmas are classified into 12 two-member classes and into two single-member classes. The law of synthesis on the 2 magmas of the single-member classes is a composition. The same goes for the magmas in three of the twelve two-member classes.

Proposition 16.
There exist only two non-isomorphic groupoids of two elements, which are presented in the following Cayley tables.

Definition 12. A magma is called rigid if its group of automorphisms is of order 1.
As it is shown in [75,76], there exist 21 rigid hypergroupoids whose classification is described in Theorem 4 of [76]. The following Theorem 4 applies to the two-element magmas: Theorem 4. There exist 9 rigid magmas of two elements, classified as follows: i.

Rigid Magmas
The remaining 26 magmas are classified into 12 two-member classes and into two single-member classes. The law of synthesis on the 2 magmas of the single-member classes is a composition. The same goes for the magmas in three of the twelve two-member classes.

Proposition 16.
There exist only two non-isomorphic groupoids of two elements, which are presented in the following Cayley tables. Τhe remaining 26 magmas are classified into 12 two-member classes and into two single-member classes. The law of synthesis on the 2 magmas of the single-member classes is a composition. The same goes for the magmas in three of the twelve two-member classes.

Proposition 16.
There exist only two non-isomorphic groupoids of two elements, which are presented in the following Cayley tables.

Definition 12. A magma is called rigid if its group of automorphisms is of order 1.
As it is shown in [75,76], there exist 21 rigid hypergroupoids whose classification is described in Theorem 4 of [76]. The following Theorem 4 applies to the two-element magmas: Theorem 4. There exist 9 rigid magmas of two elements, classified as follows: i.
2 non-commutative groupoids, which do not satisfy the transposition axiom; ii. 2 non-commutative transposition semigroups; Definition 12. A magma is called rigid if its group of automorphisms is of order 1.
As it is shown in [75,76], there exist 21 rigid hypergroupoids whose classification is described in Theorem 4 of [76]. The following Theorem 4 applies to the two-element magmas: Theorem 4. There exist 9 rigid magmas of two elements, classified as follows: i.
2 non-commutative groupoids, which do not satisfy the transposition axiom; ii.
1 RA-hypergroup, which does not satisfy the transposition axiom; vi. 2 hypergroups, which satisfy both the left and right invert associativity.

Proof. i.
Let us consider the first groupoid of Proposition 15. Then, the two induced hypercompositions are given in the following Cayley tables: iii. 1 commutative quasi-hypergroup, which does not satisfy the transposition axiom; iv. 1 LA-hypergroup, which does not satisfy the transposition axiom; v. 1 RA-hypergroup, which does not satisfy the transposition axiom; vi. 2 hypergroups, which satisfy both the left and right invert associativity.

Proof.
i. Let us consider the first groupoid of Proposition 15. Then, the two induced hypercompositions are given in the following Cayley tables: Next, we have that Therefore, the transposition axiom is not valid. Analogous is the proof for the second groupoid. ii. Let us consider the semigroup SG3. Then, the two induced hypercompositions are the following ones: The verification of the transposition axiom, according to the above Cayley tables, proves its validity. The same goes for the case of SG4. iii. Since QH10 is commutative, the two induced hypercompositions coincide and so we have: Since the implication holds, the transposition axiom is not valid.
v. It is true as it is the dual of iv.
vi. The two hypergroups are H6 and H7. H6 is a B-hypergroup. As it is well known, the B-hypergroups are join hypergroups (see [13] for the proof), that is, commutative hypergroups which satisfy the transposition axiom. H7 is the two-element total hypergroup and total hypergroups are join hypergroups as well [5,9,13]. □ Therefore, the transposition axiom is not valid. Analogous is the proof for the second groupoid. ii. Let us consider the semigroup SG 3 . Then, the two induced hypercompositions are the following ones: iii. 1 commutative quasi-hypergroup, which does not satisfy the transposition axiom; iv. 1 LA-hypergroup, which does not satisfy the transposition axiom; v. 1 RA-hypergroup, which does not satisfy the transposition axiom; vi. 2 hypergroups, which satisfy both the left and right invert associativity.

Proof.
i. Let us consider the first groupoid of Proposition 15. Then, the two induced hypercompositions are given in the following Cayley tables: Next, we have that Therefore, the transposition axiom is not valid. Analogous is the proof for the second groupoid. ii. Let us consider the semigroup SG3. Then, the two induced hypercompositions are the following ones: The verification of the transposition axiom, according to the above Cayley tables, proves its validity. The same goes for the case of SG4. iii. Since QH10 is commutative, the two induced hypercompositions coincide and so we have: Since the implication holds, the transposition axiom is not valid.
v. It is true as it is the dual of iv.
vi. The two hypergroups are H6 and H7. H6 is a B-hypergroup. As it is well known, the B-hypergroups are join hypergroups (see [13] for the proof), that is, commutative hypergroups which satisfy the transposition axiom. H7 is the two-element total hypergroup and total hypergroups are join hypergroups as well [5,9,13]. □ The verification of the transposition axiom, according to the above Cayley tables, proves its validity. The same goes for the case of SG 4 . iii. Since QH 10 is commutative, the two induced hypercompositions coincide and so we have: Next, a/b ∩ b/a = {a, b} = ∅ but aa ∩ bb = ∅. Therefore, the transposition axiom is not valid. iv. The induced hypercompositions on the LA-H 2 are: v. 1 RA-hypergroup, which does not satisfy the transposition axiom; vi. 2 hypergroups, which satisfy both the left and right invert associativity. Proof.

i.
Let us consider the first groupoid of Proposition 15. Then, the two induced hypercompositions are given in the following Cayley tables: Next, we have that Therefore, the transposition axiom is not valid. Analogous is the proof for the second groupoid. ii. Let us consider the semigroup SG3. Then, the two induced hypercompositions are the following ones: The verification of the transposition axiom, according to the above Cayley tables, proves its validity. The same goes for the case of SG4. iii. Since QH10 is commutative, the two induced hypercompositions coincide and so we have: Since the implication holds, the transposition axiom is not valid.
v. It is true as it is the dual of iv.
vi. The two hypergroups are H6 and H7. H6 is a B-hypergroup. As it is well known, the B-hypergroups are join hypergroups (see [13] for the proof), that is, commutative hypergroups which satisfy the transposition axiom. H7 is the two-element total hypergroup and total hypergroups are join hypergroups as well [5,9,13]. □ Since the implication b/a ∩ a\b = {a} ∩ {a, b} = ∅ ⇒ ab ∩ ba = ∅ holds, the transposition axiom is not valid.

v.
It is true as it is the dual of iv. vi. The two hypergroups are H 6 and H 7 . H 6 is a B-hypergroup. As it is well known, the B-hypergroups are join hypergroups (see [13] for the proof), that is, commutative hypergroups which satisfy the transposition axiom. H 7 is the two-element total hypergroup and total hypergroups are join hypergroups as well [5,9,13].

Binary State Machines
Let M = (S,E,δ) be a state machine. Two states, s, t, are called connected if there exists a sequence of inputs which causes S to leave state s and go into state t, that is, if there exists a sequence a 1 , a 2 , . . . , a n of elements of E such that (δ a 1 • δ a 2 • · · · • δ a n )(s) = t. The states s, t are called isolated to each other if neither s is connected to t, nor t to s. A state machine M is called connected if its undirected graph is connected, while it is called strongly connected if every ordered pair (s, t) of states in S is connected.

Proposition 17.
Suppose that the connected state machine M = (S,E,δ) is a quasi-multiautomaton. Then, for every pair (s, t) of states, there exists one element of E which connects them, i.e., δ a (s) = t for some a ∈ E.

Theorem 5.
If the magma E in a quasi-multiautomaton M = (S,E,δ) has n elements, then the set S cannot have more than n + 1 states.
Proof. As per Proposition 17, for every pair of states (s, t), there exists one element of E which connects them, i.e., there exists a ∈ E such that δ(s, a) = t. Therefore, if cardE = n e.g., if E = {a 1 , a 2 , . . . , a n }, then, for each state s ∈ S, there exist at most n states connected with s, which are the s i = δ(s, a i ), 1 ≤ i ≤ n. Next, if some state s k ∈ S yields δ s k , a j = t, then, since s k = δ(s, a k ), it holds that t = δ δ(s, a k ), a j ∈ δ(s, a) a ∈ a k a j ⊆ S Hence, S = {s, s 1 , s 2 , . . . , s n } and so the Theorem.

Theorem 7.
There exist 10 isomorphic binary state machines with 2 states, which are classified into 6 two-element classes and into 4 single-element classes, as presented in Figure 3: Next, we will find which state machines are quasi-multiautomata or quasi-automata when their magma is a group or a hypergroup. In the proofs of the following propositions, we use the first member of each state machine class as the representative of the entire class. Similarly, the representative of every class from the group or the hypergroups will be its first member. Next, we will find which state machines are quasi-multiautomata or quasi-automata when their magma is a group or a hypergroup. In the proofs of the following propositions, we use the first member of each state machine class as the representative of the entire class. Similarly, the representative of every class from the group or the hypergroups will be its first member.

Proposition 18.
If E is the group G 1 (Proposition 8), then the state machines SM 4 , SM 9 , SM 10 are quasi-automata.
Proof. The verification of the axioms shows that SM 4 , SM 9 , SM 10 are quasi-automata. The rest state machines do not satisfy the mixed associativity. Indeed:

Proposition 19.
If E is the hypergroup H 1 (Proposition 9), then the state machines SM 3 , SM 6 , SM 9 are quasi-multiautomata and the state machines SM 4 , SM 10 are quasi-automata.
Proof. The state machines SM 3 , SM 6 , SM 9 satisfy the generalized mixed associativity and hence they are quasi-multiautomata. Indicatively, for SM 3 we have:

Proposition 20.
If E is the hypergroup H 2 (Proposition 9), then the state machines SM 6 , SM 9 are quasi-multiautomata and the state machines SM 4 , SM 10 are quasi-automata.
Proof. The state machines SM 6 , SM 9 satisfy the generalized mixed associativity, and therefore they are quasi-multiautomata, while SM 4 and SM 10 satisfy the mixed associativity and so they are quasi-automata. The rest state machines do not satisfy any associativity condition. Indeed:

Proposition 21.
If E is the hypergroup H 3 (Proposition 9), then the state machines SM 6 , SM 9 are quasi-multiautomata and the state machines SM 4 , SM 10 are quasi-automata.
Proof. The state machines SM 6 , SM 9 satisfy the generalized mixed associativity, and therefore they are quasi-multiautomata, while SM 4 and SM 10 satisfy the mixed associativity and therefore they are quasi-automata. The rest state machines do not satisfy any associativity condition. Indeed: For SM 1 it holds: (s 2 a)b = s 1 b = s 2 while s 2 (ab) = s 2 b = s 1 . For SM 2 it holds: (s 2 a)a = s 1 a = s 2 while s 2 (aa) = s 2 a = s 1 . For SM 3 it holds: (s 2 b)a = s 1 a = s 2 while s 2 (ba) = s 2 b = s 1 . For SM 5 it holds: (s 2 a)b = s 1 b = s 1 while s 2 (ab) = s 2 b = s 2 . For SM 7 it holds: (s 1 a)a = s 2 a = s 1 while s 1 (aa) = s 1 a = s 2 . For SM 8 it holds: (s 1 b)a = s 1 a = s 2 while s 1 (ba) = s 1 b = s 1 .
Proof. The state machines SM 3 , SM 5 , SM 6 , SM 9 satisfy the generalized mixed associativity, and therefore they are quasi-multiautomata, while SM 4 and SM 10 satisfy the mixed associativity and therefore they are quasi-automata. The rest state machines do not satisfy any associativity condition. Indeed: Proposition 23. If E is the hypergroup H 5 (Proposition 9), then the state machine SM 8 is a quasi-multiautomaton and the state machines SM 4 , SM 10 are quasi-automata.
Proof. The state machine SM 8 satisfies the generalized mixed associativity, and therefore it is a quasi-multiautomaton, while SM 4 and SM 10 satisfy the mixed associativity and therefore they are quasi-automata. The rest state machines do not satisfy any associativity condition. Indeed: For SM 1 it holds: (s 1 a)a = s 1 a = s 1 while s 1 (aa) = s 1 b = s 2 . For SM 2 it holds: (s 2 a)a = s 1 a = s 2 while s 2 (aa) = s 2 b = s 1 . For SM 3 it holds: (s 1 a)a = s 2 a = s 2 while s 1 (aa) = s 1 b = s 1 . For SM 5 it holds: (s 2 a)a = s 1 a = s 1 while s 2 (aa) = s 2 b = s 2 . For SM 6 it holds: (s 2 a)a = s 2 a = s 2 while s 2 (aa) = s 2 b = s 1 . For SM 7 it holds: (s 1 a)a = s 2 a = s 1 while s 1 (aa) = s 1 b = s 2 . For SM 9 it holds: (s 1 a)a = s 1 a = s 1 while s 1 (aa) = s 1 b = s 2 .

Proposition 24.
If E is the hypergroup H 6 (Proposition 9), then the state machines SM 3 , SM 5 , SM 6 are quasi-multiautomata and the state machines SM 4 , SM 10 are quasi-automata.
Proof. The state machines SM 3 , SM 5 , SM 6 satisfy the generalized mixed associativity, and therefore they are quasi-multiautomata, while SM 4 and SM 10 satisfy the mixed associativity and therefore they are quasi-automata. For the rest state machines, observe that they satisfy none of the associativity conditions. Indeed: For SM 1 it holds: (s 2 b)b = s 1 b = s 2 while s 2 (bb) = s 2 b = s 1 . For SM 2 it holds: (s 2 a)a = s 1 a = s 2 while s 2 (aa) = s 2 a = s 1 . For SM 7 it holds: (s 1 a)a = s 2 a = s 1 while s 1 (aa) = s 1 a = s 2 . For SM 8 it holds: (s 1 a)a = s 2 a = s 1 while s 1 (aa) = s 1 a = s 2 . For SM 9 it holds: (s 1 b)b = s 1 b = s 2 while s 2 (bb) = s 2 b = s 1 .

Conclusions and Open Problems
This paper approaches the state machines from within their environment in which they can "survive", i.e., exist and operate. They are given an extended definition which derives from the consideration that the environment in which they can exist is an algebraic magma in the sense of [9], where the initial definition of magma by N. Bourbaki [8] is generalized for the purpose of incorporating algebraic structures endowed with hypercompositional laws. Hence, a state machine M is defined as a triplet (S,E,δ), where S is the set of the states of the machine, E is the set of the environmental inputs to the machine and δ is a mapping of S × E to S, which describes the interaction between each state and its environment. Our study focuses on the binary state machines, where E is a two-element magma and our results can be summarized in Table 1: With regard to the classification given in this table, we note that according to the above Theorem 3, the two-element hypergroups are not just transposition hypergroups (row 10), but bilateral transposition hypergroups. Hence, the hitherto open question which was asked in [9] is answered affirmatively.
Of all the structures that appear in the above table, this paper presents the state machines with two states whose environment is a two-element group or two-element hypergroups. The results are presented in Table 2: According to Corollary 3, only quasiautomata and quasi-multiautomata with up to three states can operate in the environment of a two-element magma. The description of the three state binary machines, as well as the investigation of the state machines which correspond to algebraic structures of E that are other than groups or hypergroups, still remain open problems. This question becomes more complicated in the instances when E is enriched with two laws of synthesis, as it happens in a hyperringoid [74]. It is worth mentioning here that E is a hyperringoid in specific state machines like the automata, where the environment is defined via an alphabet [16,17,21].
All of the above refer to deterministic state machines. However, the state transition function can be a mapping from S × E to the power set P(S) of S, defining thus the nondeterministic state machines (see also [13,14,67]). This consideration broadens the margins of the study as there can exist state transition functions for which δ(s, a) is not necessarily just a single element. It can be more than one element and it can also be none, as it is possible for δ(s, a) to be equal to the empty set.