Научная статья на тему 'Pseudo-automata for generalized regular expressions'

Pseudo-automata for generalized regular expressions Текст научной статьи по специальности «Математика»

CC BY
144
30
i Надоели баннеры? Вы всегда можете отключить рекламу.
Область наук
Ключевые слова
NONDETERMINISTIC FINITE AUTOMATA / REGULAR LANGUAGES / GENERALIZED REGULAR EXPRESSIONS / EXTENSION OF AUTOMATA

Аннотация научной статьи по математике, автор научной работы — Melnikov Boris F., Melnikova Aleksandra A.

In this paper, we introduce a new formalism which is intended for representing a special extensions of finite automata. We call them generalized nondeterministic finite pseudo-automata. This formalism gives not only the equivalence between two classes of finite automata, i.e., ordinary nondeterministic finite automata and pseudo-automata introduced by us, which also define all the regular languages. This formalism also gives an opportunity of defining the complement operation (and, therefore, generalized regular expressions) in a way similar to the usual “automata” methods. We use the term “pseudo-automata”, because, unlike usual automata constructions (ordinary nondeterministic finite automata, push-down automata, Turing machines etc.), we do not indicate the concrete paths for defining the considered word of the given regular language; the introduced formalism gives only the algorithm for answering the question, whether the given word belongs to the considered language. In the paper, we firstly give definition of the pseudo-automata and their languages. After that, we consider the diagrams allowing to visualize them and give some examples. Then we consider some properties of introduced formalism.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Pseudo-automata for generalized regular expressions»

Pseudo-automata for generalized regular expressions

B. F. Melnikov, A. A. Melnikova

Abstract—In this paper, we introduce a new formalism which is intended for representing a special extensions of finite automata. We call them generalized nondeterministic finite pseudo-automata. This formalism gives not only the equivalence between two classes of finite automata, i.e., ordinary nondeterministic finite automata and pseudo-automata introduced by us, which also define all the regular languages. This formalism also gives an opportunity of defining the complement operation (and, therefore, generalized regular expressions) in a way similar to the usual "automata" methods.

We use the term "pseudo-automata", because, unlike usual automata constructions (ordinary nondeterministic finite automata, push-down automata, Turing machines etc.), we do not indicate the concrete paths for defining the considered word of the given regular language; the introduced formalism gives only the algorithm for answering the question, whether the given word belongs to the considered language.

In the paper, we firstly give definition of the pseudo-automata and their languages. After that, we consider the diagrams allowing to visualize them and give some examples. Then we consider some properties of introduced formalism.

Keywords—nondeterministic finite automata, regular languages, generalized regular expressions, extension of automata.

I. INTRODUCTION AND MOTIVATION

In this paper, we propose a formalism used for representing a special class of extensions of finite automata; we call them generalized nondeterministic finite pseudo-automata. The considered algorithm of constructing such automata gives not only the equivalence between the classes of such automata and ordinary finite automata (because such equivalence is obvious a priori), but also the possibility of defining the complement operation (and, generally, the generalized regular expressions) by usual "automata" methods. We also consider a method of constructing the concrete generalized nondeterministic finite pseudo-automaton which defines the given generalized regular expression.1

This paper is supposed to be the first in a series of papers, and we intend to publish the properties of pseudo-automata in several subsequent publications. In this paper, we give the most general definitions and facts only.

In many papers published before, many extensions of nondeterministic finite automata (NFAs) were considered.2

Received December 27, 2017.

Boris F. Melnikov, Russian State Social University (email: bf-melnikov@ yandex.ru).

Aleksandra A. Melnikova, National Research Nuclear University "MEPhI" (email: [email protected]).

1 Remark that like ordinary nondeterministic finite automata, it can also define some other equivalent generalized regular expressions.

2 Among these articles, there is important to mention papers of D. Kirsten, related to the topic of the present work. See [1], [2], etc.

Let us also mention three papers of the authors [3], [4], [5]. In them, three different extensions of NFA class were considered; in two of them, the edges were labeled by regular expressions.

However, the authors do not know papers, where automata with the complement operation are considered, although such complement operation does not give the loss of regularity. The first author already proposed another approach for the same problem, see [6]. However, in the current paper we define an analog of the complement operation in a different way, which, apparently, is much more successful. 3 And, consequently, in this paper, we use completely other notation. For instance, we use the term "pseudo" because we usually are not able to indicate the path defining the given word (we are able to make this thing for ordinary NFAs, push-down automata, Turing machines, etc.); however, at the same time, this word can belong to the considered regular language.

Thus, we shall consider formalism for defining automata for the generalized regular expressions; these expressions are defined like [7]. In other words, we consider the complement operation by "usual automaton methods".

This paper has the following structure. In Section II, we propose the main definitions, i.e., definitions of generalized nondeterministic finite pseudo-automaton (GNFPA) and its language. Namely, we formally determine the corresponding generalized regular expression by the given pseudo-automaton. Therefore, we can in principle, on the basis of this definition only, solve all the usual problems of the theory of regular languages: we can simply obtain a regular expression for our pseudo-automaton, such that this expression would be equivalent (i.e., would define the same language) to the given generalized regular expression. Certainly, we will rarely apply this approach: we define GNFPAs for more complex problems.

One of such standard problems (for the general formal language theory) is checking whether the given word belongs to the language of the given automaton. For GNFPAs, we consider a trivial (but long working) algorithm for such checking in Section III. We are going to describe a more effective algorithm for this thing in the next paper.

In Section IV, we present a method of depicting such automata in the form of graphs and consider a detailed example. In Section V, we present the algorithm of construction of GNFPA by the given generalized regular expression.

In Section VI, we give some alternative models of pseudo-automata. Namely, we formulate: another definition of the language of the given GNFPA; a model of pseudo-automaton that can be regarded as an analog of canonical NFA; two other definitions of GNFPA (a simplified one and, vice versa, a complicated one). In that section and in Conclusion, we

3 Let us remark in advance, that the main definition of the current paper (given in Section II) will describe a more general case than the approach given in [6], and, vice versa, one of the alternative definitions (a definition of Section VI) will describe a particular case of that approach.

also briefly formulate directions for further work on this topic.

II. The main definitions

Firstly let us define a generalized regular expression like [7] etc.; simultaneously, let us determine corresponding regular languages.

Definition 1: A generalized regular expression (GRE) on the given finite alphabet E is defined in the following way:

1) GRE 0 defines regular language 0;

2) GRE e defines regular language je};4

3) for each letter a e E, GRE a defines regular language

ja}.

Further, let p and r be two GRE5 defining regular languages P and R respectively. Then:

4) GRE (p + r) defines regular language P U R;

5) GRE (p • r) defines regular language P • R;

6) GRE (p*) defines regular language P*; (as for ordinary regular expression). Besides:

7) GRE (p) defines regular language P, i.e., language E* \ P.

Nothing more is a GRE.

For generalized regular expression E, its language will be denoted by L(E)

Also like [7] etc., we shall sometimes omit unnecessary parentheses and symbols " •". □

We shall not consider examples, they are well-known, see [7] etc.

Let us now define generalized nondeterministic finite automata and their languages.

Definition 2: A generalized nondeterministic finite pseudo-automaton (GNFPA) is a tuple

G = (Q, £,5, S, F, T, Zin, Cut) , (1)

where:

• Q is the finite set of states;

• £ is the considered alphabet;

• 5 is the transition function of the type

S : Q x (E U je}) ^P(Q)

(where P(Q) means the superset for Q);

• S C Q is the set of initial states;

• F C Q is the set of final states

(as for ordinary nondeterministic finite automaton). Besides:

• T C N is a finite set; 6

• zin: T ^ Q x P(Q) (the push-function); for some its element

Z in(i) = (Si,Si),

we shall write si = 0in(i) and Si = ©in(i);

• zout: T ^ P(Q) x Q (the pop-function); for some its element

Z oui(j) = (Fj ,fj),

we shall write Fj = ©out(j) and fj = flout(j). □

4 Similar to most books on the formal languages theory, we shall consider this item, although expressions e and defined below (0*) are equivalent (under natural interpretations).

5 Remark that they are not two ordinary regular expressions.

6 We mean that N does not contain 0, i.e., N = { 1, 2,... }.

The set T and functions Zin and Zout define complement languages; below, we shall define such languages and, generally, language of a GNFPA. For this thing, let us firstly consider some ancillary definitions.

Definition 3: For the given NFA K = (Q, E, S, S, F) and some subsets S', F' C Q, let us denote nondeterministic finite automaton (Q, E, S, S', F') by K(K, S', F'). □

Definition 4: For the given GNFPA G (1), let us denote corresponding ordinary nondeterministic finite automaton (Q, E,S,S,F) by K(G). □

Definition 5: For the given GNFPA G defined by (1) and some subsets S', F' C Q, let us denote the GNFPA (Q, E, S, S', F', T, Zin, Zout) by G(G, S', F'). □

Definition 6: Let G be a GNFPA (1), where T = 0. For some k e T, let us define a generalized nondeterministic finite automaton

G_fc = (Q, E, S, S, F, T_fc, Z-k, Z-t),

where:

• T-k = T \{k};

• Z-nk (i) = Zin (i) for each i e T-fc;

• Z-fW = Z out(i) for each i e T-k.7

Below, we shall sometimes use functor names Zin and Zout instead of Z-nk and Z-Ut respectively. □

Let us present now the main definition of this paper (it is the recurrent definition).

Main Definition 1: Let the GNFPA G defined by (1) be given. Then we define its language L(G) in the following way.

• Let Li = L(K(G)).8

• If T = 0, then we define L2 = 0.

• otherwise, for each k e T, let us consider three the following GNFPAs:

1) G^fc = G (G-fc,S, j0in(k)});

2) G[k] = G (G-fc, ©in(k), ©out(k^;

3) and Gfc^ = G (G-fc, {0out(k)},F). Then we define

L2 = U (L(G^i) • • £(Gi^)) . (2)

i£T

• The defined language L(G) = L1 U L2. □

Remark that this definition is correct: the cardinality of the set T for each of three GNFPAs G^k, G[k] and is less than the cardinality of the set T for GNFPA G. Therefore, we can assume that we a priori know the languages of these three GNFPAs, because we also defined the languages of all GNFPAs having T = 0.

It is also very important to note the following fact. There is no analogy with the accepting path of an ordinary automaton: in the case of our automata, such path, generally speaking, simply does not exist. That is, we have not to define the language by an accepting path (as we do for ordinary NFAs, and also for push-down automata and Turing machines, [8] etc.); we do it in a different method. In this method, we do not know the order of the use of the elements of T, and, therefore, we have to assume the possibility of any order of their application as an initial definition.

7 Remark that we define all the necessary values for C!!k(i) and Z°Uft(i).

8 I.e., we consider in this case the ordinary nondeterministic finite automaton and the usual definition of its language.

As we already said in Introduction, in principle we can, on the basis of this definition only, solve all the usual problems of the theory of regular languages (because we can simply obtain a regular expression for our pseudo-automata, such that this expression would define the same language). Certainly, we will rarely apply this approach: we define GNFPAs for more complex problems. Some of such problems are considered in the remainder of the paper.

III. Algorithm for checking whether the word

B ELONGS TO THE LANGUAGE OF GNFA

In this section, we give an obvious recursive algorithm for checking, whether the given word belongs to the language of GNFPA. It is clear that without the algorithm answering this question, it hardly makes sense to consider pseudo-automata: the method, briefly described at the end of previous section, connected with the reformulation this question for ordinary automata and ordinary regular expressions, can hardly be called acceptable.

We shall not consider the complexity of this algorithm because of the following. Firstly, the main its purpose is the fundamental possibility of the corresponding problem. Secondly, we propose to introduce significantly more efficient algorithm in the following papers.

Algorithm 1: Checking whether the word belongs to the language of GNFPA.

Input:

• GNFPA G given by Definition 2;

• word u e E*.

Output:

• true, if u e L(G);

• false, if u e L(G).

We shall denote the result of calling of this algorithm (true or false) by Checking(G, u); here, we apply a recursive call. In addition, like Pascal language, we shall use notation Checking (without arguments) on the left side of the assignment operator, to return a value to the running algorithm. However, like C++ language (and unlike Pascal), we believe that the use of such an assignment operator leads to the immediate completion of the execution of the branch of the recursive algorithm.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Method:

• if u e L(K(G)) then Checking:=true;

• if T = 0 then Checking:=false;

• for each representation of the word u in the form u = xyz, we consider each k e T; if for at least one of these variants, we obtain simultaneously:

- x e G^k, i.e., Checking(G^k, x)=true;

- y e G[k], i.e., Checking(G[k],y)=true;

- and z e Gfc^, i.e., Checking(Gfc^, z)=true (in these subitems, we make the recursive calls), then Checking:=true;

• otherwise, Checking:=false. End of the description of Algorithm 1. □

The correctness of this algorithm immediately follows from Main Definition 1.

examples. Like ordinary NFA, a GNFPA can be described by an oriented graph; however, the edges are here labeled by both letters of E and some integers. The sets Q, S, F and S are represented like ones for ordinary NFA. Further, if q e ©in(i), then we add the edge from 0in(i) to q labeled by —i; similarly, if q e ©out(i), then we add the edge from q to 0out(i) labeled by +i (we shall never omit the sign "+").

Remark also, that we can omit the set T (it consists of all the marks of corresponding edges), but, unlike ordinary NFAs, we have to designate considered alphabet E.

In our previous papers [3], [4], [6], [9] etc., we denote the states of ordinary automata (NFAs) by double circles, like, for example, [10]. In this paper, we shall use the same agreement (i.e., use double circles for NFAs which are not GNFPAs) and use single circles for "proper" GNFPAs.

We shall also use the following agreement distinguishing ordinary NFAs and GNFPAs: ordinary lines will show the ordinary edges (marked by letters of E, usually a and b), and dotted lines will show the elements of Zin and Zout.

Thus, for alphabet E = {a, b}, let us consider the following pseudo-automaton, depicted on Fig. 1 below. For this pseudo-automaton (let it be 1), we have:

-2

-1

©

2 ! ,

S = { a, b }

Fig. 1

Q = { qi,...,qii };

E = { a, b } (remark once more, that we have to indicate the alphabet on the figure);

S = ! q5 q6, q6 —^ qv }; S = {qi}; F = {qii}; T = { 1, 2, 3 };

Zin(1) = (qi, { q2 }), Coui(1) = ({ qio } ,qii); Zin(2) = (q2, { q3 }), C°Mi(1) = ({ q4 } ,q5); Cin(3) = (qr, { q8 }), COMi(1) = ({ q9 } ,qio). (Below, we shall not use such detailed applications of descriptions.)

Now, we shall use Main Definition 1. Evidently, we have here L(K(G)) = 0, then for defining L(G), we have to consider the following automata. More precisely, denoting the sequences in square brackets (in order not to confuse them with the notation of formulas), we will consider 6 possible sequences of applying 3 elements of the set T:

[1, 2, 3], [1, 3, 2], [2,1, 3], [2, 3,1], [3,1, 2], [3, 2,1].

We shall use the possible sequences of applying these elements in the title of subsections. We shall also apply some incomplete sequences for this thing, e.g., [1], [1, 2], etc.

IV. DIAGRAMS OF GNFPAS AND EXAMPLES

In this section, we present two methods of depicting our pseudo-automata in the form of graphs and consider some

Sequence [1]

• We have i = 1, then 0in(l) = qx, then pseudo-automaton G^i is depicted on the following Fig. 2:

( G (

-2 : +2

-3

+3

qi I S = { ^ b }

Fig. 2

There is evident, that £(G^1) = je}.

Similarly, 0out(1) = q11, then for automaton G1^, we

also obtain £(G1^) = je}.

Therefore, we have to consider the following pseudo-automaton G[1] (Fig. 3 below), which have the only initial state q2 (because for G, we have ©in(1) = jq2}):

(() 0 (

" +2 ! )-3

2

©

S = { a,b } Fig. 3

-2

2 ! .

I 99

+3

S = { a,b } Fig. 4

There is evident, that £((G[1])^2) = je}.

. -3

95 1 b '[qsl ^ '[ 97

S = { a,b } Fig. 5

©in(2) = jq3}, ©out(2) = jq4}, then pseudo-automaton (G[1])[2] is depicted on Fig. 5 given before. (We omit state q2. Remark that we also could omit some other states.)

Evidently, the language of this automaton is 0, then the complement of this language (used in our definitions)

is E*.

0out(2) = q5, then automaton (G[1])2^ is depicted on Fig. 6 below; like before, we omit some states, not affecting the language.

3

We have to use the complement of its language as the subset of the language of the given pseudo-automaton G.

Further, for related figures (i.e., for sequences [1, 2] and [1,3]), we shall not depict states q1 and q11. We shall continue to consider this case (i.e., sequence [1]) after studying its subcases (sequences [1, 2], [1,2,3], [1,3] and [1,3,2]).

Sequence [1,2]

• For this sequence, we have now i = 2, then 0in(2) = q2, then pseudo-automaton (G[1])^2 is depicted on the following Fig. 4:

99

. +3 (oxo^

S = { a,b }

Fig. 6

The languages of this pseudo-automaton will be obtained below, by considering sequence [1, 2,3].

Sequence [1,2,3] Let the considered automaton (Fig. 6) be G'.

• Evidently, we obtain language £(G^3) = jbb}.

• Like pseudo-automaton (G[1])[2], we obtain that L(G'3]) = je}, and the complement of this language is E*.

• And, evidently, £(G3^) = je}.

Sequences [1,3] and [1,3,2]

These cases are very similar to the discussed above cases for sequences [1,3] and [1, 3,2]. Moreover, we obtain the same languages. Therefore, we shall not consider these cases.

Sequence [1], the completion

Let us finish considering the language which obtained where we apply i = 1 in Main Definition 1 (i.e., in (2)).

For pseudo-automaton G[1] (Fig. 3) we obtained, that its language is

L(G[1]) = E* • b • b • E*;

then

L(G) D je} • E* • b • b • E* • je} = E* • b • b • E*. (3)

Sequences [2] and [3]

Let us consider the case of sequence [2] (the case of sequence [3] is similar). For it, there is sufficient to consider pseudo-automaton G^2 only. It is the following one:

( ( (

-2 ! +2 i i -3

99

-1

+3

+1

S = { a, b }

Fig. 7

We can simply obtain, that its language is empty: states q1 and q2 have no connecting paths, they have "connecting" Zin-element only. From here, it is easy to obtain, that all the languages resulting for sequences [2] and [3] are 0, and, therefore, in (3) we can change the sign "D" for "=".

Thus, the obtained language for considered pseudo-automaton G is

E* • b • b • E*. (4)

It is the language including all the words over alphabet {a, b} that do not include two characters b in a row in neighboring positions. We can see that for this language, the ordinary automaton (a NFA defining it) is simpler (Fig. 8):

Algorithm 2: Constructing corresponding generalized nondeterministic finite pseudo-automaton by the given generalized regular expression.

Input: GRE £.

Output: a GNFPA G, such that L(G) = L(£).

Method: Let us consider items corresponding to Definition 1.

1) GRE 0 corresponds to pseudo-automaton

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

( {s,f}, E, 0, {s}, {f}, 0, 0, 0 )

(here and below, as before, we consider functions J, Zin and Zoui as the sets of their elements, and, therefore, we use the sign 0; set T is also empty);

2) GRE £ corresponds to pseudo-automaton

( }, E,J, {s}, {f}, 0, 0, 0 ),

where

J —

•f} ;

Fig. 8

However, certainly, there exist languages, for which a GRE is simpler then a regular expression.

V. The algorithm of construction of GNFPA

BY THE GIVEN GENERALIZED REGULAR EXPRESSION

In this section, we believe the generalized regular expression be given and present the algorithm constructing corresponding pseudo-automaton, i.e., a GNFPA which language coincides with the language of the given GRE.

For ordinary nondeterministic finite automata and regular expressions, a similar version of building NFA is known since the 1950s; see, for example, the description of the classical version of such construction in [7].

And in this section, we transfer this method for GREs and GNFPAs. We make building in roughly the same way as in [6]. Like the classical construction, the automaton corresponding to the regular expression is constructed recursively according to the items of Definition 1; certainly, we have to add an item corresponding to the complement operation. Thus, we explicitly indicate the automaton (that is, we use the constructive definition for the GNFPA).

As we already noted in Introduction, a different definition of our formalism was used in [6]. However, we are able to use figures of [6], because the formalism defined there uses only the special cases of the above definitions; it also can be considered as a special case of the formalism defined in the present paper. Therefore, we do not repeat the figures from [6] in this paper9 and consider the figure for automaton describing GRE p only.

Like ordinary regular expressions and ordinary NFAs, we have to indicate the specific GNFPA which language coincides with the language of the given GRE. But we cannot use completely unchanged construction of [7] etc., because we have to define a GNFPA, not a NFA; however, this does not complicate the presentation. We also note in advance that in each item there is evident the proof, that the presented GNFPA actually determines the required GRE.

Thus, let us consider the following algorithm.

9 Let us only remark, that unlike [6], we marked here elements of Zin

by negative numbers and elements of Zout by positive numbers.

3) for each letter a e E, GRE a corresponds to pseudo-automaton

( {s,f}, E, J, {s}, {f}, 0, 0, 0 ),

where

J =

•f} •

Further, let p and r be two GRE corresponding to pseudo-automata

Gp

( E ^ îp Cpn, CpMi )

and

Gr — ( Qr, E, Jr, Sr, Fr, TT, Zr , Cr- )

respectively. Let us remark, that according to the above definitions, we can assume, that Tp n Tr — 0. Then:

4) GRE (p + r) corresponds to pseudo-automaton

Gp+r — ( Qp U Qr, S, U , Sp U Sr, Fp U Fr, Tp U Tr ,zpn U cin,CpOMi U CO"' );

5) GRE (p • r) corresponds to pseudo-automaton

Gpr — (Qp U Qr, E,5p U ¿r U S U 7 Sp 7 Fr 7

Tp U Tr ,zpn U crn,CpOui U CrOui ),

where

Su — { fp —Sr | fp € Fp, Sr € S^;

6) GRE (p*) corresponds to pseudo-automaton

Gp. — ( Qp U{q}, S,Sp U Su, {q}, |q},Tp,Cpn,Cp°"i),

where q € Q is a new state, and

Su — { q ^ Sp 1 Sp € ^ fp ~^ q1 fp€ Fp}

(like ordinary regular expression and usual constructions close to the matter of [7] etc.10). Besides:

7) GRE (p) corresponds to pseudo-automaton

Gp — ( Qp U{s,f}, S,Sp, {s}, {f},

Tp u {t},Zpn u CUn,CpOui u CUui),

10 Certainly, we also add three elements of the tuple (1).

s

s

where s, f e Q are new states, t e Tp is a new element, and

CiT(t) = (s, Sp), ZSut(t) = (Fp ,f).

(Like before, we consider functions Zin and Zout as sets of their elements. Namely, we defined here function Zp" containing all the elements of function Zp" and also the specified here elements for its new argument t (i.e., set Zi"). Similarly for Zput, see Fig. 9.)

-t. "'-t: -t

Sp ö. ■■Ö.. • • • Ö

F.Q. • • • "p.- 0

,+tj +t

P

Fig. 9

End of the description of Algorithm 2. □

As we already said, the proofs of the correctness of constructions are simple for each item. Let us formulate this fact by the following proposition.

Proposition 1: Using Algorithm 2, we obtain a GNFPA defining the given GRE.11

Proof. Items 1, 2, 3 and 6 are evident. In items 4 and 5, sets T of the parts of automata (i.e., sets P and R of automata TP and TR) do not affect the languages of the other part of the same automaton. In item 7, we have the only possibility for defining the word: i.e., we have to use t in (2) for defining a word. Then we obtain the complement of language of automaton P. □

Let us remark, that the precise application of Algorithm 2 gives automaton which is significantly different from the above (Fig. 1). Therefore, having at the input GRE (4) considered before, we obtain automaton, which after trivial simplifications becomes the following one (Fig. 10):

VI. The alternative models

AND SOME DIRECTIONS FOR FURTHER RESEARCHES

The title of this section includes the word "models", and we do present four models different from one considered above. However, each time (i.e., for each model), we mean different things:

1) we consider another definition of the language of the given GNFPA, which gives the equivalent language;

2) we consider the GNFPA which is obtained based on the canonical NFA for the given language;

3) we consider another (simplified) definition of the functions Zi" and Zout of the given GNFPA (and, consequently, also another definition of the language of the pseudo-automaton);

4) vice versa, for the same functions Zi" and Zout we also consider another (complicated) definition of the language of the given GNFPA.

The main goal of the section is to give definitions of models slightly different from those introduced above and to formulate the main directions of the most detailed studies. Let us also remark, that an alternative model can be considered, i.e.,

5) the definitions introduced in [6].

1) The alternative definition of the language

In this subsection, we give the alternative definition of the language of GNFPA. Firstly, let us consider some notation for permutations. Definition 7: For a permutation P = (p1,p2,... ,pn), where n > 2, let us denote:

• a(P) = p1; i.e., the head considered as an element;

• Q(P) = (p2,p3,... ,pn); i.e., the tail considered as a sequence, which is not empty. □

Definition 8: Let GNFPA G be considered according to Definition 2. For a permutation P = (p1,p2,... ,pn), where n > 1, let us define language

Lp(G) = L(K(G)) U L1 • L2 • L3 ,

where languages L1, L2 and L3 are defined in the following way:

• if n =1, i.e., P = (p) for simplicity, then

L1 = L(G(G-p, S, j0in(p)})), L2 = L(G(G-p, ©in(p), ©out(p))), L3 = L(G(G-p, j^"(p)},F));

• if n > 2, then

L1 = A,(P)(G(G-a(p),S, {^"(«(P))})), L2 = )(G(G-a(p), ©in(a(P)), ©out(a(P)))), L3 = )(G(G-a(p), {0in(a(P))}, F)). □

S = { a, b } Fig. 10

11 That is, we really define this expression, and not just equivalent to it, as usually in such proofs. The informal explanation of this fact is the following. Firstly, we explicitly indicate the order of the automata used in applying the operation +. Secondly, the process of constructing the pseudo-automaton described here explicitly determines the only possible order of appearance of elements of set T (for the obtained automaton).

In the next paper, we shall prove that two considered definitions (this one and Main Definition 1) are equivalent, i.e., they define the same language. As we said before, we do not obtain the estimates of the complexity of the algorithms formulated before; we are going to do this thing in the next paper. However, there is evident, that both algorithms corresponding to this model (i.e., algorithm for obtaining corresponding GRE and algorithm checking, whether the word belongs to the GNFPA) are much less complex than algorithms corresponding to Main Definition 1.

2) Pseudo-automaton obtained on the base of the canonical NFA

In this approach, all the above definitions are retained in their original form. We consider ordinary canonical NFAs with some elements added for functions Zin and Zoui (as before, we consider them as the set of their elements). Let us briefly describe the process of constructing such an automaton.

1) We obtain ordinary canonical NFA. But unlike most of our previous papers ([3], [4], [11], [12]), we consider here canonical NFA which may have so called "dead" state; see the details in our quoted papers, for instance, [9, Footnote 1]. Let the set of canonical NFA be Qn, also like [9].

We choose an arbitrary function that assigns to different natural numbers (the set of these numbers will be T) all different ordered pairs of states of the constructed automaton.

For each such pair (let it be (q, q') for the chosen t g T), we add to function Zin (it again is considered as the set) element Zin(t) = (q, {q}). For the considered pair, we also add to function Zoui element Z°Mi(t) = (Qn \ {q'}, q').

As we said before, we are going to continue this model in some next papers. In particular, we prove the correctness of our constructions (i.e., that we really define the regular language we need) and also describe some properties of the obtained automata. For now, we will briefly consider an example.

In this example, we will continue to explore the language considered in the above examples of this paper. We can assume, that automaton of Fig. 8 is a canonical one; and on the following Fig. 11, we give the same automaton with re-designation of its stats by A and B (like our usual notation) and with addition of the "dead" state N:

2)

3)

4)

-2

+6

(We can even assume here, that T = { 2, 6 }, not showing in the figure its other elements. Remark also once again, that we denote the states of ordinary NFAs by double circles, and the states of ordinary GNFPAs by single circles.)

3) The simplified definition of pseudo-automaton

Let us distinguish the simplified model from our basic approach.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

• In Definition 2, we change both functions Zin and Zoui for functions of the type

Zin,Zoui : T ^ Q ;

• In Main Definition 1, the three auxiliary pseudo-automata are the following ones:

1) G^fc = G(G-fc,S, {Zin(k)});

2) G[fc] = G (G_fc, {Zin(k)}, {Z°Mi(k)});

3) and Gfc^ = G (G_fc, {Zoui(k)}, F). All other definitions remain as before.

In this model, it is more convenient to use slightly modified principles for arrows and symbols in the pictures. Because values of functions Zin and Zoui are single states (not set of states), then for each t T, it is more convenient to write arrows from Zin(t) to Zoui(t) marking simply t (neither -t, nor +t). Let us consider an example, Fig. 13:

KîhKSMS ■ -A

Fig. 11

Among the 9 elements of the set being formed, let us select 2 ones, (A, B) and (B, N); apparently, it is most convenient to denote the corresponding elements of set T by 2 and 6 (because A is the first element, then (A, A) is the first pair, ..., (N, N) is the last pair). Let us consider the following Fig. 12; that is automaton of Fig. 11 with the addition of the usual notation for functions Zin and Zoui, corresponding to the said elements 2 and 6 of set T.

+2

+2

Fig. 12

S = { a,b }

Fig. 13

We can prove that for the definition given here, the pseudo-automaton accepts the same language that we considered all the above in this paper. 12

4) The complicated definition of pseudo-automaton

As the last model, let us very briefly distinguish the complicated model from our basic approach. In fact, there is the only (but extremely important) difference, i.e., in Main Definition 1, the three auxiliary pseudo-automata are the following ones:

1) G^fc is changed for NFA K (G, S, {Zin(k)});

2) G[fc] = G (G, {Zin(k)}, {Zoui(k)});

3) Gfc^ is changed for NFA K (G, {Zoui(k)}, F).

Remark that the first automaton and the last one are written even easier than ones of the basic model; certainly, their languages are languages of ordinary NFAs. However, changing G-k for G in the second automaton greatly complicates all the corresponding algorithms: we can apply this recursive definition arbitrarily many times, but the definition is correct. In this paper, we shall not consider the resulting languages of this model.

12 It is very important to note that using this approach, we obtain nonempty languages corresponding, for example, to sequence [2,1, 3] (not only for sequences [1, 2, 3] and [1, 3, 3], as in our main approach). However, for each such sequence, we obtain here the same language.

1

As we said before, we only described the models in this section. In some next papers, we are going consider them in detail, in particular, to prove the facts briefly formulated in this paper.

VII. Conclusion

We can say that in this paper, we have only described the terminology and proved the simple statements. In new paper, we are going to apply methods, which are similar to those we considered in previous papers:

1) the consideration of another (equivalent) definition of the language of the given GNFPA uses the methods we applied in [5], [6], [13], [14];

2) the consideration of "canonical GNFPA for the given language" uses the methods we applied in [6], [11], [12];

3) the consideration of "simplified definition" uses the methods we applied in [4], [15];

4) and the consideration of "complicated definition" uses the methods we applied in [3], [6], [13].

References

[1] Kirsten D. and Maurer I. On the determinization of weighted automata. Journal of Automata, Languages and Combinatorics. 2005, vol. 10, no. 2/3. pp. 287-312.

[2] Kirsten D. Distance desert automata and the star height problem. Informatique Théorique et Applications. 2005, vol.39, no.3. pp. 455509.

[3] Melnikov B. and VakhitovaA.. Some more on the finite automata. The Korean Journal of Computational and Applied Mathematics. 1998, vol. 5, no. 3. pp. 495-506.

[4] Melnikov B. Extended nondeterministic finite automata. Fundamenta Informaticae. 2010, vol. 104, no.3. pp. 255-265.

[5] VylitokA., Zubova M. and Melnikov B. Ob odnom rasshirenii klassa konechnyh avtomatov ... [About one extension of the class of finite automata for accepting context-free languages]. Vestnik of Moscow University. Series 15: Computational mathematics and cybernetics. 2013, no. 1. pp. 39-45. (in Russian)

[6] Baumgartner S. and Melnikov B. Obobschennye nedeterminirovannye konechnye avtomaty [Generalizing nondeterministic finite automata]. Izvestiya of Higher Educational Institutions. Volga Region. Phisical and Mathematical Sciences, 2013, no. 2(26), pp. 64-74. (in Russian)

[7] Salomaa A. Jewels of Formal Language Theory. Computer Science Press, 1981, 144 p.

[8] Hromkovicj. Theoretical Computer Science. An Introduction to Automata, Computability, Complexity, Algorithmics, Randomization, Communication, and Cryptography. Springer, 2003. 321 p.

[9] Melnikov B. The complete finite automaton. International Journal of Open Information Technologies. 2017, vol.5, no. 10, pp.9-17.

[10] Brauer W. Automatentheorie. Eine Einfuhrung in die Theorie endlicher Automaten. Stuttgart: B.G.Teubner, 1984, 493 S. (in German)

[11] Melnikov B. and MelnikovaA. Edge-minimization of non-deterministic finite automata. The Korean Journal of Computational and Applied Mathematics. 2001, vol.8, no.3. pp.469-479.

[12] Melnikov B. and Melnikova A. Mnogoaspektnaya minimizaciya nede-terminirovannyh konechnyh avtomatov ... [Multi-aspect minimization of nondeterministic finite automaton (Part I. Auxiliary facts and algorithms)]. Izvestiya of Higher Educational Institutions. Volga Region. Phisical and Mathematical Sciences, 2011, no. 4, pp. 59-69. (in Russian)

[13] Melnikov B. and MelnikovaA. Some properties of the basis finite automaton. The Korean Journal of Computational and Applied Mathematics. 2002, vol.9, no. 1. pp. 135-150.

[14] Melnikov B. and Sciarini-Guryanova N. Possible edges of a finite automaton defining a given regular language. The Korean Journal of Computational and Applied Mathematics. 2002, vol. 9, no. 2. pp. 475485.

[15] Melnikov B. and Sayfullina M. O nekotoryh algoritmah ekviva-lentnogo preobrazovaniya nedeterminirovannyh konechnyh avtomatov [On some algorithms for the equivalent transformation of nondeterministic finite automata]. Izvestiya of Higher Educational Institutions. Mathematics, 2009, no. 4, pp. 67-72. (in Russian)

i Надоели баннеры? Вы всегда можете отключить рекламу.