**5. Quasi-Multiautomata with the Input Semi-Hypergroup Based on Concatenation**

In this section, inspired by [23], we present the construction of a quasi-multiautomata, in which the input semi-hypergroup is based on the original concatenation operation, as is the case of the classical concept of automata. For this type of construction, the necessary condition of Theorem 2, *tn*(*r*,*s*) = 1 for all *r*,*s* ∈ *S*, is not required.

First, we recall the necessary concepts from the theory of formal languages. *String length* |*x*| is the total number of symbols in the string *x*. A *substring* of a string is a sequence of symbols that is contained in the original string—i.e., if *x* and *y* are strings, then *x* is a substring of *y* if there exist strings *z*, *z* such that *zxz* = *y*. *Prefix* of the string *a*, denoted by *pre f*(*a*), is such a substring of the string *a* that there exists a substring *z* of *a* (which can be empty, however) such that *pre f*(*a*)*z* = *a*. *Suffix* of the string *b*, denoted *suf*(*b*), is such a substring of the string *b* that there exists a substring *z* of *a* (which can be empty, however) where *zsuf*(*a*) = *a*. The set of all prefixes of the string *x* will be denoted *Spre f*(*x*); the empty word will be denoted by *ε* (see also notation used for binary trees in [24]).

Now, denote *H*<sup>∗</sup> as the set of all strings over the set of symbol *H* and define a hyperoperation -: *H*<sup>∗</sup> × *H*<sup>∗</sup> −→ P∗(*H*∗) by

$$\forall x \star y = \left\{ ab \in H^\* \mid a \in \mathcal{S}\_{pref}(x), b \in \mathcal{S}\_{pref}(y) \right\} \tag{3}$$

In other words, *x y* is in fact a set of all mutual concatenations of prefixes of *x* and *y*.

**Example 7.** *Consider set M* = {0, 1, 2} *and the set M*<sup>∗</sup> *of all strings over M. Further, consider strings a*, *b* ∈ *M*∗*, where a* = 1010 *and b* = 22*. For these, we have*

$$S\_{pref}(a) = \{\varepsilon, 1, 10, 101, 1010\} \quad \text{and} \quad S\_{pref}(b) = \{\varepsilon, 2, 22\}.$$

*Thus, we obtain*

*a b* = {*ε*, 2, 22, 1, 12, 122, 10, 102, 1022, 101, 1012, 10122, 1010, 10102, 101022}.

**Theorem 4.** *Let H*<sup>∗</sup> *by an arbitrary nonempty set of strings over H and let "*-*" be a defined by (3). Then,* (*H*∗, -) *is a hypergoup.*

**Proof.** First, we show that the associative law applies. For all strings *a*, *b*, *c* ∈ *H*∗, we have

(*a b*) *c* = *<sup>x</sup>*∈*Spre f* (*a*) *<sup>y</sup>*∈*Spre f* (*b*) *xy c* = *<sup>x</sup>*∈*Spre f* (*a*) *<sup>y</sup>*∈*Spre f* (*b*) *<sup>z</sup>*∈*Spre f* (*c*) *xyz* = *a* - *<sup>y</sup>*∈*Spre f* (*b*) *<sup>z</sup>*∈*Spre f* (*c*) *yz* = *a* - (*b c*).

The reproductive axiom holds automatically because "-" is extensive, i.e., *a*, *b* ∈ *a b* for all *a*, *b* ∈ *H*∗. Indeed, each set of prefixes contains an empty word and the original word, if we perform the concatenation operation of the empty string and the original string from the second set of prefixes, we obtain the original string. Thus, the structure (*H*∗, -) is a hypergoup.

In the following two examples, Examples 8 and 10, we use the above hypergroup as the input sets for two quasi-multiautomata. We will consider two types of transition function. In the first case, it has the role of a "pointer", i.e., it points to the follower of *s*0, which is the result of the transition *s*<sup>1</sup> = *δ*(*a*,*s*0). In this case, the transition function is usually specified by a table or a transition diagram as in Figure 4 and there is no formula or rule to calculate the transition. In the second case, the transition function has the form of an "operation", i.e., we obtain the new state by means of calculation (as in Example 2).

**Example 8.** *Consider the hypergroup* (*M*∗, -) *from Example 7 and the set of states T* = {*a*, *b*, *c*, *d*, ... , *m*}*. The transition function δ<sup>T</sup> is defined by means of the transition diagram in Figure 8. It is easy to verify that the structure* MA = ((*M*∗, -), *T*, *δT*) *is a multiautomaton satisfying the GMAC condition. In Figure 11, we use different colors to highlight the following: processing the input word* 1010*, i.e., δT*(1010, *a*)*, (blue); the left-hand side of GMAC δT*(22, *δT*(1010, *a*) *(blue and red); right-hand side of GMAC δT*(1010 -20, *a*) *(yellow).*

**Figure 11.** Quasi-multiautomaton based on a concatenation hypercomposition.

**Theorem 5.** *Let* (*H*∗, -) *be a hypergroup from Theorem 4 and S be a set of states. Then, it is possible to define a transition function δ such that* ((*H*∗, -), *S*, *δ*) *is a quasi-multiautomaton.*

**Proof.** Proof of the condition GMAC is obvious from the presented scheme in Figure 8 and from the definition of hyperoperation, where for two strings *a* and *b*, there is *ab* ∈ *a b*. Indeed, suppose that *a* = *a*<sup>1</sup> ... *an*, *b*=*b*<sup>1</sup> ... *bn*. Then, the left-hand side of GMAC is

*δ*(*a*, *δ*(*b*,*s*)) = *δ*(*a*<sup>1</sup> ... *an*, *δ*(*b*<sup>1</sup> ... *bn*,*s*)) = *δ*(*an*, *δ*(*an*−1,... *δ*(*a*1, *δ*(*bn*, *δ*(*bn*<sup>−</sup>1,...*δ*(*b*1,*s*))))))

while on the right-hand side, we have

$$\delta(b\*a,s) = \delta(b\_1,s) \cup \delta(b\_1a\_1,s) \cup \delta(b\_1a\_2,s) \cup \dots \cup \delta(b\_1b\_2a\_1,s) \cup \delta(b\_1b\_2a\_1a\_2,s) \cup \dots \cup \delta(b\_1\dots b\_{\bar{n}}a\_{\bar{1}}\dots a\_{\bar{n}},s), \quad (\delta(b\_1\*a) = \delta(b\_1\*a) \cup \dots \cup b\_{\bar{n}}, \delta(b\_1\*a) \cup \dots \cup \delta(b\_{\bar{n}},a))$$

where the last term of the union is *δ*(*an*, *δ*(*an*−1, *δ*(*a*1, *δ*(*bn* ... , *δ*(*b*1,*s*)))))), which is the left-hand side of the GMAC condition.

Of course, the transition function cannot be arbitrary.

**Example 9.** *Consider a quasi-multiautomaton with the same input hyprergroup* (*M*∗, -)*. However, instead of the state set T, consider the set of all natural numbers* N*. Next, define the transition function δ<sup>O</sup>* : *M*<sup>∗</sup> × N −→ N *by*

$$
\delta\_O(a, r) = a \cdot r
$$

*for all a* ∈ *M*<sup>∗</sup> *and r* ∈ N*. We can afford to define the transition function δ in such a way because we treat numeric strings (*1010 *and* 2020 *below) as numbers. The GMAC condition is not satisfied in this case. Indeed,*

$$
\delta\_\bullet(22, \delta\_\bullet(1010, 2) = \delta\_\bullet(22, 2020) = 44440,
$$

*yet for the right-hand side of GMAC—i.e., δO*(1010 - 22, 2)*—we require the string* 22220 *to belong to* 1010 - 22*. Yet, we could see in Example 7 that* 22220 /∈ 1010 -22*.*

Next, we will use the construction of a multiautomaton of Theorem 5 and construct a nondeterministic quasi-multiautomaton of Definition 12. There, the element of the power set will be used as the input word, which we will obtain as a result of two elements (strings) *a*, *b* ∈ *H*∗. In this context, on the right-side of the GMAC condition, the hypercomposition of two sets will be required. It is therefore desirable to first prove the following lemma.

**Lemma 1.** *In the hypergroup* (*H*∗, -)*, where "*-*" is defined by (3), there is Spre f*(*a b*) = *a b for all a*, *b* ∈ *H*∗*.*

**Proof.** Obviously, there is *Spre f*(*x y*) = *z*∈*xy Spre f*(*z*). Moreover, it is obvious that *x* ∈ *a b* implies that *x* ∈ *Spre f*(*a b*). Proving the other inclusion is also simple. Indeed, the fact that *x* ∈ *Spre f*(*a b*) = *c*∈*ab Spre f*(*c*) implies that there exist words *y*, *z* ∈ *H*<sup>∗</sup> such that *x* = *yz*, where *y* ∈ *Spre f*(*a*), *z* ∈ *Spre f*(*b*). Yet, this means that *x* ∈ *a b*.

**Example 10.** *Consider the quasi-multiautomaton* MA = ((*M*∗, -), *T*, *δT*) *from Example 8 and sets A* = *a b and C* = *c d, where a*, *b*, *c*, *d* ∈ *M*∗*. For a* = 1010, *b* = 22, *c* = 1, *d* = *ε, we have A* = {*ε*, 2, 22, 1, 12, 122, 10, 102, 1022, 101, 1012, 10122, 1010, 10102, 101022} *(see Example 7) and B* = {*ε*, 1}*. Proving that* MA *is a nondeterministic quasi-multiautomaton is rather difficult because one needs to show validity of big-GMAC (2) for all states and inputs. However, we outline the idea of the proof for our specific choice of states and inputs.*

*We need to show that there is δ*(*B*, *δ*(*A*, *a*)) ⊆ *δ*(*A* - *B*, *a*)*. From the transition diagram, we calculate the left-hand side of big-GMAC (2):*

$$\delta(B, \delta(A, a)) = \delta(B, \{a, b, d, f, \mathbf{g}, j, k, l, m\}) = \{a, b, d, e, f, \mathbf{g}, i, j, k, l, m\} \tag{4}$$

*Before calculating the right-hand side, we first establish A* - *B. This is quite easy (given the specific choice of the set B and Lemma 1):*

*A* - *B* = {*ε*, 1, 2, 10, 12, 22, 101, 102, 122, 1010, 1012, 1022, 10102, 10122, 101022}∪ {*ε*, 11, 21, 101, 121, 221, 1011, 1021, 1221, 10101, 10121, 10221, 101021, 101221, 1010221} = {*ε*, 1, 2, 10, 11, 12, 21, 22, 101, 102, 121, 122, 221, 1010, 1011, 1012, 1021, 1022, 1221, 10101, 10102, 10121, 10221, 101021, 101221, 101022, 1010221}

*Now, again using the transition diagram, we compute*

$$\delta(A \star B, a)) = \{a, b, d, e, f, g, i, j, k, l, m\},\tag{5}$$

*and we can see that δ*(*B*, *δ*(*A*, *a*)) ⊆ *δ*(*A* - *B*, *a*) *; in this case, even δ*(*B*, *δ*(*A*, *a*)) = *δ*(*A* -*B*, *a*)*.*

**Lemma 2.** *A set H* ⊆ *H*<sup>∗</sup> *is reflexive in a hypergroup* (*H*∗, -)*.*

**Proof.** Reflexivity of a subset *H* of *H*∗, where (*H*∗, ∗) is a hypergroupoid, is defined by validity of implication *x y* ∩ *A* = ∅ ⇒ *y x* ∩ *A* = ∅ for all *x*, *y* ∈ *H*∗.

Suppose that *x* = *a*<sup>1</sup> ... *an* and *y* = *b*<sup>1</sup> ... *bm*, where *ai*, *bj* ∈ *H* for all *i* ∈ {1, ... , *n*} and *j* ∈ {1, ... , *m*}. Obviously, *a*<sup>1</sup> ∈ *Spre f*(*x*) and *b*<sup>1</sup> ∈ *Spre f*(*y*). Next, thanks to the fact that ∈ *H*∗, there is *Spre f*(*x*) ⊆ *x y* and *Spre f*(*y*) ⊆ *x y*. Even though "-" is not commutative, there is *Spre f*(*x*) ⊆ *y x* and *Spre f*(*y*) ⊆ *y x*. Thus, we have the two-element sets {*a*1, *b*1} = *x y* ∩ *H* and {*a*1, *b*1} = *y x* ∩ *H*.

In the end of this section, we are going to discuss nondeterminism, which is caused by the input structure as stated in Definition 12. In order to do so, we are going to use the hypergroup constructed using Theorem 4. We want to show that for such a structure, there exists a nondeterminism that is "controlled" due to the nature of the hyperoperation. (Recall that in the theory of formal languages, nondeterminism is caused by the transition function.) In order to do so, we are going to use the hypergroup constructed using Theorem 4. The following example shall thus be read within the context of Definition 12 and Theorem 4.

**Example 11.** *Regard a string a* = *a*<sup>1</sup> ... *an* ∈ *H*∗*. The transition function produces*

$$
\delta(a, r) = \delta(a\_1 \dots a\_n, r) = \delta(a\_n, \delta(a\_{n-1} \dots \delta(a\_1, r)).\tag{6}
$$

*If we now regard a nondeterministic quasi-multiautomaton, where the nondeterminism is provided in the input by hyperoperation* (3)*, the nondeterminism is "controlled" because from each state in the sequence followed by the automaton, there are at most two paths. Indeed, for a* = *a*<sup>1</sup> ... *an and b* = *b*<sup>1</sup> ... *bn, their hypercomposition is a set of strings, which are concatenations of prefixes of a and b. Thu,s e.g., at the second position (which of course exists), the symbol a*<sup>1</sup> *is followed by a*<sup>2</sup> *or b*1*. As Figure 12 suggests, this idea holds for all positions.*

Figure 12 shows that the first position of an arbitrary string from *a* ∗ *b* (which can be regarded as input) will be occupied by *a*<sup>1</sup> or *b*1, the second position by *a*<sup>2</sup> or *b*1, etc. Thus, given the input *a* ∗ *b*, the quasi-multiautomaton will pass at most 2*n* paths (where *a*1*b*<sup>1</sup> is included in *a*1*b*1*b*2, i.e., these two are counted as one path).

Showing that the big-GMAC condition holds for all strings *a* ∈ *H*<sup>∗</sup> such as in Figure 10, where the transition function is given by a diagram (or by a table yet not a rule) is complicated. There exists Light's associativity test invented by F. W. Light for testing whether a binary operation defined on a finite set is associative. Miyakawa, Rosenberg, and Tatsumi [25] generalized this test for semi-hypergroups. We are not aware of any such test for finite quasi-multiautomata with a transition diagram or table. Finding such tests might be our next objective and the subject of further research.

**Figure 12.** Scheme of possible concatenations of *a* = *a*1*a*2*a*3*a*<sup>4</sup> and *b* = *b*1*b*2*b*3.

#### **6. Discussion**

Currently, the combinations of algebraic multiautomata into higher entities, using various rules suggested by Dörfler [20,26], are studied—see, e.g., [27]. Such combinations seem to be suitable tools for modeling various real-life systems—see, e.g., [16,21,28]—or are even tools to control such systems [22]. However, two main problems appeared in this respect:


we construct quasi-multiautomata based on standard techniques of the theory of formal languages. In Section 4, we modify Definition 5 in such a way that quasimultiautomata will work nondeterministically. However, being aware of the fact that nondeterministic automata are of no real added value, our concept is designed to include a limited degree of nondeterminism only. Moreover, since this paper deals with the generalization of the automaton, the quasi-multiautomaton can be further generalized by considering *H* to be an arbitrary hypergroupoid. This enhances possibilities to create input hypercompositional structures reflecting needs of automata of the theory of formal languages. In other words, weakening requirements of the input structure provides us a wider range of choices to construct quasi-multiautomata based on concatenation. For example, consider that (*H*, ∗) is a hypergroupoid if *x* ∗ *y* = {*z*, *w*}, where *z* is formed by deleting the odd-positioned letters from the word *xy* and *w* is formed by deleting the even-positioned letters from the word *xy*. However, one needs to discuss the impact of losing associativity on GMAC, which is based on it. In Section 5, we show a construction of quasi-multiautomata, which corresponds to automata of the theory of formal languages and is based on the idea of concatenation of strings with associativity preserved. For quasi-automata, this is possible thanks to the free monoid. For quasi-multiautomata, i.e., structures making use of hypercompositional structures, we concatenate words for input. We present a specific example. However, thanks to the multivalued nature of the hypercomposition, a whole range of similar schemes might be thought of.
