**1. Introduction**

The theory of formal languages is closely linked to the theory of automata. An automaton is a finite representation of a formal language that can consist of an infinite number of words. Automata are often classified by means of a class of formal languages that they can accept; see, e.g., [1], a paper dealing with the automata theory from the point of view of our present paper, or papers such as [2,3]. The algebraic theory of automata studies various types of such structures, which are linked to actions of groups on sets. In the case of algebraic automata, the way of functioning is rather straightforward and simple: the automaton has a set of states and a set of inputs and, after we apply a certain input on a certain state, the automaton switches to a new state as specified by the transition function. However, in the theory of formal languages, automata are regarded as devices reading strings of words instead of single input symbols only. In other words, inputs (or characters) are catenated and one-by-one put into the automaton, which causes changes of states. In the algebraic definition, this can be seen in the definition of automaton, where the input alphabet is a free monoid over the input set, i.e., for each nonempty set *A*, we denote *A*<sup>∗</sup> the set of all finite sequences *a*1*a*<sup>2</sup> ... *an*, *ai* ∈ *A*, i.e., finite words made of symbols from *A*. Moreover, *A*<sup>∗</sup> regards the usual binary operation of concatenation: *u* = *a*<sup>1</sup> ... *an*, *v* = *b*<sup>1</sup> ... *bk*, *uv* = *a*<sup>1</sup> ... *anb*<sup>1</sup> ... *bk*. With this, *A*<sup>∗</sup> is a free monoid over *A* with a neutral element *e*, the empty word.

In the course of time, the algebraic theory of automata began to regard automata without output, the operation of concatenation has been replaced by an arbitrary group operation, and monoid or a group have been used instead of the free monoid. Definition 2 complies with traditional books such as [4–7] or recent papers such as [8]. One can see that the conditions are constructed in such a way that both monoid and free monoid are applicable.

Since the late 1930s, the group theory has been generalized in the sense that the synthesis of elements of the carrier set need no longer to be an element of that carrier

**Citation:** Kˇrehlík, Š.; Novák, M.; Vyroubalová, J. From Automata to Multiautomata via Theory of Hypercompositional Structures. *Mathematics* **2022**, *10*, 1. https:// doi.org/10.3390/math10010001

Academic Editor: Adolfo Ballester-Bolinches

Received: 16 November 2021 Accepted: 17 December 2021 Published: 21 December 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

set. When subsets are permitted (such as a line segment being a result of an "operation" on its endpoints), we arrive at a concept of hypercompositional structures. For a basic introduction to the topic stressing its context from a historical perspective—see, e.g., an easy-to-follow overview paper [9].

The generalizations of algebraic automata in the sense of the theory of hypercompositional structures first focused on constructions of commutative hypergroups on their state sets. Properties of automata have been described by means of properties of such hypergroups over their state sets; see, e.g., [5,10–12]. The next step is to construct hypercompositional structures on the input sets and generalize the MAC condition to GMAC. Since there are no unique neutral elements in hypercompositional structures, the UC condition is omitted; see, e.g., [13,14]. The concept of quasi-multiautomaton originated in conference proceedings [15] while the GMAC condition was used for the first time (in the context of dynamical systems) in [12]—e.g., in [16,17]. In this respect, notice also suffix automata, which accept all suffixes of a given string and belong to the basic stringologic principles. When generalizing their transitions to include specific buffer operations, we obtain new subtree pushdown automata, which accept all subtrees of a given tree in the prefix notation; see, e.g., [18].

In 1959, M. O. Rabin and D. Scott introduced the concept of nondeterministic finite automata in [19] and proved their equivalence to deterministic finite automata. A nondeterministic automaton, such as a deterministic one, consumes a string of input symbols. It enters a new state for each input symbol until all input symbols are consumed. Unlike in deterministic finite automata, the way symbols are consumed is nondeterministic, i.e., for a state and an input symbol, the next state may be the original or one, two, or more possible states. Thus, in the formal definition, another state is an element of a potential set of states, which is a set of states that must be considered simultaneously. In this respect, the connection with the theory of hypercompositional structures is rather obvious. However, introducing hypergroups on input sets does not lead to nondeterministic quasimultiautomata because the transition function *δ* : *H* × *S* −→ *S* used in Definition 5 of a quasi-multiautomaton maps to the state set *S* instead of the set of its subsets P(*S*).

#### **2. Basic Definitions**

In order to clarify terminology used throughout the paper, in this section, we collect all basic definitions.

**Definition 1.** *[1] A deterministic automaton is a 5-tuple* (*A*, *S*,*s*0, *δ*, *F*)*, where A is input alphabet, S is a finite nonempty set of states, s*<sup>0</sup> ∈ *S is the initial (or start) state, δ* : *A* × *S* −→ *S is the state transition function, and F* ⊆ *S is the set of final states. Sometimes it is convenient to use, instead of δ, the extended transition function δ*<sup>∗</sup> : *A*<sup>∗</sup> × *S* −→ *S, where A*<sup>∗</sup> *is the set of words over the alphabet A, which is defined recursively as follows:*


One can see that the conditions of the following definition are constructed in such a way that both monoid and free monoid are applicable.

**Definition 2.** *By automaton, we mean a structure* A = (*I*, *S*, *δ*) *such that I* = ∅ *is a free monoid, S* = ∅*, and δ* : *I* × *S* → *S satisfies the following condition:*


*The set I is called the input set or input alphabet, the set S is called the state set, and the mapping δ is called next-state or transition function.*

**Remark 1.** *Condition 1 is often called the unit condition (UC) while condition 2 is often called the Mixed Associativity Condition (MAC).*

Notice that, in our paper, we write "*xy*" instead of "*x* · *y*". However, in order to stress the difference between concatenation and arbitrary operation, we write "*x* · *y*" in Definition 3. For a deeper insight including historical perspective and terminology issues (e.g., "quasi-automaton" vs. "semiautomaton"), see [16].

**Definition 3.** *By quasi-automaton, we mean a structure* A = (*I*, *S*, *δ*) *such that I* = ∅ *is a monoid, S* = ∅*, and δ* : *I* × *S* → *S satisfies the following condition:*


*The set I is called the input set or input alphabet, the set S is called the state set, and the mapping δ is called next-state or transition function.*

The following definition is a standard introductory definition of the theory of hypercompositional structures (or algebraic hyperstructures as they are also known).

**Definition 4.** *A hypergroupoid is a pair* (*H*, ∗)*, where H is a nonempty set and the mapping* ∗ : *H* × *H* −→ P∗(*H*) *is a binary hyperoperation (or hypercomposition) on H (here,* P∗(*H*) *denotes the system of all nonempty subsets of H). If a* ∗ (*b* ∗ *c*)=(*a* ∗ *b*) ∗ *c holds for all a*, *b*, *c* ∈ *H, then* (*H*, ∗) *is called a semi-hypergroup. Moreover, if the reproduction axiom—i.e., relation a* ∗ *H* = *H* = *H* ∗ *a for all a* ∈ *H—is satisfied, then the semi-hypergroup* (*H*, ∗) *is called hypergroup.*

The following definition transfers the concept of quasi-automaton into the theory of hypercompositional structures.

**Definition 5.** *[15] A quasi–multiautomaton is a triad* MA = (*H*, *S*, *δ*)*, where* (*H*, ∗) *is a semihypergroup, S is a nonempty set and δ* : *H* × *S* → *S is a transition function satisfying the following condition:*

$$
\delta(b, \delta(a, s)) \in \delta(a \ast b, \text{ s}) \text{ for all } a, b \in H, \text{ s} \in \text{S}.\tag{1}
$$

*The semi-hypergroup* (*H*, ∗) *is called the input semi-hypergroup of the quasi–multiautomaton* A *(H alone is called the input set or input alphabet), the set S is called the state set of the quasi– multiautomaton* A*, and δ is called next-state or transition function. Elements of the set S are called states; elements of the set H are called input symbols or letters. Condition (1) is called Generalized Mixed Associativity Condition (abbr. as GMAC).*

Finally, we recall the notion of nondeterministic automaton.

**Definition 6.** *If, in Definition 1, we have δ* : *A* × *S* −→ P(*S*) *instead of δ* : *A* × *S* −→ *S, then the 5-tuple* (*A*, *S*,*s*0, *δ*, *F*) *is called nondeterministic automaton.*

#### **3. GMAC Condition in the Definition of Quasi-Multiautomata**

This section aims at facilitating verifications of the GMAC condition. When doing so, we use ideas included in [1], where the notion of *order* of a state is defined in the context of deterministic automata of Definition 1. Notice that in [1], the term *word length*—meaning the number of concatenated input symbols—is used. For example, if we consider the word *aaabba* on the set *a*, *b*, then its length is 6.

**Definition 7.** *[1] The order of a state s* ∈ *S of the deterministic automaton in Definition 2, denoted by ord s, is the minimum of the lengths of words that lead from the start state s*<sup>0</sup> *to s.*

**Example 1.** *Consider an automaton as defined in Definition 1. Now, let s*<sup>0</sup> *be the initial state and s*<sup>5</sup> *the final state. The input alphabet is a free monoid over the set* {*a*, *b*}*. It is clear from Figure 1 that ord s*<sup>0</sup> = 0*, ord s*<sup>1</sup> = *ord s*<sup>2</sup> = 1*, ord s*<sup>3</sup> = *ord s*<sup>4</sup> = 2*, and ord s*<sup>5</sup> = 3*.*

**Figure 1.** Finite quasi-automaton.

Obviously, the order of a state is related to the operation of concatenation of words. Thus, in Example 1, we have that *ord s*<sup>3</sup> = 2 because the shortest word taking us from *s*<sup>0</sup> to *s*<sup>3</sup> is *aa*. However, if we generalize the concatenation operation to an arbitrary associative operation, i.e., move to Definition 3, we have that *a* · *a* is an element of *I* (say *a*). Thus, the "length of the word" becomes either 1 or 0 depending on whether the element is or is not isolated. The situation becomes even more complicated for quasi-multiautomata of Definition 5.

However, in both cases, we observe a discrepancy when transferring the intuitive notion of order tailored to the classical case of deterministic automata to quasi-automata or quasi-multiautomata of Definitions 3 and 5. The reason for such a discrepancy lies in the visualization of the algebraic concept by graphs and the fact that we no longer distinguish between start and end states. Therefore, further on, we will focus on the "descriptions of graphs" by "counting arrows" rather than attempts to stress the algebraic part of the notion. As a result, we cannot use the notion of *order* (based on *word length*) anymore (because, technically speaking, there are no words anymore). Notice that the forthcoming definitions once again enable us to "count arrows" of the graphs.

**Definition 8.** *By the transition number of states s*, *t* ∈ *S (in this order), denoted by tn*(*s*, *t*)*, we mean the smallest number of transitions that take us from the state s to the state t.*

It is easy to see that in Figure 1, *tn*(*s*0,*s*5) = 2. Indeed, applying input *b* takes us from *s*<sup>0</sup> to *s*2; then, applying input *a* takes us from *s*<sup>2</sup> to *s*5, which means that the smallest number of transitions that take us from *s*<sup>0</sup> to *s*<sup>5</sup> is 2.

Notice that, from Definition 8, it does not follow that *tn*(*s*, *t*) = *tn*(*t*,*s*). This is evident in Figure 2, where *tn*(*s*1,*s*3) = 2 while *tn*(*s*3,*s*1) = 1. Next, if there is no input that would take us from one state to another, we say that the respective transition number is 0. An example is depicted in Figure 1, where *tn*(*s*3,*s*1) = 0.

**Figure 2.** Noncommutativity of the order of two states.

Before introducing Theorem 1, recall the definition of a reversible automaton from [5].

**Definition 9.** *An automaton* A = (*A*, *S*, *δ*) *is called reversible, if for every state s* ∈ *S and every input a* ∈ *A (or word a* ∈ *A*∗*) there exists an input b* ∈ *A (or a word b* ∈ *A*∗*) such that δ*(*b*, *δ*(*a*,*s*)) = *s (or δ*(*ab*,*s*) = *s).*

Now, we generalize the notion to the case of quasi-multiautomata.

**Definition 10.** *A quasi-multiautomaton* MA = (*H*, *S*, *δ*) *is called reversible, if for every state s* ∈ *S and every input a* ∈ *H there exists an input b* ∈ *H such that δ*(*b*, *δ*(*a*,*s*)) = *s.*

**Remark 2.** *Notice that in every reversible quasi-multiautomaton there is tn*(*s*, *t*) = *tn*(*t*,*s*) *for all s*, *t* ∈ *S.*

To fully clarify the above notion and its application to quasi-multiautomata, we present the following example, in which two multiautomata are given. The first one is not reversible while the second one, with a modified input set, is.

**Example 2.** *Consider the interval of real numbers I*<sup>1</sup> = [1, ∞) *and the hyperoperation* ◦<sup>1</sup> : *I*<sup>1</sup> × *I*<sup>1</sup> → P∗(*I*1) *defined by*

$$a \diamond b = \{c \in I, c \ge a \cdot b\}, \\ \text{for all } a, b \in I\_1.$$

*It is obvious that the associative law holds. Therefore, the structure* (*I*1, ◦1) *is a semihypergroup. Then, the triad* ((*I*1, ◦1), R<sup>+</sup> \ {0}, *δ*1)*, where the transition function δ*<sup>1</sup> : *I*<sup>1</sup> × R<sup>+</sup> \ {0} → R<sup>+</sup> \ {0} *is defined by*

$$
\delta(a, r) = a \cdot r \,\text{for all } a \in I\_1, r \in \mathbb{R}^+ \,\text{ }\{0\}.
$$

*which is a quasi-multiautomaton. Now, for input a* = 5.2 *and state r* = 10*, we have δ*1(5.2, 20) = 104*. Thus, the quasi-multiautomaton is not reversible, because there is no input b such that δ*1(*b*, 104) = 5.2*.*

*Now, consider the interval I*<sup>2</sup> = (0, ∞) *instead and the hyperoperation "*◦2*" defined in the same way as "*◦1*". For the transition function δ*2*, defined in the same way as δ*1*, the triad* ((*I*2, ◦2), R<sup>+</sup> \ {0}, *δ*2) *is a reversible quasi-multiautomaton because, for each input symbol a, there exists an input symbol* <sup>1</sup> *<sup>a</sup> such that δ*<sup>2</sup> 1 *<sup>a</sup>* , *δ*2(*a*,*r*) = *r.*

At this point, using the notion of a reversible quasi-multiautomaton and the transition number of two states, we can provide the following theorem regarding the validity of the GMAC condition 1.

**Theorem 1.** *In every reversible quasi-multiautomaton* (*H*, *S*, *δ*)*, there is tn*(*s*, *t*) = *tn*(*t*,*s*) = 1 *for every two states s*, *t* ∈ *S.*

**Proof.** Recall that the GMAC condition (1) is *δ*(*b*, *δ*(*a*,*s*)) ∈ *δ*(*a* ∗ *b*,*s*) for all inputs and states. In a reversible quasi-multiautomaton, there is *tn*(*s*, *t*) = *tn*(*t*,*s*) for all *s*, *t* ∈ *S*. Suppose that there exists at least one pair of states (*t*,*s*) ∈ *S*, such that *tn*(*t*,*s*) = 2—i.e., from the state *t* we can reach the state *s* after application of at least two inputs. Denote such inputs as *a*, *b* ∈ *H*. Therefore, on the left-hand side of the condition GMAC, we have *δ*(*a*, *δ*(*b*, *t*)) = *r*. However, on the right-hand side, for all *c* ∈ *a* ∗ *b*, we never obtain the state *r*, because this would mean that *tn*(*t*,*s*) = 1, which would be a contradiction to the assumption that *tn*(*t*,*s*) = 2. Naturally, the same is true for transition numbers greater than 2.

In the following example, we show that the implication in Theorem 1 cannot be reversed, i.e., it is not true that if for every two states there is *tn*(*s*, *t*) = *tn*(*t*,*s*) = 1, we obtain a reversible quasi-multiautomaton (or a quasi-multiautomaton).

**Example 3.** *Consider the structure* (*H*, *S*, *δ*)*. In this structure, we show that there is a path between each two states, yet the GMAC condition does not hold, i.e., from the fact that tn*(*s*, *t*) = 1 *for all s*, *t* ∈ *S, it cannot be deduced that* (*H*, *S*, *δ*) *is a quasi-multiautomaton. Consider the set*

*H* = {*h*1, *h*2}*, the hyperoperation "*◦*" defined by the following Figure 3, and the transition function δ defined by the transition diagram in Figure 4.*

**Figure 3.** Definition of hyperoperation "◦".

**Figure 4.** Transition number of every pair of states is 1, yet, GMAC does not hold.

*It is clear from the transition diagram that for each pair of states r*,*s* ∈ *S there is tn*(*r*,*s*) = 1*. However, the GMAC condition does not hold. Indeed, on the left-hand side, we have δ*(*h*2, *δ*(*h*1,*r*)) = *δ*(*h*1, *t*) = *r while on the right-hand side, we have δ*(*h*<sup>1</sup> ◦ *h*2,*r*) = *δ*(*h*1,*r*) ∪ *δ*(*h*2,*r*) = {*s*, *t*} *and obviously the left-hand side is not included in the right-hand side.*

Notice that the above example also shows that the validity of the GMAC condition depends on the transition function as well as on the definition of the hyperoperation.

**Theorem 2.** *If in a quasi-multiautomaton* ((*H*, ∗), *S*, *δ*) *there is tn*(*r*,*s*) = 1 *and tn*(*s*, *t*) = 1 *for some r*,*s*, *t* ∈ *S, then there is tn*(*r*, *t*) = 1*.*

**Proof.** Suppose that there is *tn*(*r*,*s*) = 1 and also *tn*(*s*, *t*) = 1 for some *r*,*s*, *t* ∈ *S*. Then, there exists such an input *i* ∈ *H* for which there is *δ*(*i*,*r*) = *s*, and also an input *j* ∈ *H* for which there is *δ*(*j*,*s*) = *t*. Since the GMAC condition holds, i.e., the state *t* = *δ*(*j*, *δ*(*i*,*r*)) is included in the right-hand side *δ*(*i* ∗ *j*,*r*) = *c*∈*i*∗*j δ*(*c*,*r*), there is an input *k* ∈ *i* ∗ *j*, where

 *c*∈*i*∗*j δ*(*c*,*r*) *δ*(*k*,*r*) = *t*. Thus, there must be *tn*(*r*, *t*) = 1.

In the following Example 4, we present a trivial quasi-multiautomaton, where the order of each pair of states is 1. The nontrivial quasi-multiautomaton is presented in Example 5.

**Example 4.** *Consider a quasi-multiautomaton, which was first presented in Example 5 of [16]. By coincidence, the order of each pair of states is* 1*, i.e., Theorem 2 holds for an arbitrary triad of elements.*

One can see that in the automaton with a free monoid, in the MAC condition of Definition 2, we have links in the sequence of states that coincide with the "links" of strings, i.e., concatenation. In other words, in order to reach a given state, the automaton passes through the same states regardless of whether we regard the left- or the right-hand side of the MAC condition of Definition 2. However, this is not the case for the quasimultiautomaton, where the GMAC condition suggests that there must exist a shorter, or more efficient input that enables us to reach the same state as when applying two different catenated inputs. Indeed, in Figure 5, we can get from *b*<sup>1</sup> to *b*<sup>2</sup> and from *b*<sup>2</sup> to *b*<sup>3</sup> or directly from *b*<sup>1</sup> to *b*3. Notice that without the input *e*<sup>4</sup> applied to *b*1, the GMAC condition would not hold.

**Figure 5.** A quasi-multiautomaton where the transition number of each pair of states is 1.

**Example 5.** *In this example, we summarize our above considerations and also explain why Theorems 1 and 2 cannot be given as one even though they are semantically similar. In order to maintain clarity, the quasi-multiautomaton in Figure 6 does not have evaluated transitions. However, it is evident that the inputs could be easily supplemented as in Example 4. For this quasi-multiautomaton, it is obvious that Theorem 2 applies. Furthermore, it is obvious that the multi-automaton in Figure 6 is not reversible because there are no arrows in the opposite direction in the transition diagram—i.e., from the state s*1*, we go to the state s*2*, but from the state s*<sup>2</sup> *it is not possible go to s*1*. If we considered bidirectional arrows in Figure 6, the quasi-multiautomaton would be reversible. In such a case, we would be able to get from state s*<sup>2</sup> *to state s*<sup>4</sup> *via state s*1*, which corresponds to the left side of the GMAC condition. This must be met, so we must go directly from the state s*<sup>2</sup> *to the state s*4*.*

**Figure 6.** A quasi-multiautomaton that is not reversible.

Another indicator that would help to decide whether the GMAC condition is met or not are identities (neutral elements) of the input hyperstructure. Recall that by an *identity* of a semi-hypergroup (*H*, ∗), we mean such an element *e* ∈ *H* that there is *x* ∈ *x* ◦ *e* ∩ *e* ◦ *x* for all *x* ∈ *H*. Although, in the definition of the quasi-multiautomaton, the UC condition of Definition 2 is not required, it does not mean that no elements fulfilling it exist. If they do, they are identities of the input semi-hypergroup.

**Theorem 3.** *If in the quasi-multiautomaton* ((*H*, ∗), *S*, *δ*) *there exists an element e* ∈ *H with the property δ*(*e*,*s*) = *s for all s* ∈ *S, then there is a* ∈ *a* ∗ *e* ∩ *e* ∗ *a for all a* ∈ *H—i.e., e is an identity of* (*H*, ∗)*.*

**Proof.** Suppose that there is *δ*(*e*,*s*) = *s* for some *e* ∈ *H* and all *s* ∈ *S* and that the GMAC condition *δ*(*a*, *δ*(*b*,*s*)) ∈ *δ*(*a* ∗ *b*,*s*) is satisfied for all *a*, *b* ∈ *H* and for all *s* ∈ *S*.

For an element *e* ∈ *H*, and arbitrary *a* ∈ *H* and *s* ∈ *S*, we have

$$
\begin{array}{ccc}
\delta(a,\delta(\varepsilon,\mathsf{s})) \in \delta(a\*\varepsilon,\mathsf{s}) & \wedge & \delta(\varepsilon,\delta(a,\mathsf{s})) \in \delta(\varepsilon\*a,\mathsf{s}) \\
\delta(a,\mathsf{s})) \in \delta(a\*\varepsilon,\mathsf{s}) & \wedge & \delta(a,\mathsf{s})) \in \delta(\varepsilon\*a,\mathsf{s}) \\
\delta(a,\mathsf{s})) \in \bigcup\_{\mathsf{c}\in\mathsf{a}\ast\mathsf{c}}\delta(\mathsf{c},\mathsf{s}) & \wedge & \delta(a,\mathsf{s})) \in \bigcup\_{d\in\mathsf{c}\ast a}\delta(d,\mathsf{s}).
\end{array}
$$

It is obvious that the state *δ*(*a*,*s*) belongs to the set of states on the right-hand side if and only if *a* ∈ *a* ∗ *e* ∧ *a* ∈ *e* ∗ *a*, i.e., *a* ∈ *a* ∗ *e* ∩ *a* ∈ *e* ∗ *a*, for all *a* ∈ *H*.

When the Cartesian composition of two quasi-multiautomata was constructed in [17], the necessary condition of Theorem 1 was not satisfied. As a result, the GMAC condition was not satisfied. The authors solved the problem by modifying the condition by adding an extension to its right-hand side. Notice that the Cartesian composition of two automata were introduced by Dörfler in [20], the composition was subsequently generalized to the case of quasi-multiautomata in [17].

We conclude this section with the definition of products of automata introduced by Dörfler.

**Definition 11.** *[21] Let* A<sup>1</sup> = (*I*, *S*, *δ*)*,* A<sup>2</sup> = (*I*, *R*, *τ*)*, and* B = (*J*, *T*, *σ*) *be quasi-automata. By the homogeneous product* A<sup>1</sup> × A2*, we mean the quasi-automaton* (*I*, *S* × *R*, *δ* × *τ*)*, where δ* × *τ* : *I* × (*S* × *R*) → *S* × *R is a mapping satisfying, for all s* ∈ *S*,*r* ∈ *R*, *a* ∈ *H,* (*δ* × *τ*)(*a*,(*s*,*r*)) = (*δ*1(*a*,*s*), *τ*(*a*,*r*))*, while the heterogeneous product* A<sup>1</sup> ⊗ B *is the quasi-automaton* (*I* × *J*, *S* × *T*, *δ* ⊗ *σ*)*, where δ* ⊗ *τ* : (*I* × *J*) × (*S* × *T*) → *S* × *T is a mapping satisfying, for all a* ∈ *I*, *b* ∈ *J*,*s* ∈ *S*, *t* ∈ *T, δ* ⊗ *σ*((*a*, *b*),(*s*, *t*)) = (*δ*(*a*,*s*), *σ*(*b*, *t*))*. For I*, *J disjoint, by* A · B*, we denote the Cartesian composition of* A *and* B*, i.e., the quasi-automaton* (*I* ∪ *J*, *S* × *T*, *δ* · *σ*)*, where δ* · *σ* : (*I* ∪ *J*) × (*S* × *T*) → *S* × *T is defined, for all x* ∈ *I* ∪ *J, s* ∈ *S, and t* ∈ *T, by*

$$(\delta \cdot \sigma)(\mathfrak{x}, (\mathfrak{s}, t)) = \begin{cases} (\delta(\mathfrak{x}, \mathfrak{s}), t) & \text{if } \mathfrak{x} \in I, \\ (\mathfrak{s}, \sigma(\mathfrak{x}, t)) & \text{if } \mathfrak{x} \in J. \end{cases}$$

Generalizing the homogeneous or heterogeneous products of quasi-automata to the case of quasi-multiautomata is straightforward because, in these two cases, the condition used in Theorem 2 holds. However, in the case of the Cartesian composition, the situation is different. Since in the definition of the Cartesian composition the state set is created as the Cartesian product of the state set of the respective quasi-multiautomata, it is obvious from Figure 7 that the necessary condition *tn*(*r*, *t*) = 1 is not satisfied in the resulting quasi-multiautomaton, as there is no direct path from state (*s*0, *t*0) to state (*s*1, *t*1) because the respective input elements can affect one component only. For a deeper insight into this issue, we refer the reader to Example 1 in [17], the proof of Theorem 2 in [22], or Example 4 in [16], where the GMAC condition is not satisfied anywhere and we consider modified GMAC conditions, called E-GMAC.

**Figure 7.** Cartesian product of state sets.

#### **4. Nondeterministic Quasi-Multiautomata**

First of all, we provide an example of a nondeterministic automaton.

**Example 6.** *Consider a nondeterministic finite automaton depicted in Figure 8. For input a applied to the state s*<sup>0</sup> *there is a transition to s*1*, or the automaton can remain in the state s*0*. As a result, the machine must "decide" how to behave. The same situation applies to the input b and the state s*1*. Nondeterminism means ambiguity—from a given state, more transitions can lead to the same symbol. A nondeterministic automaton always chooses (sometimes we also say "guess") the transition that will lead to accepting the word—if that is possible. If we insert the word aba into the automaton in Figure 8, then it has the following options for dealing with it:*

$$\begin{aligned} \mathsf{s\_0} &\longrightarrow \mathsf{s\_0} \longrightarrow \mathsf{s\_0} \longrightarrow \mathsf{s\_0}, \\ \mathsf{s\_0} &\longrightarrow \mathsf{s\_1} \longrightarrow \mathsf{s\_3} \longrightarrow \mathsf{s\_3}, \\ \mathsf{s\_0} &\longrightarrow \mathsf{s\_1} \longrightarrow \mathsf{s\_2} \longrightarrow \mathsf{s\_3}, \end{aligned}$$

*In the first case, the automaton will remain in the state of s*0*; it certainly can because the rules of transition allow this. In the second case, the automaton moves to other states and eventually reaches s*3*, which is the final one. The third case has the same final state. In the second and third cases, the automaton accepts the word. Notice that a nondeterministic automaton always automatically selects the branch in which it accepts a word, if such a branch exists.*

**Figure 8.** Nondeterministic automaton.

The following definition transfers the notion of nondeterministic automaton from the context of automata to the context of quasi-multiautomata.

**Definition 12.** *By nondeterministic quasi-multiautomaton (denoted by <sup>N</sup>*MA*), we mean a triad <sup>N</sup>*MA = (C(*H*), *S*, *δ*)*, where* (*H*, ∗) *is a semi-hypergroup, S is a nonempty set, and δ* : C(*H*) × *S* → P(*S*)*, where* C(*H*) ⊆ P∗(*H*) *is a transition function satisfying the following condition:*

$$
\delta(B, \delta(A, s)) \subseteq \delta(A \ast B, s) \text{ for all } A, B \in \mathcal{C}(H), \text{ } s \in S. \tag{2}
$$

**Notation 1.** *We will call the condition (2) big-GMAC.*

In Figure 9, we can see the basic concepts of deterministic quasi-automata, i.e., automaton with the free monoid, automaton with a monoid, and quasi-multiautomaton.

**Figure 9.** Deterministic automaton.

In the case of an *automaton with a free monoid*, if we apply the string *adf* to *s*<sup>0</sup> then *δ*(*adf* ,*s*0) = *s*3, and the string *ij* to *s*3, we reach the state *s*6. This is the same as applying *adfij* directly to *s*0.

In the case of an *automaton with a monoid*, if we apply the input (character) *b* to the state *s*0, we reach the state *s*4, where we apply *g*, which gets us to the state *s*3. In order for the MAC condition to hold, there must exist an input (character) by which the automaton goes directly from *s*<sup>0</sup> to *s*3. In our case, such an input (character) is *c* (on condition that *b* · *g* is defined as *c*).

The case of a *quasi-multiautomaton* is similar with the difference that there must be *c* ∈ *b* ∗ *g*. Therefore, in Theorem 1, this is only a necessary condition, as it does not take into account the fact that *c* ∈ *b* ∗ *g*.

While in nondeterministic finite automata of the formal language theory nondeterminism occurs in the transition function, i.e., after we apply one input we can reach multiple

states (see Figure 8), nondeterministic quasi-multiautomata of Definition 12 provide nondeterminism for the input set and leave the transition function single-valued.

In Figure 10, we consider the *minimal extensive hyperoperation*, where, for all *a*, *b*, there is *a* ◦ *b* = {*a*, *b*}. Using Definition 6, we regard the element of the potent set, which we—by means of the transition function—apply on a state. Thus, in Figure 10, we apply on *s*<sup>0</sup> the input in the form of the hypercomposition (hyperproduct) *e* ∗ *f* , which takes us to two states: *s*<sup>3</sup> and *s*6. Thus, we obtain a similar result to that after application of input *a* to *s*<sup>0</sup> in Figure 8.

**Figure 10.** Nondeterministic quasi-multiautomaton.

d

Now, consider input *e* ∗ *f* = {*e*, *f* } applied on state *s*<sup>0</sup> in Figure 10. Application of condition (2) brings *<sup>N</sup>*MA into two states: *s*<sup>3</sup> and *s*6. If we apply *c* ∗ *d* = {*c*, *d*} on each of these two states, *<sup>N</sup>*MA turns into states *s*4,*s*5,*s*6, which are the results of the left-hand side of the GMAC condition. On the right-hand side of this condition, we first evaluate {*e*, *f* }∗{*c*, *d*} = {*e*, *f* , *c*, *d*}, which takes us to the set of states {*s*3,*s*4,*s*5,*s*6}. Obviously, the set of states on the left-hand side is the subset of the set of states on the right-hand side of GMAC.
