• Tidak ada hasil yang ditemukan

Decision trees for regular factorial languages

N/A
N/A
Protected

Academic year: 2024

Membagikan "Decision trees for regular factorial languages"

Copied!
8
0
0

Teks penuh

(1)

Decision trees for regular factorial languages

Item Type Article

Authors Moshkov, Mikhail

Citation Moshkov, M. (2022). Decision trees for regular factorial languages.

Array, 15, 100203. https://doi.org/10.1016/j.array.2022.100203 Eprint version Publisher's Version/PDF

DOI 10.1016/j.array.2022.100203

Publisher Elsevier BV

Journal Array

Rights Β© 2022. The Author(s). Published by Elsevier Inc. This is an open access article under the CC-BY-NC-ND 4.0 license http://

creativecommons.org/licenses/by-nc-nd/4.0/

Download date 2023-12-24 21:12:58

Item License https://creativecommons.org/licenses/by-nc-nd/4.0/

Link to Item http://hdl.handle.net/10754/674913

(2)

Array 15 (2022) 100203

Available online 8 June 2022

2590-0056/Β© 2022 The Author(s). Published by Elsevier Inc. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by- nc-nd/4.0/).

Contents lists available atScienceDirect

Array

journal homepage:www.elsevier.com/locate/array

Decision trees for regular factorial languages

Mikhail Moshkov

Computer, Electrical and Mathematical Sciences and Engineering Division and Computational Bioscience Research Center, King Abdullah University of Science and Technology (KAUST), Thuwal 23955-6900, Saudi Arabia

A R T I C L E I N F O

Keywords:

Regular factorial language Recognition problem Membership problem Deterministic decision tree Nondeterministic decision tree

A B S T R A C T

In this paper, we study arbitrary regular factorial languages over a finite alphabet𝛴. For the set of words 𝐿(𝑛)of the length𝑛belonging to a regular factorial language𝐿, we investigate the depth of decision trees solving the recognition and the membership problems deterministically and nondeterministically. In the case of recognition problem, for a given word from𝐿(𝑛), we should recognize it using queries each of which, for some π‘–βˆˆ {1,…, 𝑛}, returns the𝑖th letter of the word. In the case of membership problem, for a given word over the alphabet𝛴of the length𝑛, we should recognize if it belongs to the set𝐿(𝑛)using the same queries. For a given problem and type of trees, instead of the minimum depthβ„Ž(𝑛)of a decision tree of the considered type solving the problem for𝐿(𝑛), we study the smoothed minimum depth𝐻(𝑛) = max{β„Ž(π‘š) βˆΆπ‘šβ‰€π‘›}. With the growth of𝑛, the smoothed minimum depth of decision trees solving the problem of recognition deterministically is either bounded from above by a constant, or grows as a logarithm, or linearly. For other cases (decision trees solving the problem of recognition nondeterministically, and decision trees solving the membership problem deterministically and nondeterministically), with the growth of𝑛, the smoothed minimum depth of decision trees is either bounded from above by a constant or grows linearly. As corollaries of the obtained results, we study joint behavior of smoothed minimum depths of decision trees for the considered four cases and describe five complexity classes of regular factorial languages. We also investigate the class of regular factorial languages over the alphabet{0,1}each of which is given by one forbidden word.

1. Introduction

In this paper, we study arbitrary regular factorial languages over a finite alphabet𝛴. A factorial language satisfies the following condition:

if a word𝑀1𝑒𝑀2belongs to the language, then the word𝑒also belongs to it. For the set of words𝐿(𝑛)of the length𝑛belonging to a regular factorial language𝐿, we investigate the depth of decision trees solving the recognition and the membership problems deterministically and nondeterministically. In the case of recognition problem, for a given word from 𝐿(𝑛), we should recognize it using queries each of which, for someπ‘–βˆˆ {1,…, 𝑛}, returns the𝑖th letter of the word. In the case of membership problem, for a given word over the alphabet𝛴of the length 𝑛, we should recognize if it belongs to 𝐿(𝑛) using the same queries.

For a given problem (problem of recognition or membership prob- lem) and type of trees (solving the problem deterministically or non- deterministically), instead of the minimum depth β„Ž(𝑛)of a decision tree of the considered type solving the problem for𝐿(𝑛), we study the smoothed minimum depth𝐻(𝑛) = max{β„Ž(π‘š) βˆΆπ‘šβ‰€π‘›}.

For an arbitrary regular factorial language, with the growth of 𝑛, the smoothed minimum depth of decision trees solving the problem of recognition deterministically is either bounded from above by a

E-mail address: [email protected].

constant, or grows as a logarithm, or linearly. These results follow immediately from more general, obtained in [1] for arbitrary regular languages.

For other cases (decision trees solving the problem of recognition nondeterministically, and decision trees solving the membership prob- lem deterministically and nondeterministically), with the growth of 𝑛, the smoothed minimum depth of decision trees is either bounded from above by a constant, or grows linearly. In the conference pa- per [2], a classification of arbitrary regular languages depending on the smoothed minimum depth of decision trees solving the problem of recognition nondeterministically was announced without proofs. In the present paper, we consider simpler classification for regular factorial languages with full proof. Results related to the decision trees solving the membership problem are new.

As corollaries of the obtained results, we study joint behavior of smoothed minimum depths of decision trees for the considered four cases and describe five complexity classes of regular factorial lan- guages. We also investigate the class of regular factorial languages over the alphabet𝐸= {0,1}each of which is given by one forbidden word.

A well-known approach to evaluate complexity of an infinite lan- guage𝐿over a finite alphabet𝛴is to study its so-called combinatorial

https://doi.org/10.1016/j.array.2022.100203

Received 7 January 2022; Received in revised form 2 June 2022; Accepted 3 June 2022

(3)

2 complexity (known also as counting function)𝑓𝐿(𝑛)that is the number of words of the length 𝑛 in 𝐿 [3,4]. The present paper proposes additional ways to evaluate the complexity of the language𝐿based on the study how the depth of decision trees solving the recognition and the membership problems deterministically and nondeterministically depends on the length of words. This way is more complicated, but can give more detailed classification of languages. To show this, we compare languages generated by diagrams𝐼3and𝐼4depicted inFigs. 5 and6. For both languages, the counting function grows linearly. For the first language, the minimum depth of decision trees solving the problem of recognition deterministically grows as a logarithm, but for the second language, the minimum depth of decision trees solving the problem of recognition deterministically grows linearly.

We should mention a recent paper [5] in which similar results were obtained for languages over the alphabet 𝐸that are subword-closed:

if a word𝑀1𝑒1𝑀2β‹―π‘€π‘šπ‘’π‘šπ‘€π‘š+1belongs to the language, then the word 𝑒1β‹―π‘’π‘šalso belongs to it.

It is clear that each subword-closed language is a factorial language.

Moreover, each subword-closed language over a finite alphabet is a regular language [6]. One can show that the language 𝐿(00) over the alphabet𝐸given by one forbidden word00is a regular factorial language, which is not subword-closed. Therefore the class of subword- closed languages over the alphabet𝐸is a proper subclass of the class of regular factorial languages over the alphabet𝐸.

The main difference between the present paper and [5] is that, in the latter paper, we do not assume that the subword-closed lan- guages are given by deterministic finite automata. Instead of this, we describe simple criteria (based on the presence in the language of words of special types) for the behavior of the minimum depths of decision trees solving the problem of recognition deterministically and nondeterministically. Differently formulated criteria for the behavior of the minimum depth of decision trees solving the recognition problem require very different proofs. One more difference is that in [5] we directly consider the minimum depth of decision trees.

The rest of the paper is organized as follows. In Section 2, we consider main notions, in Section 3– main results, and in Section4 – two corollaries of these results.

2. Main notions

In this section, we discuss the notions related to regular facto- rial languages and decision trees solving problems of recognition and membership for these languages.

2.1. Regular factorial languages

Letπœ”= {0,1,2,…}be the set of nonnegative integers and𝛴be a finite alphabet with at least two letters. Byπ›΄βˆ—, we denote the set of all finite words over the alphabet𝛴, including the empty wordπœ†. A word π‘€βˆˆπ›΄βˆ—is called a factor of a wordπ‘’βˆˆπ›΄βˆ—if𝑒=𝑣1𝑀𝑣2and𝑣1, 𝑣2βˆˆπ›΄βˆ—. A language 𝐿 βŠ† π›΄βˆ— is called factorial if it contains all factors of its words. A word 𝑀 ∈ π›΄βˆ—is called a minimal forbidden word for𝐿if π‘€βˆ‰πΏand all proper factors of𝑀belong to𝐿. We denote by𝑀 𝐹(𝐿) the language of minimal forbidden words for𝐿. It is known [7] that a factorial language𝐿is regular if and only if the language𝑀 𝐹(𝐿)is regular. In particular, a factorial language𝐿with a finite set of minimal forbidden words𝑀 𝐹(𝐿)is regular. In this paper, we study arbitrary nonempty regular factorial languages.

It is well known that each regular language can be represented by a deterministic finite automaton (DFA) [8]. As in [8], we will consider not only complete DFA with total transition function but also partial DFA with partial transition function. Such DFA can be represented by its transition diagram (diagram for short) [9].

A diagram over the alphabet𝛴 is a triple𝐼 = (𝐺, π‘ž0, 𝑄), where𝐺 is a finite directed graph, possibly with multiple edges and loops, in which each edge is labeled with a letter from𝛴and edges leaving each

node are labeled with pairwise different letters,π‘ž0is a node of𝐺called starting, and𝑄is a nonempty set of the graph𝐺nodes called final.

A path of the diagram𝐼is an arbitrary sequenceπœ‰=𝑣1, 𝑑1,…, π‘£π‘š, π‘‘π‘š, π‘£π‘š+1of nodes and edges of𝐺such that the edge𝑑𝑖leaves the node 𝑣𝑖and enters the node𝑣𝑖+1for𝑖= 1,…, π‘š. We now define a word𝑀(πœ‰) fromπ›΄βˆ— in the following way: ifπ‘š = 0, then𝑀(πœ‰) = πœ†. Letπ‘š > 0 and let𝛿𝑗 be the letter attached to the edge 𝑑𝑗, 𝑗 = 1,…, π‘š. Then 𝑀(πœ‰) =𝛿1β‹―π›Ώπ‘š. We say that the pathπœ‰generates the word𝑀(πœ‰). Note that different paths which start in the same node generate different words.

We denote by𝛯(𝐼) the set of all paths of the diagram𝐼 each of which starts in the nodeπ‘ž0and finishes in a node from𝑄. Let 𝐿𝐼 = {𝑀(πœ‰) βˆΆπœ‰βˆˆπ›―(𝐼)}.

We say that the diagram𝐼generates the language𝐿𝐼. It is well known that𝐿𝐼 is a regular language.

The diagram𝐼 is called complete over the alphabet 𝛴 if exactly

|𝛴| edges leave each node of 𝐺. Note that these edges are labeled with pairwise different letters from𝛴. Such diagram corresponds to a complete DFA [8]. The diagram𝐼is called reduced if, for each node of 𝐺, there exists a path from𝛯(𝐼), which contains this node. Such diagram corresponds to a reduced DFA [8]. It is known [8] that, for each regular language over the alphabet𝛴, there exists a complete over the alphabet𝛴diagram, which generates this language. Therefore, for each nonempty regular language, there exists a reduced diagram, which generates this language.

Let 𝐿 be a regular factorial language and 𝐼 = (𝐺, π‘ž0, 𝑄) be a reduced diagram that generates the language𝐿. Since the language𝐿is factorial, we can assume additionally that each node of the graph𝐺is final β€” it will not change the language generated by𝐼since with each word the language𝐿contains each prefix of this word. The diagram 𝐼will be called f-reduced if it is reduced and each node of the graph 𝐺is final. Further we will assume that a considered regular factorial language𝐿is nonempty and it is given by an f-reduced diagram, which generates this language.

We will not consider nondeterministic finite automata (NFA) to rep- resent regular factorial languages since the study of NFA is essentially more complicated task.

2.2. Decision trees for recognition and membership problems

Let 𝐿 be a regular factorial language over the alphabet 𝛴. For any natural𝑛, denote𝐿(𝑛) = πΏβˆ©π›΄π‘›, where 𝛴𝑛 is the set of words over the alphabet 𝛴, which length is equal to 𝑛. We consider two problems related to the set 𝐿(𝑛). The problem of recognition: for a given word from𝐿(𝑛), we should recognize it using attributes (queries) 𝑙𝑛

1,…, 𝑙𝑛𝑛, where𝑙𝑛

𝑖,π‘–βˆˆ {1,…, 𝑛}, is a function from𝛴𝑛to𝛴such that 𝑙𝑛𝑖(π‘Ž1β‹―π‘Žπ‘›) =π‘Žπ‘–for any wordπ‘Ž1β‹―π‘Žπ‘›βˆˆπ›΄π‘›. The problem of membership:

for a given word from𝛴𝑛, we should recognize if this word belongs to the set𝐿(𝑛)using the same attributes. To solve these problems, we use decision trees over𝐿(𝑛).

A decision tree over𝐿(𝑛)is a marked finite directed tree with root, which has the following properties:

β€’ The root and the edges leaving the root are not labeled.

β€’ Each node, which is not the root nor terminal node, is labeled with an attribute from the set{𝑙𝑛1,…, 𝑙𝑛𝑛}.

β€’ Each edge leaving a node, which is not a root, is labeled with a letter from the alphabet𝛴.

A decision tree over𝐿(𝑛)is called deterministic if it satisfies the following conditions:

β€’ Exactly one edge leaves the root.

β€’ For any node, which is not the root nor terminal node, the edges leaving this node are labeled with pairwise different letters.

(4)

Fig. 1. Decision trees that solve the problem of recognition for the set of words {100,010,001}deterministically and nondeterministically.

Let 𝛀 be a decision tree over 𝐿(𝑛). A complete path in 𝛀 is any sequenceπœ‰=𝑣0, 𝑒0,…, π‘£π‘š, π‘’π‘š, π‘£π‘š+1of nodes and edges of𝛀 such that 𝑣0 is the root,π‘£π‘š+1is a terminal node, and𝑣𝑖is the initial and𝑣𝑖+1is the terminal node of the edge 𝑒𝑖 for𝑖= 0,…, π‘š. We define a subset 𝛴(𝑛, πœ‰)of the set𝛴𝑛in the following way: ifπ‘š= 0, then𝛴(𝑛, πœ‰) =𝛴𝑛. Letπ‘š >0, the attribute𝑙𝑛

𝑖𝑗 be attached to the node𝑣𝑗, and𝑏𝑗 be the letter attached to the edge𝑒𝑗,𝑗= 1,…, π‘š. Then

𝛴(𝑛, πœ‰) = {π‘Ž1β‹―π‘Žπ‘›βˆˆπ›΄π‘›βˆΆπ‘Žπ‘–

1=𝑏1,…, π‘Žπ‘–

π‘š =π‘π‘š}.

Let 𝐿(𝑛) β‰  βˆ…. We say that a decision tree 𝛀 over 𝐿(𝑛)solves the problem of recognition for𝐿(𝑛)nondeterministically if𝛀 satisfies the following conditions:

β€’Each terminal node of𝛀 is labeled with a word from𝐿(𝑛).

β€’For any wordπ‘€βˆˆπΏ(𝑛), there exists a complete pathπœ‰in the tree 𝛀 such thatπ‘€βˆˆπ›΄(𝑛, πœ‰).

β€’For any wordπ‘€βˆˆπΏ(𝑛)and for any complete pathπœ‰in the tree𝛀 such thatπ‘€βˆˆπ›΄(𝑛, πœ‰), the terminal node of the pathπœ‰is labeled with the word𝑀.

We say that a decision tree𝛀 over𝐿(𝑛)solves the problem of recog- nition for𝐿(𝑛) deterministically if𝛀 is a deterministic decision tree, which solves the problem of recognition for𝐿(𝑛)nondeterministically.

Examples of decision trees illustrating the considered notions are presented inFig. 1.

We say that a decision tree 𝛀 over 𝐿(𝑛) solves the problem of membership for 𝐿(𝑛)nondeterministically if𝛀 satisfies the following conditions:

β€’Each terminal node of𝛀 is labeled with a number from the set {0,1}.

β€’For any wordπ‘€βˆˆπ›΄π‘›, there exists a complete pathπœ‰in the tree 𝛀 such thatπ‘€βˆˆπ›΄(𝑛, πœ‰).

β€’For any wordπ‘€βˆˆπ›΄π‘›and for any complete pathπœ‰in the tree𝛀 such thatπ‘€βˆˆπ›΄(𝑛, πœ‰), the terminal node of the pathπœ‰is labeled with the number1ifπ‘€βˆˆπΏ(𝑛)and with the number0, otherwise.

We say that a decision tree𝛀over𝐿(𝑛)solves the problem of mem- bership for𝐿(𝑛)deterministically if𝛀 is a deterministic decision tree which solves the problem of membership for𝐿(𝑛)nondeterministically.

Let𝛀be a decision tree over𝐿(𝑛). We denote byβ„Ž(𝛀)the maximum number of nodes in a complete path in 𝛀 that are not the root nor terminal node. The valueβ„Ž(𝛀)is called the depth of the decision tree 𝛀.

We denote byβ„Žπ‘Ÿπ‘ŽπΏ(𝑛)(β„Žπ‘Ÿπ‘‘πΏ(𝑛)) the minimum depth of a decision tree over 𝐿(𝑛), which solves the problem of recognition for𝐿(𝑛) nonde- terministically (deterministically). If𝐿(𝑛) = βˆ…, thenβ„Žπ‘Ÿπ‘Ž

𝐿(𝑛) = β„Žπ‘Ÿπ‘‘

𝐿(𝑛) = 0.

We denote by β„Žπ‘šπ‘Ž

𝐿 (𝑛) (β„Žπ‘šπ‘‘πΏ (𝑛)) the minimum depth of a decision tree over 𝐿(𝑛), which solves the problem of membership for 𝐿(𝑛) nondeterministically (deterministically). If 𝐿(𝑛) = βˆ…, then β„Žπ‘šπ‘Ž

𝐿 (𝑛) = β„Žπ‘šπ‘‘

𝐿 (𝑛) = 0.

3. Bounds on decision tree depth

Let 𝐿 be a nonempty factorial regular language. In this section, we consider the behavior of four functionsπ»π‘Ÿπ‘Ž

𝐿,π»π‘Ÿπ‘‘

𝐿, π»π‘šπ‘Ž

𝐿 , andπ»π‘šπ‘‘

𝐿

defined on the setπœ”β§΅{0}and with values fromπœ”. For any natural𝑛, π»π‘Ÿπ‘Ž

𝐿(𝑛) = max{β„Žπ‘Ÿπ‘ŽπΏ(π‘š) ∢ 1β‰€π‘šβ‰€π‘›}, π»π‘Ÿπ‘‘

𝐿(𝑛) = max{β„Žπ‘Ÿπ‘‘πΏ(π‘š) ∢ 1β‰€π‘šβ‰€π‘›}, π»π‘šπ‘Ž

𝐿 (𝑛) = max{β„Žπ‘šπ‘ŽπΏ(π‘š) ∢ 1β‰€π‘šβ‰€π‘›}, π»π‘šπ‘‘

𝐿 (𝑛) = max{β„Žπ‘šπ‘‘πΏ (π‘š) ∢ 1β‰€π‘šβ‰€π‘›}.

For any pairπ‘π‘βˆˆ {π‘Ÿπ‘Ž, π‘Ÿπ‘‘, π‘šπ‘Ž, π‘šπ‘‘}, the function𝐻𝑏𝑐

𝐿(𝑛)is a smoothed analog of the functionβ„Žπ‘π‘

𝐿(𝑛).

3.1. Decision trees solving recognition problem deterministically

Let𝐼 = (𝐺, π‘ž0, 𝑄)be a f-reduced diagram over the alphabet 𝛴. A path of the diagram𝐼 is called a cycle of the diagram𝐼 if there is at least one edge in this path, and the first node of this path is equal to the last node of this path. A cycle of the diagram𝐼is called elementary if nodes of this cycle, with the exception of the last node, are pairwise different.

The diagram𝐼 is called simple if every two different elementary cycles of the diagram𝐼do not have common nodes. Let𝐼be a simple diagram and πœ‰ be a path of the diagram𝐼. The number of different elementary cycles of the diagram𝐼, which have common nodes with πœ‰, is denoted by𝑐𝑙(πœ‰)and is called the cyclic length of the pathπœ‰. The value

𝑐𝑙(𝐼) = max{𝑐𝑙(πœ‰) βˆΆπœ‰βˆˆπ›―(𝐼)}

is called the cyclic length of the diagram𝐼.

Let𝐼be a simple diagram,𝐢be an elementary cycle of the diagram 𝐼, and𝑣be a node of the cycle𝐢. Beginning with the node𝑣, the cycle 𝐢generates an infinite periodic word over the alphabet𝛴. This word will be denoted byπ‘Š(𝐼 , 𝐢, 𝑣). We denote byπ‘Ÿ(𝐼 , 𝐢, 𝑣)the minimum period of the word π‘Š(𝐼 , 𝐢, 𝑣). The diagram 𝐼 is called dependent if there exist two different elementary cycles𝐢1 and𝐢2 of the diagram 𝐼, nodes𝑣1and𝑣2 of the cycles𝐢1and𝐢2, respectively, and a pathπœ‹ of the diagram𝐼from𝑣1to𝑣2, which satisfy the following conditions:

π‘Š(𝐼 , 𝐢1, 𝑣1) =π‘Š(𝐼 , 𝐢2, 𝑣2)and the length of the pathπœ‹is a number di- visible byπ‘Ÿ(𝐼 , 𝐢1, 𝑣1). If the diagram𝐼is not dependent, then it is called independent. Next theorem follows immediately from Theorem 2.1 [1], which is a similar statement that holds for all regular languages.

Theorem 1. Let 𝐿be a nonempty regular factorial language over the alphabet𝛴and𝐼be a f-reduced diagram, which generates the language𝐿.

Then the following statements hold:

(a) If𝐼is an independent simple diagram and𝑐𝑙(𝐼)≀1, thenπ»π‘Ÿπ‘‘

𝐿(𝑛) = 𝑂(1).

(b) If𝐼is an independent simple diagram and𝑐𝑙(𝐼)β‰₯2, thenπ»π‘Ÿπ‘‘

𝐿(𝑛) = 𝛩(log𝑛).

(c) If𝐼is not independent simple diagram, thenπ»π‘Ÿπ‘‘

𝐿(𝑛) =𝛩(𝑛).

3.2. Decision trees solving recognition problem nondeterministically Let𝐿be a nonempty regular factorial language over the alphabet 𝛴. For any natural𝑛, we define a parameter𝑇𝐿(𝑛)of the language𝐿.

If𝐿(𝑛) = βˆ…, then𝑇𝐿(𝑛) = 0. Let𝐿(𝑛)β‰  βˆ…,𝑀 = π‘Ž1β‹―π‘Žπ‘› ∈ 𝐿(𝑛), and 𝐽 βŠ† {1,…, 𝑛}. Denote𝐿(𝑀, 𝐽) = {𝑏1⋯𝑏𝑛 ∈ 𝐿(𝑛) ∢ 𝑏𝑗 = π‘Žπ‘—, 𝑗 ∈ 𝐽} (if 𝐽 = βˆ…, then 𝐿(𝑀, 𝐽) = 𝐿(𝑛)) and 𝑀𝐿(𝑛, 𝑀) = min{|𝐽| ∢ 𝐽 βŠ† {1,…, 𝑛},|𝐿(𝑀, 𝐽)|= 1}. Then

𝑇𝐿(𝑛) = max{𝑀𝐿(𝑛, 𝑀) βˆΆπ‘€βˆˆπΏ(𝑛)}.

Note that, for any wordπ‘€βˆˆπΏ(𝑛),𝑀𝐿(𝑛, 𝑀)is the minimum number of letters of the word𝑀, which allow us to distinguish it from all other words belonging to𝐿(𝑛).

(5)

4 Lemma 2. Let 𝐿 be a nonempty regular factorial language over the alphabet𝛴. Thenβ„Žπ‘Ÿπ‘Ž

𝐿(𝑛) =𝑇𝐿(𝑛)for any natural𝑛.

Proof. First, we prove thatβ„Žπ‘Ÿπ‘Ž

𝐿(𝑛)β‰₯𝑇𝐿(𝑛). Let𝛀be a decision tree over 𝐿(𝑛), which solves the problem of recognition for𝐿(𝑛)nondeterministi- cally and for whichβ„Ž(𝛀) =β„Žπ‘Ÿπ‘Ž

𝐿(𝑛). Let𝑀be a word from𝐿(𝑛)for which 𝑇𝐿(𝑛) =𝑀𝐿(𝑛, 𝑀). Then the decision tree𝛀 contains a complete pathπœ‰ such thatπ‘€βˆˆπ›΄(𝑛, πœ‰)and the terminal node of the pathπœ‰is labeled with the word𝑀. It is clear that𝛴(𝑛, πœ‰) ∩𝐿(𝑛) = {𝑀}. Letπœ‰containπ‘šnodes that are not the root nor terminal node and 𝑙𝑛𝑖

1,…, 𝑙𝑛𝑖

π‘š be attributes attached to these nodes. Denote𝐽 = {𝑖1,…, π‘–π‘š}. Then𝐿(𝑀, 𝐽) = {𝑀}.

Therefore π‘š β‰₯ 𝑀𝐿(𝑛, 𝑀) = 𝑇𝐿(𝑛). It is clear that β„Ž(𝛀) β‰₯ π‘š. Thus, β„Žπ‘Ÿπ‘Ž

𝐿(𝑛) =β„Ž(𝛀)β‰₯π‘šβ‰₯𝑀𝐿(𝑛, 𝑀) =𝑇𝐿(𝑛).

We now prove that β„Žπ‘Ÿπ‘Ž

𝐿(𝑛) ≀ 𝑇𝐿(𝑛). One can show that, for each 𝑀 ∈ 𝐿(𝑛), we can construct a complete pathπœ‰π‘€, which satisfies the following conditions: the number of nodes inπœ‰π‘€that are not the root nor terminal node is equal to𝑀𝐿(𝑛, 𝑀),𝛴(𝑛, πœ‰π‘€) ∩𝐿(𝑛) = {𝑀}, and the terminal node ofπœ‰π‘€is labeled with the word𝑀. If we merge roots of all pathsπœ‰π‘€,π‘€βˆˆπΏ(𝑛), we obtain a decision tree, which solves the problem of recognition for𝐿(𝑛)nondeterministically and which depth is equal to𝑇𝐿(𝑛). Thus,β„Žπ‘Ÿπ‘Ž

𝐿(𝑛)≀𝑇𝐿(𝑛)andβ„Žπ‘Ÿπ‘Ž

𝐿(𝑛) =𝑇𝐿(𝑛). β–‘

Theorem 3. Let𝐿 be a nonempty regular factorial language over the alphabet𝛴and𝐼= (𝐺, π‘ž0, 𝑄)be a f-reduced diagram, which generates the language𝐿. Then the following statements hold:

(a) If𝐼is an independent simple diagram, thenπ»π‘Ÿπ‘Ž

𝐿(𝑛) =𝑂(1).

(b) If𝐼is not independent simple diagram, thenπ»π‘Ÿπ‘Ž

𝐿(𝑛) =𝛩(𝑛).

Proof. (a) Let𝐼be an independent simple diagram and𝑐𝑙(𝐼)≀1. By Theorem 1,π»π‘Ÿπ‘‘

𝐿(𝑛) =𝑂(1). It is clear thatπ»π‘Ÿπ‘Ž

𝐿(𝑛)β‰€π»π‘Ÿπ‘‘

𝐿(𝑛). Therefore π»πΏπ‘Ÿπ‘Ž(𝑛) =𝑂(1).

Let𝐼 be an independent simple diagram and𝑐𝑙(𝐼)β‰₯2. Let𝑛be a natural number. If𝐿(𝑛) = βˆ…, then𝑇𝐿(𝑛) = 0. Let𝐿(𝑛)β‰ βˆ…. Denote by𝑑 the number of nodes in the graph𝐺. In the proof of Lemma 4.5 [1], it was proved that𝑀𝐿(𝑛, 𝑀)≀𝑑(4𝑑+ 1)for any wordπ‘€βˆˆπΏ(𝑛). Therefore 𝑇𝐿(𝑛)≀𝑑(4𝑑+ 1). Thus, byLemma 2,β„Žπ‘Ÿπ‘ŽπΏ(𝑛)≀𝑑(4𝑑+ 1)for any natural 𝑛andπ»π‘Ÿπ‘Ž

𝐿(𝑛) =𝑂(1).

(b) Let𝐼be not simple diagram and𝐢1, 𝐢2be different elementary cycles of the diagram𝐼, which have a common node𝑣. Since 𝐼 is a f-reduced diagram, it contains a pathπœ‰from the nodeπ‘ž0to the node 𝑣, and 𝑣is a final node. Let the length of the path πœ‰ be equal to π‘Ž, the length of the cycle𝐢1 be equal to𝑏, and the length of the cycle 𝐢2 be equal to𝑐. Let𝛼be the word generated by the pathπœ‰,𝛽be the word generated by a path from𝑣to𝑣obtained by the passage𝑐times along the cycle𝐢1, and𝛾be the word generated by a path from𝑣to𝑣 obtained by the passage𝑏times along the cycle𝐢2. The words𝛽and𝛾 are different and they have the same length𝑏𝑐.

Consider the sequence of numbers 𝑛𝑖 = π‘Ž+𝑖𝑏𝑐, 𝑖 = 1,2,…. Let π‘–βˆˆπœ”β§΅{0}. The set𝐿(𝑛𝑖)contains the word𝛼𝛾𝑖and the wordsπ›Όπ›Ύπ‘—π›½π›Ύπ‘–βˆ’π‘—βˆ’1 for𝑗= 0,…, π‘–βˆ’ 1. It is easy to show that𝑀𝐿(𝑛𝑖, 𝛼𝛾𝑖)β‰₯𝑖: to distinguish the word𝛼𝛾𝑖from the wordsπ›Όπ›Ύπ‘—π›½π›Ύπ‘–βˆ’π‘—βˆ’1,𝑗= 0,…, π‘–βˆ’ 1, we need to use at least one letter from each of𝑖words𝛾appearing in𝛼𝛾𝑖. Therefore 𝑇𝐿(𝑛𝑖) β‰₯ 𝑖and, byLemma 2, β„Žπ‘Ÿπ‘Ž

𝐿(𝑛𝑖) β‰₯ 𝑖 = (π‘›π‘–βˆ’π‘Ž)βˆ•(𝑏𝑐). Let𝑛 β‰₯ 𝑛1 and let𝑖be the maximum natural number such that𝑛β‰₯𝑛𝑖. Evidently, π‘›βˆ’π‘›π‘– ≀ 𝑏𝑐. Hence π»π‘Ÿπ‘Ž

𝐿(𝑛) β‰₯ β„Žπ‘Ÿπ‘Ž

𝐿(𝑛𝑖) β‰₯ (π‘›βˆ’π‘π‘βˆ’π‘Ž)βˆ•(𝑏𝑐). Therefore π»π‘Ÿπ‘Ž

𝐿(𝑛) β‰₯ π‘›βˆ•(2𝑏𝑐) for large enough 𝑛. The inequality π»π‘Ÿπ‘Ž

𝐿(𝑛) ≀ 𝑛 is obvious. Thus,π»π‘Ÿπ‘Ž

𝐿(𝑛) =𝛩(𝑛).

Let𝐼be a dependent simple diagram. Then there exist two different elementary cycles𝐢1and𝐢2of the diagram𝐼, nodes𝑣1and𝑣2 of the cycles𝐢1and𝐢2, respectively, and a pathπœ‹of the diagram𝐼from𝑣1to 𝑣2, which satisfy the following conditions:π‘Š(𝐼 , 𝐢1, 𝑣1) =π‘Š(𝐼 , 𝐢2, 𝑣2) and the length of the pathπœ‹is a number divisible byπ‘Ÿ(𝐼 , 𝐢1, 𝑣1). Let us remind that, for𝑖= 1,2,π‘Š(𝐼 , 𝐢𝑖, 𝑣𝑖)is the infinite periodic word over the alphabet𝛴generated by the cycle𝐢𝑖beginning with the node𝑣𝑖, andπ‘Ÿ(𝐼 , 𝐢1, 𝑣1)is the minimum period of the wordπ‘Š(𝐼 , 𝐢1, 𝑣1). Since

Fig. 2.Diagram𝐼0.

𝐼is a f-reduced diagram, it contains a pathπœ‰from the nodeπ‘ž0 to the node𝑣1, and all nodes of the graph𝐺are final. Let the pathπœ‰generate the word𝛼of the lengthπ‘Ž. Denoteπ‘Ÿ=π‘Ÿ(𝐼 , 𝐢1, 𝑣1). Let the length of the cycle𝐢1 be equal toπ‘π‘Ÿ, the length of the pathπœ‹be equal toπ‘π‘Ÿ, and the pathπœ‹generate the word𝛽. Denote by𝛾 the prefix of the lengthπ‘Ÿ of the wordπ‘Š(𝐼 , 𝐢1, 𝑣1). We now define two words of the lengthπ‘Ÿπ‘π‘:

𝑒=𝛾𝑏𝑐 and𝑀=𝛽𝛾𝑐(π‘βˆ’1). It is clear that𝑒≠𝑀.

Consider the sequence of numbers𝑛𝑖 = π‘Ž+π‘–π‘Ÿπ‘π‘, 𝑖 = 1,2,…. Let π‘–βˆˆπœ”β§΅{0}. The set𝐿(𝑛𝑖)contains the word𝛼𝑒𝑖and the wordsπ›Όπ‘’π‘—π‘€π‘’π‘–βˆ’π‘—βˆ’1 for𝑗= 0,…, π‘–βˆ’ 1. It is easy to show that𝑀𝐿(𝑛, 𝛼𝑒𝑖)β‰₯𝑖: to distinguish the word𝛼𝑒𝑖from the wordsπ›Όπ‘’π‘—π‘€π‘’π‘–βˆ’π‘—βˆ’1,𝑗= 0,…, π‘–βˆ’ 1, we need to use at least one letter from each of𝑖words𝑒appearing in𝛼𝑒𝑖. Therefore 𝑇𝐿(𝑛𝑖) β‰₯ 𝑖and, byLemma 2,β„Žπ‘Ÿπ‘Ž

𝐿(𝑛𝑖)β‰₯ 𝑖 = (π‘›π‘–βˆ’π‘Ž)βˆ•(π‘Ÿπ‘π‘). Let𝑛β‰₯ 𝑛1 and let𝑖be the maximum natural number such that𝑛β‰₯𝑛𝑖. Evidently, π‘›βˆ’π‘›π‘– ≀ π‘Ÿπ‘π‘. Hence π»π‘Ÿπ‘Ž

𝐿(𝑛) β‰₯ β„Žπ‘Ÿπ‘Ž

𝐿(𝑛𝑖) β‰₯ (π‘›βˆ’π‘Ÿπ‘π‘βˆ’π‘Ž)βˆ•(π‘Ÿπ‘π‘). Therefore π»π‘Ÿπ‘Ž

𝐿(𝑛) β‰₯ π‘›βˆ•(2π‘Ÿπ‘π‘) for large enough𝑛. The inequalityπ»π‘Ÿπ‘Ž

𝐿(𝑛) ≀ 𝑛is obvious. Thus,π»π‘Ÿπ‘Ž

𝐿(𝑛) =𝛩(𝑛). β–‘

Note that in general case (when we consider not only factorial languages) the classification of reduced diagrams depending on the minimum depth of decision trees solving the problem of recognition nondeterministically is more complicated [2]. In particular, there exists a dependent simple reduced diagram𝐼0 (seeFig. 2) with the starting node labeled with the symbol+and the unique final node labeled with the symbolβˆ—that generates the regular language𝐿0= {0𝑖10π‘—βˆΆπ‘–, π‘—βˆˆπœ”}

over the alphabet{0,1}, which is not factorial and for whichπ»π‘Ÿπ‘Ž

𝐿0(𝑛) = 𝑂(1).

3.3. Decision trees solving membership problem

For a regular factorial language𝐿, the notation|𝐿|= ∞means that 𝐿is an infinite language, and the notation|𝐿|<∞means that𝐿is a finite language.

Theorem 4. Let𝐿be a regular factorial language over the alphabet𝛴.

(a) If|𝐿|= ∞andπΏβ‰ π›΄βˆ—, thenπ»π‘šπ‘‘

𝐿 (𝑛) =𝛩(𝑛)andπ»π‘šπ‘Ž

𝐿 (𝑛) =𝛩(𝑛).

(b) If|𝐿|<∞or𝐿=π›΄βˆ—, thenπ»π‘šπ‘‘

𝐿 (𝑛) =𝑂(1)andπ»π‘šπ‘Ž

𝐿 (𝑛) =𝑂(1).

Proof. It is clear thatβ„Žπ‘šπ‘ŽπΏ (𝑛)β‰€β„Žπ‘šπ‘‘

𝐿 (𝑛)for any natural𝑛.

(a) Let|𝐿|= ∞,πΏβ‰ π›΄βˆ—, and𝑀0be a word with the minimum length fromπ›΄βˆ—β§΅πΏ. Denote by𝑑the length of𝑀0. Since|𝐿|= ∞,𝐿(𝑛)β‰ βˆ…for any natural𝑛. Let𝑛be a natural number such that𝑛 > 𝑑and𝛀 be a decision tree over𝐿(𝑛)that solves the problem of membership for𝐿(𝑛) nondeterministically and has the minimum depth. Letπ‘€βˆˆπΏ(𝑛)andπœ‰ be a complete path in𝛀 such thatπ‘€βˆˆπ›΄(𝑛, πœ‰). Then the terminal node ofπœ‰ is labeled with the number1. Beginning with the first letter, we divide the word𝑀intoβŒŠπ‘›βˆ•π‘‘βŒ‹blocks with𝑑letters in each and the suffix of the lengthπ‘›βˆ’π‘‘βŒŠπ‘›βˆ•π‘‘βŒ‹. Let us assume that the number of nodes labeled with attributes inπœ‰is less thanβŒŠπ‘›βˆ•π‘‘βŒ‹. Then there is a block such that queries (attributes) attached to nodes ofπœ‰ does not ask about letters from the block. We replace this block in the word𝑀with the word 𝑀0 and denote by𝑀′the obtained word. It is clear that 𝑀′ βˆ‰ 𝐿and π‘€β€²βˆˆπ›΄(𝑛, πœ‰), but this is impossible since the terminal node of the path πœ‰ is labeled with the number 1. Therefore the depth of𝛀 is greater than or equal toβŒŠπ‘›βˆ•π‘‘βŒ‹. Thus,β„Žπ‘šπ‘Ž

𝐿 (𝑛)β‰₯βŒŠπ‘›βˆ•π‘‘βŒ‹. It is easy to construct a decision tree over𝐿(𝑛)that solves the problem of membership for𝐿(𝑛) deterministically and has the depth equals to𝑛. Thereforeβ„Žπ‘šπ‘‘

𝐿 (𝑛)≀𝑛.

Thus,π»π‘šπ‘‘

𝐿 (𝑛) =𝛩(𝑛)andπ»π‘šπ‘Ž

𝐿 (𝑛) =𝛩(𝑛).

(6)

Table 1

Complexity classes1,…,5.

𝐼is independent 𝑐𝑙(𝐼) 𝐿𝐼 π»π‘Ÿπ‘‘

𝐿𝐼

π»π‘Ÿπ‘Ž

𝐿𝐼

π»π‘šπ‘‘

𝐿𝐼

π»π‘šπ‘Ž

𝐿𝐼

simple diagram

1 Yes = 0 𝑂(1) 𝑂(1) 𝑂(1) 𝑂(1)

2 Yes = 1 𝑂(1) 𝑂(1) 𝛩(𝑛) 𝛩(𝑛)

3 Yes β‰₯2 𝛩(log𝑛) 𝑂(1) 𝛩(𝑛) 𝛩(𝑛)

4 No β‰ π›΄βˆ— 𝛩(𝑛) 𝛩(𝑛) 𝛩(𝑛) 𝛩(𝑛)

5 No =π›΄βˆ— 𝛩(𝑛) 𝛩(𝑛) 𝑂(1) 𝑂(1)

(b) Let|𝐿|<∞. Then there exists naturalπ‘šsuch that𝐿(𝑛) = βˆ…for any natural𝑛β‰₯π‘š. Therefore, for each natural𝑛β‰₯π‘š,β„Žπ‘šπ‘‘πΏ (𝑛) = 0and β„Žπ‘šπ‘Ž

𝐿 (𝑛) = 0. Thus,π»π‘šπ‘‘

𝐿 (𝑛) =𝑂(1)andπ»π‘šπ‘Ž

𝐿 (𝑛) =𝑂(1).

Let𝐿=π›΄βˆ—,𝑛be a natural number, and𝛀 be a decision tree over 𝐿(𝑛), which consists of the root, a terminal node labeled with1, and an edge that leaves the root and enters the terminal node. One can show that𝛀solves the problem of membership for𝐿(𝑛)deterministically and has the depth equals to0. Thereforeβ„Žπ‘šπ‘‘

𝐿 (𝑛) = 0andβ„Žπ‘šπ‘Ž

𝐿 (𝑛) = 0. Thus, π»πΏπ‘šπ‘‘(𝑛) =𝑂(1)andπ»πΏπ‘šπ‘Ž(𝑛) =𝑂(1). β–‘

4. Corollaries

In this section, we consider two corollaries ofTheorems 1,3, and4.

4.1. Joint behavior of functionsπ»π‘Ÿπ‘Ž

𝐿,π»π‘Ÿπ‘‘

𝐿,π»π‘šπ‘Ž

𝐿 , andπ»π‘šπ‘‘

𝐿

In this section, we assume that each regular factorial language over the alphabet𝛴is given by a f-reduced diagram𝐼, which generates the considered language denoted by𝐿𝐼. To study all possible types of joint behavior of functionsπ»π‘Ÿπ‘‘

𝐿𝐼,π»π‘Ÿπ‘Ž

𝐿𝐼,π»π‘šπ‘‘

𝐿𝐼, andπ»π‘šπ‘Ž

𝐿𝐼, we consider five classes of regular factorial languages1,…,5 described in the columns 2–4 ofTable 1. In particular,1 consists of all regular factorial languages 𝐿𝐼 for which the diagram 𝐼 is an independent simple diagram and 𝑐𝑙(𝐼) = 0. It is easy to show that the complexity classes1,…,5are pairwise disjoint, and each regular factorial language𝐿𝐼belongs to one of these classes. The behavior of functionsπ»π‘Ÿπ‘‘

𝐿𝐼,π»π‘Ÿπ‘Ž

𝐿𝐼,π»π‘šπ‘‘

𝐿𝐼, andπ»π‘šπ‘Ž

𝐿𝐼

for languages from these classes is described in the last four columns of Table 1. For each class, the results considered inTable 1 for the functionsπ»π‘Ÿπ‘‘

𝐿𝐼 andπ»π‘Ÿπ‘Ž

𝐿𝐼 follow directly fromTheorems 1and3.

We now consider the behavior of the functions π»π‘šπ‘‘

𝐿𝐼 andπ»π‘šπ‘Ž

𝐿𝐼 for each of the classes1,…,5. Let𝐼= (𝐺, π‘ž0, 𝑄)be a f-reduced diagram over the alphabet𝛴, which generates a regular factorial language.

Let𝐿𝐼 ∈1. Since𝑐𝑙(𝐼) = 0,𝐺is a directed acyclic graph, and the language𝐿𝐼 is finite. UsingTheorem 4we obtainπ»πΏπ‘šπ‘‘

𝐼(𝑛) =𝑂(1)and π»π‘šπ‘Ž

𝐿𝐼(𝑛) =𝑂(1).

Let𝐿𝐼 ∈2. Since𝑐𝑙(𝐼) = 1,𝐺is a graph containing a cycle, and the language𝐿𝐼is infinite. By Lemma 4.2 [1],|𝐿𝐼(𝑛)|=𝑂(1). Therefore πΏπΌβ‰ π›΄βˆ—. UsingTheorem 4we obtainπ»π‘šπ‘‘

𝐿𝐼(𝑛) =𝛩(𝑛)andπ»π‘šπ‘Ž

𝐿𝐼(𝑛) =𝛩(𝑛).

Let𝐿𝐼∈3. Since𝑐𝑙(𝐼)β‰₯2,𝐺is a graph containing a cycle, and the language𝐿𝐼is infinite. By Lemma 4.2 [1],|𝐿𝐼(𝑛)|=𝑂(𝑛𝑐𝑙(𝐼)). Therefore πΏπΌβ‰ π›΄βˆ—. UsingTheorem 4we obtainπ»πΏπ‘šπ‘‘

𝐼(𝑛) =𝛩(𝑛)andπ»πΏπ‘šπ‘Ž

𝐼(𝑛) =𝛩(𝑛).

Let𝐿𝐼 ∈4. Since𝐼is not an independent simple diagram,𝐺is a graph containing a cycle, and the language𝐿𝐼is infinite. We know that πΏπΌβ‰ π›΄βˆ—. UsingTheorem 4we obtainπ»π‘šπ‘‘

𝐿𝐼(𝑛) =𝛩(𝑛)andπ»π‘šπ‘Ž

𝐿𝐼(𝑛) =𝛩(𝑛).

Let𝐿𝐼 ∈5. Then𝐿𝐼 =π›΄βˆ—. UsingTheorem 4we obtainπ»π‘šπ‘‘

𝐿𝐼(𝑛) = 𝑂(1)andπ»π‘šπ‘Ž

𝐿𝐼(𝑛) =𝑂(1).

We now show that the classes1,…,5are nonempty. For simplic- ity, we assume that𝛴=𝐸, where𝐸= {0,1}. It is easy to generalize the considered examples to the case of an arbitrary finite alphabet𝛴 with at least two letters. In the examples of diagrams, the starting node is labeled with the symbol+, and all nodes are final.

Denote by𝐼1 the diagram over the alphabet𝐸depicted inFig. 3.

One can show that𝐼1is an independent simple f-reduced diagram and 𝑐𝑙(𝐼1) = 0. This diagram generates the language𝐿𝐼

1= {πœ†,0}, which is factorial. Therefore𝐿𝐼

1∈1.

Fig. 3.Diagram𝐼1.

Fig. 4.Diagram𝐼2.

Fig. 5.Diagram𝐼3.

Fig. 6.Diagram𝐼4.

Fig. 7.Diagram𝐼5.

Denote by𝐼2 the diagram over the alphabet𝐸depicted inFig. 4.

One can show that𝐼2 is an independent simple f-reduced diagram and 𝑐𝑙(𝐼2) = 1. This diagram generates the language𝐿𝐼

2 = {0𝑖 ∢ π‘–βˆˆπœ”}, which is factorial. Therefore𝐿𝐼

2∈2.

Denote by𝐼3 the diagram over the alphabet𝐸depicted inFig. 5.

One can show that𝐼3 is an independent simple f-reduced diagram and 𝑐𝑙(𝐼1) = 2. This diagram generates the language𝐿𝐼

3= {0𝑖1𝑗 βˆΆπ‘–, π‘—βˆˆπœ”}, which is factorial. Therefore𝐿𝐼

3∈3.

Denote by𝐼4 the diagram over the alphabet𝐸depicted inFig. 6.

One can show that𝐼4is a dependent simple f-reduced diagram generat- ing the language𝐿𝐼

4= {0𝑖1𝑗0π‘˜βˆΆπ‘–, π‘˜βˆˆπœ”, π‘—βˆˆ {0,1}}, which is factorial.

It is clear that𝐿𝐼

4β‰ πΈβˆ—. Therefore𝐿𝐼

4∈4.

Denote by𝐼5 the diagram over the alphabet𝐸depicted inFig. 7.

One can show that𝐼5 is a f-reduced diagram that is not simple. This diagram generates the language𝐿𝐼

5=πΈβˆ—, which is factorial. It is clear that𝐿𝐼

5=πΈβˆ—. Therefore𝐿𝐼

5∈5.

A regular factorial language 𝐿 can have different f-reduced dia- grams, which generate it. However, for each of such diagrams𝐼, the language𝐿𝐼 = 𝐿 will belong to the same complexity class. Let us assume the contrary: there exist a regular factorial language 𝐿 and two f-reduced diagrams 𝐼1 and 𝐼2, which generate it and for which languages 𝐿𝐼

1 and 𝐿𝐼

2 belong to different complexity classes. Then, for some pairπ‘π‘βˆˆ {π‘Ÿπ‘‘, π‘Ÿπ‘Ž, π‘šπ‘‘, π‘šπ‘Ž}, the functions𝐻𝑏𝑐

𝐿𝐼1

and𝐻𝑏𝑐

𝐿𝐼2

have different behavior, but this is impossible since𝐻𝑏𝑐

𝐿𝐼1

(𝑛) =𝐻𝑏𝑐

𝐿𝐼2

(𝑛)for any natural𝑛.

(7)

6 Fig. 8. Diagram𝐼(0).

4.2. Languages over alphabet{0,1}given by one forbidden word Let 𝐸 = {0,1}, 𝛼 ∈ πΈβˆ—, and 𝛼 β‰  πœ†. We denote by 𝐿(𝛼) the language over the alphabet𝐸, which consists of all words fromπΈβˆ—that do not contain𝛼as a factor. This is a regular factorial language with 𝑀 𝐹(𝐿(𝛼)) = {𝛼}. The following theorem indicates for each nonempty word 𝛼 ∈ πΈβˆ— the complexity class ξˆ²π‘– to which the language 𝐿(𝛼) belongs.

Theorem 5. Letπ›ΌβˆˆπΈβˆ—andπ›Όβ‰ πœ†.

(a) Ifπ›Όβˆˆ {0,1}, then𝐿(𝛼) ∈2. (b) Ifπ›Όβˆˆ {01,10}, then𝐿(𝛼) ∈3. (c) Ifπ›Όβˆ‰ {0,1,01,10}, then𝐿(𝛼) ∈4.

We now describe a f-reduced diagram𝐼(𝛼)that generates the lan- guage𝐿(𝛼)for a nonempty wordπ›ΌβˆˆπΈβˆ—. Let𝛼=π‘Ž1β‹―π‘Žπ‘›,𝛼0=πœ†, and 𝛼𝑖=π‘Ž1β‹―π‘Žπ‘–for𝑖= 1,…, π‘›βˆ’ 1. The set𝑃(𝛼) = {𝛼0, 𝛼1,…, π›Όπ‘›βˆ’1}is the set of all proper prefixes of the word𝛼. Then𝐼(𝛼) = (𝐺, π‘ž0, 𝑄), where the set of nodes of the graph𝐺is equal to𝑃(𝛼),π‘ž0=𝛼0, and𝑄=𝑃(𝛼).

For𝑖= 0,…, π‘›βˆ’ 2, an edge leaves the node𝛼𝑖and enters the node𝛼𝑖+1. This edge is labeled with the letter π‘Žπ‘–+1. For𝑖= 0,…, π‘›βˆ’ 1, an edge leaves the node𝛼𝑖 and enters the node𝛼𝑗 βˆˆπ‘ƒ(𝛼)such that𝛼𝑗 is the longest suffix of the wordπ›Όπ‘–π‘ŽΜ„π‘–+1, whereπ‘ŽΜ„π‘–+1= 0ifπ‘Žπ‘–+1= 1andπ‘ŽΜ„π‘–+1= 1 ifπ‘Žπ‘–+1= 0. This edge is labeled with the letterπ‘ŽΜ„π‘–+1. It is easy to show that𝐼(𝛼)is a f-reduced diagram over the alphabet𝐸. From Theorem 10 [7] it follows that the diagram𝐼(𝛼)generates the language𝐿(𝛼).

Letπ›ΌβˆˆπΈβˆ—β§΅{πœ†}and𝛼=π‘Ž1β‹―π‘Žπ‘›. We denote by𝛼̄the wordπ‘ŽΜ„1β‹―π‘ŽΜ„π‘›. It is easy to prove the following statement.

Lemma 6. Letπ›ΌβˆˆπΈβˆ—andπ›Όβ‰ πœ†. Then𝐻𝐿(̄𝑏𝑐𝛼)(𝑛) =𝐻𝐿(𝛼)𝑏𝑐 (𝑛)for any pair π‘π‘βˆˆ {π‘Ÿπ‘‘, π‘Ÿπ‘Ž, π‘šπ‘‘, π‘šπ‘Ž}and any natural𝑛.

Lemma 7. Letπ›ΌβˆˆπΈβˆ—β§΅{πœ†},π›½βˆˆπΈβˆ—, and𝐿(𝛼) ∈4. Then𝐿(𝛼𝛽) ∈4. Proof. Since𝐿(𝛼) ∈4,π»π‘Ÿπ‘‘

𝐿(𝛼)(𝑛) =𝛩(𝑛)andπ»π‘Ÿπ‘Ž

𝐿(𝛼)(𝑛) =𝛩(𝑛). One can show that𝐿(𝛼)βŠ† 𝐿(𝛼𝛽). Using this fact it is not difficult to prove that 𝐻𝐿(𝛼)π‘Ÿπ‘‘ (𝑛)≀𝐻𝐿(𝛼𝛽)π‘Ÿπ‘‘ (𝑛)and𝐻𝐿(𝛼)π‘Ÿπ‘Ž (𝑛)≀𝐻𝐿(𝛼𝛽)π‘Ÿπ‘Ž (𝑛)for any natural𝑛. From here and fromTheorems 1and3it follows thatπ»π‘Ÿπ‘‘

𝐿(𝛼𝛽)(𝑛) =𝛩(𝑛)and 𝐻𝐿(𝛼𝛽)π‘Ÿπ‘Ž (𝑛) =𝛩(𝑛).

Sinceπ›Όπ›½βˆ‰πΏ(𝛼𝛽),𝐿(𝛼𝛽)β‰ πΈβˆ—. The diagram𝐼(𝛼𝛽)contains at least one circle formed by the edge that leaves and enters the nodeπœ†and is labeled with the letterπ‘ŽΜ„1, where π‘Ž1 is the first letter of the word 𝛼. Therefore the language𝐿(𝛼𝛽)is infinite. ByTheorem 4,π»π‘šπ‘‘

𝐿(𝛼𝛽)(𝑛) = 𝛩(𝑛)andπ»π‘šπ‘Ž

𝐿(𝛼𝛽)(𝑛) =𝛩(𝑛). Thus,𝐿(𝛼𝛽) ∈4. β–‘

Proof of Theorem 5. In each figure depicting a diagram 𝐼(𝛼), 𝛼 ∈ πΈβˆ—β§΅{πœ†}, we label each node with a corresponding prefix of the word 𝛼.

(a) The diagram𝐼(0)is depicted inFig. 8. This is an independent simple f-reduced diagram with𝑐𝑙(𝐼(0)) = 1. Therefore𝐿(0) ∈2. By Lemma 6,𝐿(1) ∈2.

(b) The diagram𝐼(01)is depicted inFig. 9. This is an independent simple f-reduced diagram with𝑐𝑙(𝐼(01)) = 2. Therefore𝐿(01) ∈3. By Lemma 6,𝐿(10) ∈3.

Fig. 9. Diagram𝐼(01).

Fig. 10. Diagram𝐼(00).

Fig. 11. Diagram𝐼(010).

Fig. 12. Diagram𝐼(011).

(c) The diagram𝐼(00)is depicted inFig. 10. This is not a simple diagram. It is clear that𝐿(00)β‰ πΈβˆ—. Therefore𝐿(00) ∈4. ByLemma 6, 𝐿(11) ∈4. UsingLemma 7we obtain𝐿(000), 𝐿(001), 𝐿(110), 𝐿(111) ∈

4.

The diagram 𝐼(010) is depicted in Fig. 11. This is not a simple diagram. It is clear that 𝐿(010) β‰  πΈβˆ—. Therefore 𝐿(010) ∈ 4. By Lemma 6,𝐿(101) ∈4.

The diagram 𝐼(011) is depicted in Fig. 12. This is not a simple diagram. It is clear that 𝐿(011) β‰  πΈβˆ—. Therefore 𝐿(011) ∈ 4. By Lemma 6,𝐿(100) ∈4.

We proved that, for any wordπ›ΌβˆˆπΈβˆ—of the length three,𝐿(𝛼) ∈4. UsingLemma 7we obtain that, for any word 𝛼 ∈ πΈβˆ—of the length greater than or equal to four,𝐿(𝛼) ∈4. β–‘

Declaration of competing interest

The authors declare that they have no known competing finan- cial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

Research reported in this publication was supported by King Abdul- lah University of Science and Technology (KAUST), Saudi Arabia. The

Referensi

Dokumen terkait