The complete finite automaton
B.F. Melnikov
Abstract—There is well-known, that for the description of a regular language, there are different complete invariants: not only well-known canonical automata, but also basis automata and universal automata. While constructing basis and universal automata, there is necessary to construct canonical automata for both a given regular language and its mirror image. In the process of such a construction, we get, among other objects, a special binary relation #, defined on the pairs of states of these two canonical automata. This relation is also an invariant (the incomplete one) for the given regular language. For each such binary relation, there is an entire subclass of the class of regular languages, that possesses it. Therefore, on the set of all regular languages, there is possible to define an (another) binary relation; it holds for some two languages, if and only if they have the same binary the relation #. It is obvious, that the binary relation defined in this way is the equivalence relation on the set of all regular languages. The question arises of the "most typical" language which is the element of such class equivalence with respect to the last relation. In this paper, we describe languages that can be considered as "typical elements", construct canonical finite automata for such languages, consider some of their properties. The main of these properties is the following: from such an automaton, using special transformations, we can obtain any canonical automaton whose language corresponds to the given binary relation #.
Keywords—regular languages, nondeterministic finite automata, invariants.
I. INTRODUCTION
There is well-known, that for the description of a regular language, there are different invariants: not only well-known canonical automata, but also basis automata ([1], [2], [3] etc.) and universal automata ([4], [5] etc.). More precisely, each of these invariants could be called a complete invariant.
In considering both the basis and universal automata (in our terminology, the last automaton for a given regular language L is more accurately called the automaton COM(L)), we need to construct canonical automata both for the given L and for its mirror image LR. In the process of such a construction, we get, among other things, a special binary relation given on the state pairs of these two canonical automata; according to our terminology, this is the relation #. Of course, this relation is also an invariant of the regular language (although, as elementary it is shown, it is not its complete invariant).
From the latter it follows that for every binary relation # (which is subject to some limitations, which, however, for this paper is unprincipled), there exists a whole subclass of the class of regular languages with this relation #. In addition, on the set of all regular languages one can define a binary relation (let R) that holds for some two languages if and only if (for some re-designation of the states of two finite automata for these languages) they get the same
Received September 14, 2017.
Boris F. Melnikov, Russian State Social University (email: [email protected]).
binary relation #; it is obvious that the binary relation R defined in this way on the set of all regular languages is an equivalence relation. Thus, the question arises of the "most typical" language, which could be called an representative of the equivalence class with respect to R.
In this paper, we describe languages that can be considered similar to the "typical representatives" of such equivalence classes. For this thing, we construct by it a canonical finite automaton depending on the given binary relation # (or according to a given defining table); in other words, we construct the regular language depending on it.
It is such an automaton (the complete one, denoted here by K#) is the main object of consideration in the paper. We consider detailed examples, some properties of the automaton K# and the language L# defined by it, and also show, how starting by K#, there is possible to obtain any canonical automaton whose language corresponds to a given table of the binary relation # by special transformations; these transformations include letter renaming, than they can not be called equivalent.
The structure of this paper is as follows. Section II briefly describes the notation and some facts from our previous publications on related topics. In Section III we consider in details, on a meaningful example, the work of algorithms for constructing auxiliary objects used in the paper. In Section IV we consider the formal definition of the complete automaton, and in Section V we describe a detailed example of its construction.
In the Sections VI and VII we present one of the main results of this paper, i.e., the possibility of constructing any finite automaton from the corresponding a priory given binary relation # by applying special operations to automaton K#. Namely, in Section VI the example of transformations is informally considered, and further in Section VII a formal description of the actions is given and the correctness of the described algorithm is shown. This description of the construction process shows the connection between canonical, basis and complete automata.
In Conclusion we formulate the main results of this article and the directions for further research.
II. Preliminaries
This section briefly describes the notation and some facts from our previous publications on related topics, see [2], [5], [6]. Let
K =( Q, E,S,S,F) (1)
be some finite automaton (nondeterministic Rabin-Scott's automaton), defining regular language L = L(K). Q is the set of states, S C Q and F C Q are sets of initial and final states respectively. We shall consider transition function S of automaton (1) as
S : Q x E ^ V(Q),
but not as
S : Q x (E Uje}) ^ P(Q),
where the notation P(Q) denotes the superset (the power set) of the set Q; thus, we shall consider automaton without e-transitions. We will usually write some edge 6(q,a) 3 r in the form q r, or, if it does not cause discrepancies,
simply in the form q —^ r.
The mirror automaton for the automaton given in (1), i.e.,
(Q, E, SR, F, S),
where
q q"
SR
if and only if q
.a a,
•q
will be denoted by KR; note that KR defines the language
LR.
Further in this section, we shall consider the regular language L to be given and use the notations defined in the cited papers for it. For the considered language L, its automaton of canonical form will be denoted by L. Let automata L and LR for the given language L be as follows:
L = (Qn, E, Sn, {sn}, Fn)
and
LR = (Qp, E,^, {sp},Fp).
Moreover, we do not consider the language L = o, so both these automata do have initial states.1
Let us recall definitions of binary relation # and state-marking functions fin and fout, see for details [2]. Relation # C Qn x Qp is defined for pairs of states of automata L and LR in the following way: A # X if and only if
(3uv e L) (u e Cf(A), vR e CinR (X)).
Note that such a definition is non-constructive; however, for example, [2] contains also its equivalent constructive variant (i.e., the definition-algorithm).
State-marking function fK : Q ^ P(Qn) is defined in the following way:
fK(q) 3 q if and only if Cf (q) n £f(q) = o . And state-marking function
fT : Q ^ P(Qp)
is defined similarly for automata KR (the mirror automaton for K) and LR.
The definition for basis automaton for the given regular language L could be found also in [2]. In this paper, it will be defined by
BA(L) = (Q, H,S,S,F).
Binary relation # defined in the above manner forms also the set of so-called pseudo-grids (see [5], etc.): namely, each of them is a pair (P, R) (where P C Qn and R C Qp), such that for each pair of states p e P and r e R condition p#r holds. Each of such pseudo-grids corresponds to the state of any particular automaton for the given language. Moreover,
1 Like [2], we call by canonical automaton a deterministic automaton,
containing the minimum possible number of states. In this case, it is also
like [2], we do not require the everywhere-defining of this automaton, and,
therefore, do not consider the possible "dead state".
the necessary condition for defining the given language by a finite automaton is that the subset of pseudo-grids corresponding to the set of states of considered automaton cover all the items of the relation #.
And if for some pseudo-grid (P, R) we can not extend neither set P nor the set R in order to not violate the definition of a pseudo-grid, then we call such a pseudo-grid by a grid.
Examples of the objects considered here were considered in detail in the works cited above. And it is important to note that all the definitions are constructive2, i.e., they forms algorithms for constructing such objects.
On the blocks considered by the states, we define automaton COM (L); its definition, examples and some related concepts can be found in [5].3
For the future, there is very important the condition for the existence of an edge (a transition) Bi —^ B2 (transition
from B1 into B2 in automaton COM(L), labeled by letter a e E; see also [7, Def. 2]):
(Vp e a(Bi)))n (p, a) e a(B2)) & (Vr e №)) (¿p(r, a) e £(Bi)).
(On the basis of these conditions, all the transitions of the automaton COM (L) are made. Conditions for input and output states for this article are less important; if necessary, see them in the cited works.)
Thus, we can assume that by considering some given regular language L, we simultaneously introduce the notation for the related language:
• two canonical automata (i.e., L and LR), and also their states, their transition functions etc.;
• binary relation # defined on pairs of states of automata Lq and LR;
• state-marking functions fin and fout;
• equivalent basis automaton BA(L);
• equivalent automaton COM (L).
III. The detailed consideration of an example
OF CONSTRUCTING AUXILIARY OBJECTS
Thus, we continue our constructions using the example of a language and the corresponding automata already considered in [2], [5].4 Let us briefly repeat the automata of these papers.
Let the given automaton (K, for regular language L) be given on Fig. 1, and the mirror automaton (KR, for language LR) be given on Fig. 2.
2 Including, as we have already noted, there exists a constructive definition of binary relation #.
3 In fact, we actually described this automaton for the first time long before, in [7], but in that paper we did not use the notation given here. As we already noted, we subsequently proved that the automaton COM(L) coincides with the so-called Conway's universal automaton, [4], [5], [8] etc.
4 This language was first obtained in 1996 using a search algorithm, see conference abstracts [9]. The algorithm looked for a language that is minimal in some parameters, which can be defined over a 2-letter alphabet using some automaton with at most 3 states. In this case, the edge-minimization algorithm of nondeterministic finite automata was used as an auxiliary, which we later described in [2]. But back in 1996 the program, implemented on the basis of this algorithm, received a solution on the available at that time computer technology.
Fig. 1
Fig. 3
# X Y Z U
A - # # -
B # - # -
C # # # #
D # # # -
A by A#X, etc. Besides, we do not
■ a-,
Y J'
write down the state write notation for sets, i.e., for example, instead of { X we write A#X, A#Y.)
Tab. 2
BA(L) a b
^ A#Y B#Z, B#X C#U
^ A#Z - C#Y, C#Z, C#X
^ B#X - -
B#Z - D#Y, D#Z, D#X
D#Y B#Z, B#X C#U
^ C#X - -
C #Y C#Z, C#X C#U
C #Z - C#Y, C#Z, C#X
C#U C#Y, C#U -
^ D#X - -
D#Z - C#Y, C#Z, C#X
Fig. 2
Corresponding canonical automata L and LR are given on Fig. 3 and 4:
In our previous papers cited before [2], [3], [5], we also did not consider further actions with the basis automaton. As such further actions, we first select (all) 5 possible grids based on Tab. 1:
(1) {A,C,D}x{Y,Z},
(2) {A,B,C,D}x{Z},
(3) {B,C,D}x{X,Z},
(4) {C}x{X,Y,Z,U},
(5) {C,D}x{X,Y,Z}.
We shall use the same numbers also in the future, in particular, to denote the states of new automata. Thus, using definitions of Section II and of automaton BA(L), we obtain automaton COM(L), see Tab. 3:
Tab. 3
COM(L) a b
^ 1 2, 3 1, 2, 3, 4, 5
^ 2 - 1, 2, 3, 5
^ 3 - 1, 2, 3, 5
^ 4 1, 2, 3, 4, 5 1, 2, 3, 4, 5
^ 5 2, 3 1, 2, 3, 4, 5
Fig. 4
Binary relation # for the given language, also obtained in [2], is given on Tab. 1:
Tab. 1
Terminology and constructions related to the so-called covering automata [5] will not be used in this paper; however, we propose to use them in the continuation paper, therefore, we describe briefly such constructions. Thus, it is easy to show that in the automaton COM(L), there is (and the only possible one) a covering subset consisting of exactly 3 grids (namely, blocks 1, 3 and 4), and covering subsets consisting of 2 grids does not exist. Selecting this subset (ie removing the blocks 2 and 5 that are not included in it), we obtain a covering automaton, given in Fig. 5; it is easy to verify that this automaton is equivalent to the original one.
In [2], [5], we did not consider basis automaton BA(L) for this language; its transition function, which is also constructed by [2], is given on Tab. 2. (For convenience, we
a, b Fig. 5
Thus, the example above gives an equivalent automaton, which, as can be easily verified, has the minimum possible number of states. However, note that in the general case such a fact is incorrect (see [8]; for the first time the example was obtained in [10]), i.e., the covered automaton is not necessarily equivalent to the given one; we assume to consider in the continuation paper a detailed analysis of the corresponding example in our terminology, as well as its relation to the objects defined in this paper.
IV. THE FORMAL DEFINITION OF THE COMPLETE AUTOMATON
In [3], we defined an auxiliary object, designated there as an automaton K#; we shall use the same notation below. The possible use of this automaton in applied problems (specifically, in the problem of state-minimization of non-deterministic finite automata) was briefly shown in [11]. However, in both of these papers, there were no detailed definitions or examples (except either trivial, or, on the contrary, very complex); a detailed definition and a more informative explanatory example are given in this paper. So, as already noted in Introduction, it is the automaton K# that is our main object of consideration.
For the following, the next statement is important, see [3].
Proposition 1: Let binary relation # be defined on sets An and Ap (where |An| = m > 0, |Ap| = n > 0), i.e., # C An x Ap. Let also the following limitations hold:
• (Vp e An)(3r e Ap)(p#r)
(i.e., the table of binary relation # has no empty rows);
• (Vr e Ap) (3p e An) (p#r)
(i.e., the table has no empty columns);
• (Vpi,p2 e An, pi = p2) (3r e Ap) ((pi#r &p2#r) v
(pi#r & p2#r))
(i.e., the table has no identical rows);
usually want a smaller number of vertices of the automaton in question, i.e., if necessary, we can assume that m < n.) Thus, let the considered alphabet be the following:
£
#
{a a |a g Qn G Qp}.
We choose an arbitrary string (let sn) and an arbitrary column (let sp) for the given table of the binary relation #. The meaning of this choice is the input states of two canonical automata, they are Lq and LR in our previous notation. In advance, we note that the arbitrarily chosen starting state of LR uniquely determines the nonempty set of final states L, and vice versa.
Definition 1: For the given binary relation # C Qn x Qp and the given states sn e Qn and sp e Qp, let us consider automaton
K#Snsp = ( Qn, {sn)
(or, briefly, K#, if sn are sp are mentioned), where:
{f G Qn |f#sp};6
transition function is defined in the following way:
¿#(A a b ) =
{B},
if A#X; otherwise.
• (Vri,r2 e Ap, ri = r2) (3p e An) ((p#ri &p#r2) v (p#ri & p#r2))
(i.e., the table has no identical columns); Then there exists a regular language for which the corresponding binary relation # coincides with the given one. □
Thus, we can assume that for the regular language L chosen on the basis of the last statement, and for the standard notation of Section II associated with any regular language, the following holds: Qn = An and Qp = Ap. Besides, Proposition 1 simply entails following Proposition 2.
Proposition 2: In the terms of Proposition 1, the following limitations hold:
• m < 2n —1;
• n < 2m —1. □
Next we consider an alphabet whose number of letters equals to |An | • |Ap| = mn. (We note at once that the number of states of the complete automaton considered below is equal to |An | = m. Therefore, in practical problems, for example, in the above-mentioned problems of minimizing nondeterministic finite automata, we can choose whether we consider a regular language corresponding to a given table of a binary relation # or a language corresponding to the transposed version of this table. 5. In practical problems, we
5 In [3], the automaton for this language was denoted by K#Sn Sp (or,
simply, K#), unlike considered here "more important" automaton K#Sn Sp. In this paper, we shall not use K#.
(we allow here the possibility A = B). □
For this automaton, we give the following statement, which can be considered as a simplified formulation of [3, Prop. 14].
Proposition 3: Let binary relation # C An x Ap be given. For it, let us consider automaton K#; we will use the considered in Section II designations and auxiliary objects for this automaton. For language of this automaton C(K#), let us considered corresponding binary relation # C Qn x Qp. Then the built for its language C(K#) binary relation # coincides with the given relation #q (up to re-designation of elements of sets An and Ap for elements of sets Qn and Qp). □
Note that in fact in this section we have described automata that are not common for one given regular language (although the table of the binary relation # can be constructed from a given regular language, and this is usually done), but for an entire class of languages; the common objects for all these languages are the binary relation #, and also the input and output states of the corresponding canonical automata (since, as follows from the foregoing, at the input state of automaton LR, the outputs of the automaton Lq are uniquely determined). Below in Section VI, it will be shown how to obtain any automaton having a given table of binary relation # (from the complete automaton, using special transformations and fixed input and output states).
V. THE DETAILED EXAMPLE OF THE COMPLETE AUTOMATON
As we noted before, in [3] we considered the trivial example of the complete automaton only (and the title "complete" was not used), i.e., for m = n = 2 and |#| = 3. In this section, we will consider a much more informative example, continuing to perform the constructions for the language and the corresponding automata already considered
6 The choice of such a nonempty set is possible due to the above limitations. Also note that by choosing different sn € Qn and sp € Qp, we obtain a set of languages, each of which corresponds to the given relation #.
in Section III above (i.e., for m = n = 4 and |#| = 11). In fact, "the input" (for the construction of this section) are only binary relation # for the given language, i.e., Tab. 1 for our example.
According to the definitions given above, the corresponding alphabet is the following:
= {a
Tab. 5'
(K #)R A Y B Y C Y D Y
A A,C,D - - -
B - A,C,D - -
C - - A,C,D -
D - - - A,C,D
" a
Z
B Z
" C ■■ Z
" D ' Z
A U
B U
C U
D U
Tab. 5''
(it contains 16 letters, because there exist 4 states of automaton L and 4 states of automaton LR, 4 • 4 = 16). Below, we shall write for simplicity
A X
instead of a
A X
etc.
Let sn = A, sp = X; then Fn = {B,C,D}.1 And, according to the above definition, we obtain for the language L# the following canonical automaton K# (Tab. 4 and 4'):
Tab. 4
K# A X B X C X D X A Y B Y C Y D Y
A - - - - A B C D
B A B C D - - - -
C A B C D A B C D
D A B C D A B C D
Tab. 4'
K# A Z B Z C Z D Z A U B U C U D U
A A B C D - - - -
B A B C D - - - -
C A B C D A B C D
D A B C D - - - -
(K #)R A Z B Z C Z D Z
A A,B,C,D - - -
B - A,B,C,D - -
C - - A,B,C,D -
D - - - A,B,C,D
Tab. 5'
(K #)R A U B U C U D U
A C - - -
B - C - -
C - - C -
D - - - C
The process of determinization of the last automaton is described by the following table (Table 6-6'''; we write so called "aggregate states" in the order of their appearance in the build process):
For the following, we consider the construction of the binary relation # for the language defined by the last automaton; we will show by an example that this relation coincides with the given (up to re-designation of the elements of the set). The process of construction is similar to the one considered in [2]. For this thing, let us firstly consider the mirror automaton (K#)R; this automaton8 is given on following Tab. 5-5''':
Tab. 6
(K #)R A X B X C X D X
B,C,D - B,C,D B,C,D B,C,D
A,C,D B,C,D - B,C,D B,C,D
A,B,C,D B,C,D B,C,D B,C,D B,C,D
C - - B,C,D -
Tab. 6'
(K #)R A Y B Y C Y D Y
B,C,D - A,C,D A,C,D A,C,D
A,C,D A,C,D - A,C,D A,C,D
A,B,C,D A,C,D A,C,D A,C,D A,C,D
C - - A,C,D -
Tab. 5
(K #)R A X B X C X D X
A B,C,D - - -
B - B,C,D - -
C - - B,C,D -
D - - - B,C,D
Tab. 6''
(like similar situations before, we omit the signs of sets, i.e., we write, for instance, A, B, C, D instead of { A, B, C, D }).
1 We have already noted that, according to the definitions introduced,
Fn can be determined on the basis of an arbitrarily chosen sp; here, we
have chosen sp so that the automaton constructed by us corresponds to the
original one.
8 According to the terminology and notation of [3], the canonical
automaton for its language is an automaton L# (K#), but we do not use
the last notation in this paper. We only note that the automaton (K#)R
constructed below has all the properties of the automaton K#.
(K #)R A Z B Z C Z D Z
B,C,D - A,B,C,D A,B,C,D A,B,C,D
A,C,D A,B,C,D - A,B,C,D A,B,C,D
A,B,C,D A,B,C,D A,B,C,D A,B,C,D A,B,C,D
C - - A,B,C,D -
Tab. 6''
(K #)R A U B U C U D U
^ B,C,D - C C C
^ A,C,D C - C C
^ A,B,C,D C C C C
C - - C -
X
X
X
X
}
And replacing:
• {B, C, D} for X (it corresponds to the following elements of binary relation #: B#X, C#X and D#X);
• {A, C, D} for Y (corresponds to elements A#Y, C#Y and D#Y);
• {A, B, C, D} for Z (corresponds to elements A#Z, B#Z, C#Z and D#Z);
• {C} for U (corresponds to element C#U),
we firstly form binary relation #, corresponding to considered language L(K#), and secondly, obtain the following automaton (Tab. 7,7'); we should designate it, according to our notation system, as (if#)R:
Tab. 7
(.K#)R A X B X C X D X A Y B Y C Y D Y
^ X - X X X - Y Y Y
^ Y X - X X Y - Y Y
^ Z X X X X Y Y Y Y
U - - X - - - Y -
Tab. 7'
(K#)R A Z B Z C Z D Z A U B U C U D U
^ X - Z Z Z - U U U
^ Y Z - Z Z U - U U
^ Z Z Z Z Z U U U U
U - - Z - - - U -
Obviously, the formed binary relation # coincides with the originally defined one.
VI. An example of the use
OF COMPLETE AUTOMATON
As we already remarked in Introduction, one of the main results of this paper is the possibility of constructing a any finite automaton from the corresponding pre-defined binary relation # by applying special operations to the automaton
K #.
We note that the process of constructing an automaton with a given binary relation, although it has general constructions with the process of constructing any automaton by a given basic automaton [12], is an entirely different problem: in our case we are dealing with nonequivalent (generally speaking) transformations of nondeterministic finite automata (for example, we change the alphabet in the process of construction), while in [12], as it follows from the title of that article, all the transformations were equivalent.
Such nonequivalent transformations of nondeterministic automata, which we have not considered in previous publications, are the following:
• "duplication" letters of the language of the automaton;
• forming the set of so-called "selected" edges (performed on the base of the basic automaton);
• deleting the letter of the language (with the removal of all arcs marked in the automaton);
• a special version of the combination of letters, taking into account the available "selecting";
• renaming letters of a language in the automaton.
Next, we will use the words "selected edges", "selecting"
as the terms and write them without quotes. For a detailed
description of these actions, see below: an example will be considered in this section (which is a continuation of the examples discussed above), and a formal description of the actions to be performed will be given in the next section. In the example below, we show how to obtain the automaton Lq (Tab. 4) using such several steps starting by automaton K# (Fig. 3). From the example under consideration, it is clear that similar actions are possible for any language (and the corresponding canonical automaton) that has the same table of the binary relation #.
Let us note in advance the following fact: we can assume that all the subsequent ones are produced by means of a nondeterministic search algorithm, and the sequence of actions can be considered an "oracle" (see [13] etc.). Thus, in the development of specific algorithms, it is convenient to implement the actions described below, for example, using the branch and bound method, and also, perhaps, to apply parallel programming technologies, which we described, for example, in [14] and some recent publications in Russian.
So, let us continue our consideration of the examples that have been started before. Let us repear Fig. 3, where we add the following things:
• firstly, we write down all possible states of the automaton LR corresponding to the states of the automaton Lq (i.e., for some state A e Qn we write all X e Qp, such that A#X), we write them below, under the labels of the corresponding vertices of the automaton L;
• secondly, we somehow number the edges (and write numbers from 1 to 7 next to the arcs in brackets).
In doing so, we get the following Fig. 6.
Now, let us consistently consider all the 7 edges of automaton L. For edge (1), i.e.,
A-
B,
we obtain corresponding edges for the basis automaton (Tab. 2)
" A Z and
8 Z '8
A Y
A Y
B X
Fig. 6
By definition of automaton K#, both these edges of the basic automaton correspond to the edge
b
A
S# B
B
(we recall that by writing , or, which is the same thing, a B , we have designated one of the letters of the alphabet
Y
over which the automaton is defined K#).
Let us d^the same with all the remaining 6 edges of the automaton L, and write the results in the form of such an addition (Tab. 8,8') to Table 4 considered before:
Tab. 8
A X B X C X D X A Y B Y C Y D Y
^ A - - - - A B C D
^ B A B C D - - - -
^ C A B C D A B C D
^ D A B C D A B C D
(1) (3) (2) (4) (6) (7)
Tab. 8'
A Z B Z C Z D Z A U B U C U D U
^ A A B C D - - - -
^ B A B C D - - - -
^ C A B C D A B C D
^ D A B C D - - - -
(6) (7) (5) (2)
B Y B Y C Y C Y C Y C Y C Z C Z D Z C U
^ A B B C C C C - - - C
^ B C C D -
^ C B B C C C C C C D C
^ D B B C C C C C C D -
(1) (3) (2) (4) (6) (7) (6) (7) (5) (2)
and it was not fulfilled for the corresponding K# and further automata constructed on its base.)
Next, we combine letters that are identically marked in the last line. It is necessary to fulfill this additional condition: in the same row, the merged columns cannot have different selected transitions (i.e., there is impossible that both cells of the same row of the merged columns are selected, and different transitions are defined); we note that in our example this situation does not arise9. After combining the letters, we do not need their previous notation, so we do not use the letters y8 ... in the new table, but denote 7 letters in the same way as we denoted the edges of the automaton on Fig. 6: (1) ... (7).
So, pointing "new letters" (1)... (7), as usual, in the header cell of each column and "sorting them in ascending order", we get the following automaton (Tab. 10):
Tab. 10
The new elements (the addition) of the last table are:
• markings of columns in the new last line, showing which edges of automaton K# correspond to this letter;
• marking (with a gray background) the cells of the table (edges of the automaton K#), showing which edges of the automaton K# correspond to this edge.
We note the following two things.
• The correspondence between the edges of the given canonical automaton (or of the given basis automaton) and the edges of automaton K# is not single-valued, as seen in the last table.
• When using the basic automaton, we did not pay attention to the values of the function (pout for the output states. (Because the edges we need are determined without using them.)
Next, let us remove all the letters from the alphabet under consideration, for which the cells (i.e., edges) marked with a gray background, i.e., those corresponding to the edges of the given canonical (or basic) automaton do not exist in the corresponding columns of the last automaton (Tab. 8). In addition, every remaining letter duplicate in as many as it corresponds to the arcs. We obtain the automaton given on the following Table 9:
Tab. 9
(1) (2) (3) (4) (5) (6) (7)
^ A B C B C - C -
^ B - - - - D C C
^ C B C B C D C C
^ D B C B C D C C
And, as is easy to be convinced, considering in it only the selected arcs and denoting (in a natural way):
• letters (1), (2) and (3) by a;
• letters (4), (5), (6) and (7) by b, we obtain the desired automaton.
Note that we can, applying the same nondeterministic algorithm, get an entire class of automata (languages), for example, using one of the following options:
• either selecting some other edges of the given automaton K #;
• or leaving in the last automaton (Tab. 10 in our example) some other edges (not only selected ones).
All these automata (all these languages) can be obtained as a result of the transformations described here; all of them are characterized by the same (the given) table of binary relation #.
VII. CONSTRUCTING ARBITRARY FINITE AUTOMATON ON THE BASE OF THE COMPLETE AUTOMATON
This section formally describes the nondeterministic algorithm, which in the previous section was described informally.
Definition 2: Let regular language L defines binary relation #. Then we shall say, that edge
A —* B
of automaton L corresponds to edge
B x
A B,
S#
(2)
(3)
(The columns are written in the same order as in the previous table 8. And, of course, each letter in the new alphabet, with duplicated letters, corresponds now to only one edge marked with a gray background. Among other things, we note in the obtained automaton the absence of transitions to the input state A, which was one of the signs of the given automaton
of automaton K#, if for some Y g Qp, the following condition holds:
A a B
X T Y'
(4)
9 We assume in the next publication to consider, among other things, a similar example.
Three edges (2), (3) and (4) (or some pair of them) will be called corresponding. □
Of course, according jo this definition, a certain edge of canonical automaton L corresponds to an only edge of automaton K#; but the converse, in general, is not true. The same fact is true for the basic automaton (instead of the canonical one). That is, in both cases, the correspondence can be considered as a morphism acting from the set of transitions of the canonical automaton (transitions of the basic automaton) to the set of transitions of a complete automaton. Examples, when some (including 0) edges of canonical automaton correspond an only edge, were considered in the last section; in the tables, we marked them in a gray background.
Definition 3: Let edges of automaton L are numbered from 1 to n; we shall denote them by (1) ...(n). Let edge (i), written as (2), corresponds to edge (3). Then for the letter (i), we shall call
A A B
by modified (i)-edge. (The constructed transition function will be denoted by £(-).)
In this case, we consider modified edges for the same states of the canonical automaton (set Qn) over alphabet
£(-) = { (1), (2),..., (n) } . □
Thus, we obtain a one-to-one correspondence between the edges of the given canonical automaton and the modified edges constructed by us; all the necessary examples were also considered in the last section. Therefore, considering a given regular language L and the corresponding relation #, starting with the automaton K#, we delete edges, each of which does not correspond to some edge of automaton L, after which we transform each of the remaining letters into several new ones (each of which corresponds to the edge of canonical automaton), and, in the end, rename the letters, perhaps, by calling several letters by the same new letter. Let us formulate the described process in the form of the following proposition.
Proposition 4: For a given regular language L and the corresponding binary relation #, there exists a sequence of transformations consisting of:
1) building "starting" automaton K#;
2) deleting some its edges;
3) renaming some edges (i.e., changing their marking letters) - perhaps, marking some edges by different new letters;
4) renaming marks of some edges by possible marking some existing different edges by one new letter,
resulting automaton L. □
The correctness of the statement follows from the above material.
VIII. Conclusion
So, in the present paper we described languages that can be considered as "the most typical representatives" of subclasses of the class of regular languages - such subclasses, that each element of them is characterized by the same table of the binary relation #. With the help of several nonequivalent transformations of canonical automata for the "typical" languages we have identified, we obtain a canonical automaton
for an arbitrary regular language corresponding to a given table of the binary relation #.
As already noted above, a complete automaton does not define the regular language under consideration; however, it defines a language that possesses many important properties of the considered one. Similarly to the above cited article [12], where we "collected" the edges of an arbitrary automaton (for a predefined regular language) from the edges of its basic automaton - in this paper, we roughly "collect" edges of an arbitrary automaton from the edges of its complete automaton. (In the interpretation of the algorithm above, we actually removed the edges from the complete automaton, i.e., we performed the "analytical", not the "synthetic" algorithm; however, of course, this difference is in this case unprincipled.)
The material of this article is expected to continue in the following two ways. First, we continue to consider the connection of complete automata with the problems of vertex minimization of nondeterministic finite automata, see [8], [14], [15] and others. And this direction includes both the theoretical part (description of new variants of minimization algorithms, proof of their correctness, etc.), and the practical part (description and implementation of heuristics for minimizing automata with a large number of states). Some algorithmic questions related to the implementation of the corresponding heuristic algorithms have already been considered in [11]; but, of course, this work requires the continuation, in particular, of new variants of parallel implementation of the corresponding algorithms, which could be the development of algorithms considered in [14], [15]. An indirect argument that the implementation of these algorithms will yield very good results is the following fact, briefly mentioned above: in 1996, the program for finding the minimum language by some criteria, implemented on the basis of such an algorithm, on computer technology available at that time received the necessary decision.
The problem of edge-minimization of nondeterministic finite automata adjoins the problems described here; and the description of algorithms for these problems that are more effective than the algorithms now available should become the development of both the material from [2] and the technology of the nonequivalent transformation of the automaton K# described in this paper. In the author's opinion, this problem is even more important for practice than the much more studied problem of state-minimization: in practical problems, a nondeterministic automaton in the memory of computer is usually represented as a set of transition edges.
And the second direction of the continuation of the work on the topic is completely different. We already noted in Introduction that for every binary relation # satisfying the necessary limitations, there exists a subclass of the class of regular languages, each of which has such a relation #. The binary relation on the set of all regular languages that is satisfied if and only if the two binary relations have the same binary relation #, was named in Introduction by binary relation R. In this case, we can consider subclasses of the self-binary relation R (depending, for example, on the operations applied to the automaton K# described in Sections VI and VII to get the desired regular language) -and we will show in one of the following publications that the subclasses of binary relations defined by us form a lattice.
References
[1] MelnikovB., MelnikovaA., Edge-minimization of non-deterministic finite automata. Korean Journal of Computational and Applied Mathematics (Journal of Applied Mathematics and Computing). 2001, vol. 8, no. 3, pp. 469-419.
[2] MelnikovB., Once more on the edge-minimization of nondeterministic finite automata and the connected problems. Fundamenta Informaticae. 2010, vol. 104, no. 3. pp. 261-283.
[3] Melnikov B., Melnikova A., Some more on the basis finite automaton. Acta Univ. Sapientiae, Informatica. 2013, vol.5, no.2, pp.221-244.
[4] LombardyS., Sakarovitch J., The Universal Automaton. in: Logic and Automata, Texts in Logic and Games Amsterdam Univ. Press. 2008, vol. 2, pp. 451-504.
[5] MelnikovB., DolgovV., Some more algorithms for Conway's universal automaton. Acta Univ. Sapientiae, Informatica. 2014, vol.6, no. 1, pp. 5-20.
[6] MelnikovB., VakhitovaA., Some more on the finite automata. Korean Journal of Computational and Applied Mathematics (Journal of Applied Mathematics and Computing). 1998, vol.5, no.3, pp.495-505.
[I] MelnikovB., Sciarini-GuryanovaN., Possible edges of a finite automaton defining a given regular language. Korean Journal of Computational and Applied Mathematics (Journal of Applied Mathematics and Computing). 2002, vol. 9, no. 2., pp. 415-485.
[8] PolakL., Minimalizations of NFA using the universal automaton. International Journal of Foundation of Compututer Sciences. 2005, vol. 16, no. 5, pp. 999-1010.
[9] MelnikovB., Once more on the combining states of nondeterministic finite automaton. Proceedings of XI International Scientific Conference on the Problems of Theoretical Cybernetics. M., Russian State University for the Humanities Ed. 1996. P. 139-141. (in Russian)
[10] KamedaT., WeinerP., On the state minimization of nondeterministic finite automata. IEEE Trans. on Comp. 1910, vol. C-19, no. 1, pp. 611621.
[II] KrivolapovaA., MelnikovaE., SofonovaN., Some auxiliary algorithms for construction of Waterloo-like automata. Vestnik of Voronezh State University. Series: System analysis and information technologies. 2016, no. 4, pp. 20-28. (in Russian)
[12] MelnikovB., SayfullinaM., On some algorithms of equivalent transformations of nondeterministic finite automata. Izvestiya of universities. Mathematics. 2009, no. 4, pp. 61-12. (in Russian) (English translation: Mel'nikovB., SaifullinaM., Some algorithms for equivalent transformations of nondeterministic finite automata. Russian Mathematics (Izv. VUZ). 2009, no. 4, pp. 54-56.)
[13] HromkovicJ., Theoretical Computer Science. An Introduction to Automata, Computability, Complexity, Algorithmics, Randomization, Communication, and Cryptography. Springer, 2003. 321 p.
[14] MelnikovB., TsyganovA., The state minimizaton problem for nondeterministic finite automata: The parallel implementation of the truncated branch and bound method. Proceedings of the International Symposium on Parallel Architectures, Algorithms and Programming, PAAP-2012. Taipei, Taiwan. 2012, pp. 194-201.
[15] MelnikovB., RadionovA., MoseevA., MelnikovaE., Some specific heuristics for situation clustering problems. Proceedings of the 1st International Conference on Software and Data Technologies, ICSOFT-2006. Setubal, Portugal. 2006, pp. 212-219.