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
the set of all finite sequences
,
, i.e., finite words made of symbols from
A. Moreover,
regards the usual binary operation of concatenation:
. With this,
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,
5,
6,
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 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,
11,
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 quasi-multiautomata because the transition function
used in Definition 5 of a quasi-multiautomaton maps to the state set
S instead of the set of its subsets
.
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 , where A is input alphabet, S is a finite nonempty set of states, is the initial (or start) state, is the state transition function, and is the set of final states. Sometimes it is convenient to use, instead of δ, the extended transition function , where is the set of words over the alphabet A, which is defined recursively as follows: - 1.
,
- 2.
where λ is the empty string,
- 3.
.
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 such that is a free monoid, , and satisfies the following condition:
- 1.
There exists an element such that for any state .
- 2.
for any pair and any state
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 “
” instead of “
”. However, in order to stress the difference between concatenation and arbitrary operation, we write “
” 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 such that is a monoid, , and satisfies the following condition:
- 1.
There exists an element such that for any state .
- 2.
for any pair and any state
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 , where H is a nonempty set and the mapping is a binary hyperoperation (or hypercomposition) on (here, denotes the system of all nonempty subsets of ). If holds for all , then is called a semi-hypergroup. Moreover, if the reproduction axiom—i.e., relation for all —is satisfied, then the semi-hypergroup 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 , where is a semi-hypergroup, S is a nonempty set and is a transition function satisfying the following condition: The semi-hypergroup is called the input semi-hypergroup of the quasi–multiautomaton (H alone is called the input set or input alphabet), the set S is called the state set of the quasi–multiautomaton , 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 instead of , then the 5-tuple 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
on the set
, then its length is 6.
Definition 7. [1] The order of a state of the deterministic automaton in Definition 2, denoted by , is the minimum of the lengths of words that lead from the start state to s. Example 1. Consider an automaton as defined in Definition 1. Now, let be the initial state and the final state. The input alphabet is a free monoid over the set . It is clear from Figure 1 that , , , and . Obviously, the order of a state is related to the operation of concatenation of words. Thus, in Example 1, we have that because the shortest word taking us from to is . However, if we generalize the concatenation operation to an arbitrary associative operation, i.e., move to Definition 3, we have that 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 (in this order), denoted by , 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,
. Indeed, applying input
b takes us from
to
; then, applying input
a takes us from
to
, which means that the smallest number of transitions that take us from
to
is 2.
Notice that, from Definition 8, it does not follow that
. This is evident in
Figure 2, where
while
. 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
.
Before introducing Theorem 1, recall the definition of a reversible automaton from [
5].
Definition 9. An automaton is called reversible, if for every state and every input (or word ) there exists an input (or a word ) such that (or ).
Now, we generalize the notion to the case of quasi-multiautomata.
Definition 10. A quasi-multiautomaton is called reversible, if for every state and every input there exists an input such that .
Remark 2. Notice that in every reversible quasi-multiautomaton there is for all .
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 and the hyperoperation defined by It is obvious that the associative law holds. Therefore, the structure is a semi-hypergroup. Then, the triad , where the transition function is defined bywhich is a quasi-multiautomaton. Now, for input and state , we have . Thus, the quasi-multiautomaton is not reversible, because there is no input b such that . Now, consider the interval instead and the hyperoperation “” defined in the same way as “”. For the transition function , defined in the same way as , the triad is a reversible quasi-multiautomaton because, for each input symbol a, there exists an input symbol such that .
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 , there is for every two states .
Proof. Recall that the GMAC condition (
1) is
for all inputs and states. In a reversible quasi-multiautomaton, there is
for all
. Suppose that there exists at least one pair of states
, such that
—i.e., from the state
t we can reach the state
s after application of at least two inputs. Denote such inputs as
. Therefore, on the left-hand side of the condition GMAC, we have
. However, on the right-hand side, for all
, we never obtain the state
r, because this would mean that
, which would be a contradiction to the assumption that
. 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 , we obtain a reversible quasi-multiautomaton (or a quasi-multiautomaton).
Example 3. Consider the structure . 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 for all , it cannot be deduced that is a quasi-multiautomaton. Consider the set , the hyperoperation “∘” defined by the following Figure 3, and the transition function δ defined by the transition diagram in Figure 4. It is clear from the transition diagram that for each pair of states there is . However, the GMAC condition does not hold. Indeed, on the left-hand side, we have while on the right-hand side, we have 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 there is and for some , then there is .
Proof. Suppose that there is and also for some . Then, there exists such an input for which there is , and also an input for which there is . Since the GMAC condition holds, i.e., the state is included in the right-hand side , there is an input , where . Thus, there must be . □
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 quasi-multiautomaton, 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
to
and from
to
or directly from
to
. Notice that without the input
applied to
, the GMAC condition would not hold.
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 , we go to the state , but from the state it is not possible go to . 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 to state via state , which corresponds to the left side of the GMAC condition. This must be met, so we must go directly from the state to the state . 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 , we mean such an element that there is for all . 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 there exists an element with the property for all , then there is for all —i.e., e is an identity of .
Proof. Suppose that there is for some and all and that the GMAC condition is satisfied for all and for all .
For an element
, and arbitrary
and
, we have
It is obvious that the state belongs to the set of states on the right-hand side if and only if , i.e., , for all . □
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 , , and be quasi-automata. By the homogeneous product , we mean the quasi-automaton , where is a mapping satisfying, for all , , while the heterogeneous product is the quasi-automaton , where is a mapping satisfying, for all , . For disjoint, by , we denote the Cartesian composition of and , i.e., the quasi-automaton , where is defined, for all , , and , by 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
is not satisfied in the resulting quasi-multiautomaton, as there is no direct path from state
to state
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.
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 there is a transition to , or the automaton can remain in the state . As a result, the machine must “decide” how to behave. The same situation applies to the input b and the state . 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 into the automaton in Figure 8, then it has the following options for dealing with it: In the first case, the automaton will remain in the state of ; it certainly can because the rules of transition allow this. In the second case, the automaton moves to other states and eventually reaches , 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.
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 ), we mean a triad , where is a semi-hypergroup, S is a nonempty set, and , where is a transition function satisfying the following condition: 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.
In the case of an automaton with a free monoid, if we apply the string to then , and the string to , we reach the state . This is the same as applying directly to .
In the case of an automaton with a monoid, if we apply the input (character) b to the state , we reach the state , where we apply g, which gets us to the state . In order for the MAC condition to hold, there must exist an input (character) by which the automaton goes directly from to . In our case, such an input (character) is c (on condition that is defined as c).
The case of a quasi-multiautomaton is similar with the difference that there must be . Therefore, in Theorem 1, this is only a necessary condition, as it does not take into account the fact that .
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
, there is
. 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
the input in the form of the hypercomposition (hyperproduct)
, which takes us to two states:
and
. Thus, we obtain a similar result to that after application of input
a to
in
Figure 8.
Now, consider input
applied on state
in
Figure 10. Application of condition (
2) brings
into two states:
and
. If we apply
on each of these two states,
turns into states
, which are the results of the left-hand side of the GMAC condition. On the right-hand side of this condition, we first evaluate
, which takes us to the set of states
. 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.
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,
for all
, is not required.
First, we recall the necessary concepts from the theory of formal languages.
String length 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
such that
.
Prefix of the string
a, denoted by
, is such a substring of the string
a that there exists a substring
z of
a (which can be empty, however) such that
.
Suffix of the string
b, denoted
, is such a substring of the string
b that there exists a substring
z of
a (which can be empty, however) where
. The set of all prefixes of the string
x will be denoted
; the empty word will be denoted by
(see also notation used for binary trees in [
24]).
Now, denote
as the set of all strings over the set of symbol
H and define a hyperoperation
by
In other words, is in fact a set of all mutual concatenations of prefixes of x and y.
Example 7. Consider set and the set of all strings over M. Further, consider strings , where and . For these, we have Theorem 4. Let by an arbitrary nonempty set of strings over H and let “⋆” be a defined by (3). Then, is a hypergoup. Proof. First, we show that the associative law applies. For all strings
, we have
The reproductive axiom holds automatically because “⋆” is extensive, i.e., for all . 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 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
, which is the result of the transition
. 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 from Example 7 and the set of states . The transition function is defined by means of the transition diagram in Figure 8. It is easy to verify that the structure 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., , (blue); the left-hand side of GMAC (blue and red); right-hand side of GMAC (yellow). Theorem 5. Let be a hypergroup from Theorem 4 and S be a set of states. Then, it is possible to define a transition function δ such that 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
. Indeed, suppose that
,
. Then, the left-hand side of GMAC is
while on the right-hand side, we have
where the last term of the union is
, 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 . However, instead of the state set T, consider the set of all natural numbers . Next, define the transition function byfor all and . 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,yet for the right-hand side of GMAC—i.e., —we require the string 22220
to belong to . Yet, we could see in Example 7 that . 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) . 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 , where “⋆” is defined by (3), there is for all . Proof. Obviously, there is . Moreover, it is obvious that implies that . Proving the other inclusion is also simple. Indeed, the fact that implies that there exist words such that , where , . Yet, this means that . □
Example 10. Consider the quasi-multiautomaton from Example 8 and sets and , where . For , we have (see Example 7) and . Proving that 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 . From the transition diagram, we calculate the left-hand side of big-GMAC (2): Before calculating the right-hand side, we first establish . This is quite easy (given the specific choice of the set B and Lemma 1):
Now, again using the transition diagram, we computeand we can see that ; in this case, even . Lemma 2. A set is reflexive in a hypergroup .
Proof. Reflexivity of a subset H of , where is a hypergroupoid, is defined by validity of implication for all .
Suppose that and , where for all and . Obviously, and . Next, thanks to the fact that , there is and . Even though “⋆” is not commutative, there is and . Thus, we have the two-element sets and . □
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 . The transition function produces 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 and , their hypercomposition is a set of strings, which are concatenations of prefixes of a and b. Thus, e.g., at the second position (which of course exists), the symbol is followed by or . As Figure 12 suggests, this idea holds for all positions. Figure 12 shows that the first position of an arbitrary string from
(which can be regarded as input) will be occupied by
or
, the second position by
or
, etc. Thus, given the input
, the quasi-multiautomaton will pass at most
paths (where
is included in
, i.e., these two are counted as one path).
Showing that the big-GMAC condition holds for all strings
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.