Skip to main content
Entropy logoLink to Entropy
. 2023 Feb 14;25(2):349. doi: 10.3390/e25020349

Decision Trees for Binary Subword-Closed Languages

Mikhail Moshkov 1
Editor: António Lopes1
PMCID: PMC9955005  PMID: 36832715

Abstract

In this paper, we study arbitrary subword-closed languages over the alphabet {0,1} (binary subword-closed languages). For the set of words L(n) of the length n belonging to a binary subword-closed language L, we investigate the depth of the decision trees solving the recognition and the membership problems deterministically and nondeterministically. In the case of the recognition problem, for a given word from L(n), we should recognize it using queries, each of which, for some i{1,,n}, returns the ith letter of the word. In the case of the membership problem, for a given word over the alphabet {0,1} of the length n, we should recognize if it belongs to the set L(n) using the same queries. With the growth of n, the minimum depth of the 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 types of trees and problems (decision trees solving the problem of recognition nondeterministically and decision trees solving the membership problem deterministically and nondeterministically), with the growth of n, the minimum depth of the decision trees is either bounded from above by a constant or grows linearly. We study the joint behavior of the minimum depths of the considered four types of decision trees and describe five complexity classes of binary subword-closed languages.

Keywords: subword-closed language, recognition problem, membership problem, deterministic decision tree, nondeterministic decision tree

1. Introduction

In this paper, we study arbitrary binary languages (languages over the alphabet E={0,1}) that are subword closed: if a word w1u1w2wmumwm+1 belongs to a language, then the word u1um belongs to this language. Subword-closed languages have attracted the attention of researchers in the field of formal languages for many years [1,2,3,4,5].

For the set of words L(n) of the length n belonging to a binary subword-closed language L, we investigate the depth of the decision trees solving the recognition and the membership problems deterministically and nondeterministically. In the case of the recognition problem, for a given word from L(n), we should recognize it using queries, each of which, for some i{1,,n}, returns the ith letter of the word. In the case of the membership problem, for a given word over the alphabet E of the length n, we should recognize if it belongs to L(n) using the same queries.

For an arbitrary binary subword-closed language, with the growth of n, the minimum depth of the 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 types of trees and problems (decision trees solving the problem of recognition nondeterministically and decision trees solving the membership problem deterministically and nondeterministically), with the growth of n, the minimum depth of decision trees is either bounded from above by a constant or grows linearly. We study the joint behavior of the minimum depths of the considered four types of decision trees and describe five complexity classes of binary subword-closed languages.

In [6], the following results were announced without proof. For an arbitrary regular language, with the growth of n, (i) the minimum depth of the decision trees solving the problem of recognition deterministically is either bounded from above by a constant or grows as a logarithm, or linearly, and (ii) the minimum depth of the decision trees solving the problem of recognition nondeterministically is either bounded from above by a constant or grows linearly. Proofs for the case of decision trees solving the problem of recognition deterministically can be found in [7,8]. To apply the considered results to a given regular language, it is necessary to know a deterministic finite automaton (DFA) accepting this language.

Each subword-closed language over a finite alphabet is a regular language [3]. In this paper, we do not assume that binary subword-closed languages are given by DFAs. So, we cannot use the results from [6,7,8]. Instead of this, for binary subword-closed languages, we describe simple criteria for the behavior of the minimum depths of decision trees solving the problems of recognition and membership deterministically and nondeterministically.

This paper is a theoretical work related to the field of formal languages. It has no direct applications. In the theory of formal languages, various parameters of languages are studied, in particular the growth of the number of words of the language with the growth of the length of words and, for regular languages, the minimum number of states of the automaton accepting the language. For many years, the author has been introducing new parameters of languages into scientific use: the minimum depth of deterministic and nondeterministic decision trees for the recognition and membership problems related to the language [6,7,8,9]. The present paper continues this line of research.

There is now an extensive collection of methods for constructing decision trees. It includes (i) a variety of greedy heuristics based on measures of uncertainty, such as entropy and the Gini index [10,11,12], (ii) exact optimization algorithms based on dynamic programming, branch-and-bound search, SAT-based methods, etc., [13,14,15,16], and (iii) approximate optimization algorithms with bounds of accuracy that are applicable to obtain theoretical results about the complexity of decision trees [8,17].

In this paper, we found simple combinatorial parameters of binary subword-closed languages, which made it possible to obtain bounds on the depth of the decision trees without using the effective but rather complicated methods developed in the monographs [8,17].

The rest of this paper is organized as follows. In Section 2, we consider the main notions; in Section 3, the main results; in Section 4, the proofs; and in Section 5, short conclusions.

2. Main Notions

Let ω={0,1,2,} be the set of nonnegative integers and E={0,1}. By E*, we denote the set of all finite words over the alphabet E, including the empty word λ. Any subset L of the set E* is called a binary language. This language is called subword closed if, for any word w1u1w2wmumwm+1 belonging to L, the word u1um belongs to L, where wi, ujE*, i=1,,m+1, j=1,,m. For any natural n, we denote by L(n) the set of words from L, for which length is equal to n. We consider two problems related to the set L(n). The problem of recognition: for a given word from L(n), we should recognize it using attributes (queries) l1n,,lnn, where lin, i{1,,n}, is a function from E*(n) to E such that lin(a1an)=ai for any word a1anE*(n). The problem of membership: for a given word from E*(n), we should recognize if this word belongs to the set L(n) using the same attributes. To solve these problems, we use decision trees over L(n).

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

  • The root and the edges leaving the root are not labeled.

  • Each node, which is not the root or terminal node, is labeled with an attribute from the set {l1n,,lnn}.

  • Each edge leaving a node, which is not a root, is labeled with a number from E.

A decision tree over L(n) 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 numbers.

Let Γ be a decision tree over L(n). A complete path in Γ is any sequence ξ=v0,e0,,vm,em,vm+1 of nodes and edges of Γ such that v0 is the root, vm+1 is a terminal node, vi is the initial, and vi+1 is the terminal node of the edge ei for i=0,,m. We define a subset E(n,ξ) of the set E*(n) in the following way: if m=0, then E(n,ξ)=E*(n). Let m>0, the attribute lijn be assigned to the node vj and bj be the number assigned to the edge ej, j=1,,m. Then,

E(n,ξ)={a1anE*(n):ai1=b1,,aim=bm}.

Let L(n). We say that a decision tree Γ over L(n) solves the problem of recognition for L(n) nondeterministically if Γ satisfies the following conditions:

  • Each terminal node of Γ is labeled with a word from L(n).

  • For any word wL(n), there exists a complete path ξ in the tree Γ such that wE(n,ξ).

  • For any word wL(n) and for any complete path ξ in the tree Γ such that wE(n,ξ), the terminal node of the path ξ is labeled with the word w.

We say that a decision tree Γ over L(n) solves the problem of recognition for L(n) deterministically if Γ is a deterministic decision tree, which solves the problem of recognition for L(n) nondeterministically.

We say that a decision tree Γ over L(n) solves the problem of membership for L(n) nondeterministically if Γ satisfies the following conditions:

  • Each terminal node of Γ is labeled with a number from E.

  • For any word wE*(n), there exists a complete path ξ in the tree Γ such that wE(n,ξ).

  • For any word wE*(n) and for any complete path ξ in the tree Γ such that wE(n,ξ), the terminal node of the path ξ is labeled with the number 1 if wL(n) and with the number 0, otherwise.

We say that a decision tree Γ over L(n) solves the problem of membership for L(n) deterministically if Γ is a deterministic decision tree which solves the problem of membership for L(n) nondeterministically.

Let Γ be a decision tree over L(n). We denote by h(Γ) the maximum number of nodes in a complete path in Γ that are not the root nor terminal node. The value h(Γ) is called the depth of the decision tree Γ.

We denote by hLra(n) (hLrd(n)) the minimum depth of a decision tree, which solves the problem of recognition for L(n) nondeterministically (deterministically). If L(n)=, then hLra(n)=hLrd(n)=0.

We denote by hLma(n) (hLmd(n)) the minimum depth of a decision tree, which solves the problem of membership for L(n) nondeterministically (deterministically). If L(n)=, then hLma(n)=hLmd(n)=0.

3. Main Results

Let L be a binary subword-closed language. For any aE and iω, we denote by ai the word aa of the length i (if i=0, then ai=λ). For any aE, let a¯=1 if a=0 and a¯=0 if a=1.

We define the parameter Hom(L) of the language L, which is called the homogeneity dimension of the language L. If for each natural number m, there exists aE such that the word ama¯am belongs to L, then Hom(L)=. Otherwise, Hom(L) is the maximum number mω such that there exists aE for which the word ama¯am belongs to L. If L=, then Hom(L)=0.

We now define the parameter Het(L) of the language L, which is called the heterogeneity dimension of the language L. If for each natural number m, there exists aE such that the word ama¯m belongs to L, then Het(L)=. Otherwise, Het(L) is the maximum number mω such that there exists aE for which the word ama¯m belongs to L. If L=, then Het(L)=0.

Theorem 1. 

Let L be a binary subword-closed language.

  • (a) 

    If Hom(L)=, then hLrd(n)=Θ(n) and hLra(n)=Θ(n).

  • (b) 

    If Hom(L)< and Het(L)=, then hLrd(n)=Θ(logn) and hLra(n)=O(1).

  • (c) 

    If Hom(L)< and Het(L)<, then hLrd(n)=O(1) and hLra(n)=O(1).

Example 1. 

Let us consider the binary subword-closed language L0={1i0j:i,jω}. One can show that Hom(L0)=0 and Het(L0)=. By Theorem 1, hL0rd(n)=Θ(logn) and hL0ra(n)=O(1).

For a binary subword-closed language L, we denote by LC its complementary language E*L. The notation |L|= means that L is an infinite language, and the notation |L|< means that L is a finite language.

Theorem 2. 

Let L be a binary subword-closed language.

  • (a) 

    If |L|= and LC, then hLmd(n)=Θ(n) and hLma(n)=Θ(n).

  • (b) 

    If |L|< or LC=, then hLmd(n)=O(1) and hLma(n)=O(1).

Example 2. 

One can show that, for the binary subword-closed language L0={1i0j:i,jω}, considered in Example 1, |L0|= and L0C. By Theorem 2, hL0md(n)=Θ(n) and hL0ma(n)=Θ(n).

To study all possible types of joint behavior of functions hLrd(n), hLra(n), hLmd(n), and hLma(n) for binary subword-closed languages L, we consider five classes of languages L1,,L5 described in the columns 2–5 of Table 1. In particular, L1 consists of all binary subword-closed languages L with Hom(L)=and LC. It is easy to show that the complexity classes L1,,L5 are pairwise disjointed, and each binary subword-closed language belongs to one of these classes. The behavior of functions hLrd(n), hLra(n), hLmd(n), and hLma(n) for languages from these classes is described in the last four columns of Table 1. For each class, the results considered in Table 1 follow from Theorems 1 and 2 and the following three remarks: (i) from the condition Hom(L)=, it follows |L|=, (ii) from the condition Het(L)=, it follows |L|=, and (iii) from the condition Hom(L)<, it follows LC.

Table 1.

Joint behavior of functions hLrd, hLra, hLmd, and hLma for binary subword-closed languages.

Hom(L) Het(L) |L| LC hLrd hLra hLmd hLma
L1 = Θ(n) Θ(n) Θ(n) Θ(n)
L2 = = Θ(n) Θ(n) O(1) O(1)
L3 < = Θ(logn) O(1) Θ(n) Θ(n)
L4 < < = O(1) O(1) Θ(n) Θ(n)
L5 < < < O(1) O(1) O(1) O(1)

We now show that the classes L1,,L5 are nonempty. To this end, we consider the following five binary subword-closed languages:

L1={0i10j,0i:i,jω},L2=E*,L3={0i1j:i,jω},L4={0i:iω},L5={0}.

It is easy to see that LiLi for i=1,,5.

4. Proofs of Theorems 1 and 2

In this section, we prove Theorems 1 and 2. First, we consider two auxiliary statements. For a word w, we denote by |w| its length.

Lemma 1. 

Let L be a binary subword-closed language for which Hom(L)<. Then, any word w from L can be represented in the form

w1aiw2a¯jw3, (1)

where aE, i,jω, and w1, w2, w3 are words from E* with length at most 2Hom(L) each.

Proof. 

Denote m=Hom(L). Then, the words 0m+110m+1 and 1m+101m+1 do not belong to L. Let w be a word from L. Then, for any aE, any entry of the letter a in w has at most ma¯s to the left of this entry (we call it l-entry of a) or at most ma¯s to the right of this entry (we call it r-entry of a). Let aE. We say that w is (i) a-l-word if any entry of a in w is l-entry; (ii) a-r-word if any entry of a in w is r-entry; and (iii) a-b-word if w is not a-l-word and is not a-r-word. Let c,d{l,r,b}. We say that w is cd-word if w is 0-c-word and 1-d-word. There are nine possible pairs cd. We divide them into four groups: (a) ll and rr, (b) lr and rl, (c) lb, rb, bl, and br, and (d) bb, and consider them separately. Let

w=a1an.

We assume that w contains both 0s and 1s. Otherwise, w can be represented in the form (1).

(a) Let w be ll-word. Let an=0 and ai be the rightmost entry of 1 in w. Because w is ll-word, there are at most m 1s to the left of an and at most m 0s to the left of ai. Denote w1=a1ai. Then, w1 contains at most m 0s and at most m 1s, i.e., the length of w1 is at most 2m. Moreover, to the right of ai, there are only 0s. Thus, w=w10ni, where |w1|=i2m, i.e., w can be represented in the form (1).

Let an=1 and ai be the rightmost entry of 0 in w. Denote w1=a1ai. Then, w1 contains at most m 0s and at most m 1s, i.e., |w1|2m. Moreover, to the right of ai, there are only 1s. Thus, w=w11ni, i.e., w can be represented in the form (1).

One can prove in a similar way that any rr-word can be represented in the form (1).

(b) Let w be lr-word, ai be the rightmost entry of 0, and aj be the leftmost entry of 1. Then, either j=i+1 or j<i. Let j=i+1. Then, w=0i1ni, i.e., w can be represented in the form (1). Let now j<i. Denote w2=ajai. The word w has at most m 0s to the right of aj and at most m 1s to the left of ai. Therefore, |w2|2m and w=0j1w21ni, i.e., w can be represented in the form (1).

One can prove in a similar way that any rl-word can be represented in the form (1).

(c) Let w be lb-word; ai be the rightmost entry of 1 such that to the left of this entry, we have at most m 0s; and aj be the next after ai entry of 1. It is clear that to the right of aj, there are at most m 0s, ji+2, and all letters ai+1,,aj1 are equal to 0. Let ak be the rightmost entry of 0. Then, to the left of ak, there are at most m 1s. It is clear that either k=j1 or k>j. Denote w1=a1ai. Then, |w1|2m. Let k=j1. In this case, w=w10ji11nj+1, i.e., w can be represented in the form (1). Let k>j. Denote w2=ajak. Then, |w2|2m. We have w=w10ji1w21nk, i.e., w can be represented in the form (1).

One can prove in a similar way that any rb- or bl- or br-word can be represented in the form (1).

(d) Let w be bb-word, ai be the rightmost entry of 0 such that there are at most m 1s to the left of this entry, and aj be the next after ai entry of 0. Then, there are at most m 1s to the right of aj, ji+2, and w=a1ai11ajan. Denote A={1,,i}, B={i+1,,j1}, and C={j,,n}. Let ak be the rightmost entry of 1 such that there are at most m 0s to the left of this entry and al be the next after ak entry of 1. Then, there are at most m 0s to the right of al, lk+2, and w=a1ak00alan.

There are four possible types of location of ak and al: (i) kA and lA, (ii) kA and lB (the combination kA and lC is impossible because all letters with indices from B are 1s, but all letters between ak and al are 0s), (iii) kB and lC (the combination kB and lB is impossible because all letters with indices from B are 1s, but all letters between ak and al are 0s), and (iv) kC and lC. We now consider cases (i)–(iv) in detail.

(i) Let kA and lA. Then, w=a1ak00alai11ajan. Denote w1=a1ak, w2=alai, and w3=ajan. The length of w1 is at most 2m because from the left of ak, there are at most m 0s, and from the left of ai, there are at most m 1s. We can prove in a similar way that |w2|2m and |w3|2m. Therefore, w can be represented in the form (1).

(ii) Let kA and lB. Then, l=i+1 and

w=a1ak00aiai+111ajan,

where ai=0 and ai+1=1. Denote w1=a1ak and w3=ajan. It is easy to show that |w1|2m and |w3|2m. Therefore, w can be represented in the form (1).

(iii) Let kB and lC. Then, k=j1 and

w=a1ai11aj1aj00alan,

where aj1=1 and aj=0. Denote w1=a1ai and w3=alan. It is easy to show that |w1|2m and |w3|2m. Therefore, w can be represented in the form (1).

(iv) Let kC and lC. Then, w=a1ai11ajak00alan. Denote w1=a1ai, w2=ajak, and w3=alan. It is easy to show that |w1|2m, |w2|2m, and |w3|2m. Therefore, w can be represented in the form (1). □

Lemma 2. 

Let L be a binary subword-closed language for which Hom(L)< and Het(L)<. Then, there exists natural p such that |L(n)|p for any natural n.

Proof. 

Denote m=max(Hom(L),Het(L)). Then, the words 0m+11m+1 and 1m+10m+1 do not belong to L. Using Lemma 1, we obtain that each word w from L can be represented in the form w1aiw2a¯jw3, where aE, the length of wk is at most t=2m for k=1,2,3, i,jω, and im or jm. We now evaluate the number of such words, for which length is equal to n. Let k{1,2,3}. Then, the number of different words wk is at most 20+21++2t<2t+1. Let us assume that the words w1, w2, and w3 are fixed and |w1|+|w2|+|w3|n. Then, the number of different words aia¯j of the length n|w1||w2||w3| is at most 4(m+1) because im or jm. Thus, the number of words in L(n) is at most p=23t+3(2t+4). □

Proof of Theorem 1. 

It is clear that hLra(n)hLrd(n) for any natural n.

(a) Let Hom(L)= and n be a natural number. Then, there exists aE such that ana¯anL. Therefore, an,aia¯ani1L(n) for i=0,,n1. Let Γ be a decision tree over L(n), which solves the problem of recognition for L(n) nondeterministically and has the minimum depth hLra(n), and ξ be a complete path in Γ such that anE(n,ξ). Let us assume that there is i{0,,n1} such that the attribute li+1n is not attached to any node of ξ, which is not the root nor the terminal node. Then, aia¯ani1E(n,ξ), which is impossible. Therefore, h(Γ)n and hLra(n)n. It is easy to show that hLrd(n)n. Thus, hLra(n)=hLrd(n)=n for any natural n.

(b) Let Hom(L)< and Het(L)=. By Lemma 1, each word from L can be represented in the form w1aiw2a¯jw3, where aE, the length of wk is at most t=2Hom(L) for k=1,2,3, and i,jω. Note that either w2=λ or w2 is a word of the kind a¯a.

Let n be a natural number such that n10t. We now describe the work of a decision tree over L(n), which solves the problem of recognition for L(n) deterministically. Let wL(n). We represent this word as follows: w=L1L2L3AR3R2R1, where the length of each word L1,L2,L3,R3,R2,R1 is equal to t. First, we recognize all letters in the words L1,L2,R2,R1 using 4t queries (attributes). We now consider four cases.

(i) Let L2=R2=at for some aE. Then, L3AR3=an4t, and the word w is recognized.

(ii) Let L2=at for some aE, and R2 contains both 0 and 1. Then, R2 has an intersection with the word w2. It is clear that w2 has no intersection with the word A and L3A=an5t. We recognize all letters of the word R3. As a result, the word w will be recognized.

(iii) Let R2=at for some aE, and L2 contains both 0 and 1. Then, L2 has an intersection with the word w2. It is clear that w2 has no intersection with the word A and AR3=an5t. We recognize all letters of the word L3. As a result, the word w will be recognized.

(iv) Let L2=at and R2=a¯t for some aE. Then, we need to recognize the position of the word w2 and the word w2 itself. Beginning with the left, we divide L3AR3 and, probably, a prefix of R2 into blocks of the length t. As a result, we have kn/t blocks. We recognize all letters in the block with the number r=k/2. If all letters in this block are equal to a¯, then we apply the same procedure to the blocks with numbers 1,,r1. If all letters in this block are equal to a, then we apply the same procedure to the blocks with numbers r+1,,k. If the considered block contains both 0 and 1, then we recognize t letters before this block and t letters after this block and, as a result, recognize both the word w2 and its position. After each iteration, the number of blocks is at most one-half of the previous number of blocks. Let q be the whole number of iterations. Then, after the iteration q1, we have at least one unchecked block. Therefore, k/2q11 and qlog2k+1.

In case (i), to recognize the word w, we make 4t queries. In cases (ii) and (iii), we make 5t queries. In case (iv), we make at most tlog2(n/t)+7t queries. As a result, we have hLrd(n)=O(logn).

Because Het(L)=, for any natural n, the set L(n) contains for some aE words aia¯ni for i=0,,n. Then, |L(n)|n+1, and each decision tree Γ over L(n) solving the problem of recognition for L(n) deterministically has at least n+1 terminal nodes. One can show that the number of terminal nodes in Γ is at most 2h(Γ). Therefore, h(Γ)log2(n+1). Thus, hLrd(n)=Ω(logn) and hLrd(n)=Θ(logn).

We now prove that hLra(n)=O(1). To this end, it is enough to show that there is a natural number c such that, for each natural n and for each word wL(n), there exists a subset Bw of the set of attributes {l1n,,lnn} such that Bwc and, for any word uL(n) different from w, there exists an attribute linBw for which lin(w)lin(u). We now show that as c, we can use the number 7t. In case (i), in the capacity of the set Bw, we can choose all attributes corresponding to 4t letters from the subwords L1, L2, R2, and R1. In case (ii), we can choose all attributes corresponding to 5t letters from the subwords L1, L2, R3, R2, and R1. In case (iii), we can choose all attributes corresponding to 5t letters from the subwords L1, L2, L3, R2, and R1. In case (iv), in the capacity of the set Bw, we can choose all attributes corresponding to 4t letters from the subwords L1, L2, R2, and R1, and 3t letters from the block containing both 0 and 1 and from the blocks that are its left and right neighbors.

(c) Let Hom(L)< and Het(L)<. By Lemma 2, there exists natural p such that |L(n)|p for any natural n. Let n be a natural number. Then, the set L(n) contains at most p words, and there exists a subset B of the set of attributes {l1n,,lnn} such that Bp2 and, for any two different words u,wL(n), there exists an attribute linB for which lin(w)lin(u). It is easy to construct a decision tree over L(n) which solves the problem of recognition for L(n) deterministically by sequentially computing attributes from B. The depth of this tree is at most p2. Therefore, hLrd(n)=O(1) and hLra(n)=O(1). □

Proof of Theorem 2. 

It is clear that hLma(n)hLmd(n) for any natural n.

(a) Let |L|=, LC, and w0 be a word with the minimum length from LC. Because |L|=, L(n) for any natural n. Let n be a natural number such that n>|w0| and Γ be a decision tree over L(n) that solves the problem of membership for L(n) nondeterministically and has the minimum depth. Let wL(n) and ξ be a complete path in Γ such that wE(n,ξ). Then, the terminal node of ξ is labeled with the number 1. Let us assume that the number of nodes labeled with attributes in ξ is at most n|w0|. Then, we can change at most |w0| letters in the word w such that the obtained word w will satisfy the following conditions: w0 is a subword of w and wE(n,ξ). However, it is impossible because in this case wL(n) and w E(n,ξ), but the terminal node of ξ is labeled with the number 1. Therefore, the depth of Γ is greater than n|w0|. Thus, hLma(n)=Ω(n). It is easy to construct a decision tree over L(n) that solves the problem of membership for L(n) deterministically and has a depth equal to n. Therefore, hLmd(n)=O(n). Thus, hLmd(n)=Θ(n) and hLma(n)=Θ(n).

(b) Let |L|<. Then, there exists natural m such that L(n)= for any natural nm. Therefore, for each natural nm, hLmd(n)=0 and hLma(n)=0.

Let LC=, n be a natural number, and Γ be a decision tree over L(n) which consists of the root, a terminal node labeled with 1, and an edge that leaves the root and enters the terminal node. One can show that Γ solves the problem of membership for L(n) deterministically and has a depth equal to 0. Therefore, hLmd(n)=0 and hLma(n)=0. □

5. Conclusions

In this paper, we studied arbitrary binary subword-closed languages. For the set of words L(n) of the length n belonging to a binary subword-closed language L, we investigated the depth of the decision trees solving the recognition and the membership problems deterministically and nondeterministically. We proved that with the growth of n, the minimum depth of the 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 types of trees and problems, with the growth of n, the minimum depth of the decision trees is either bounded from above by a constant or grows linearly. We also studied the joint behavior of the minimum depths of the considered four types of decision trees and described five complexity classes of binary subword-closed languages.

In this paper, we did not assume that a binary subword-closed language is given by a deterministic finite automaton accepting this language. So, we could not use the parameters of the automaton for the study of decision tree complexity as it was done in [6,7,8,9]. Instead of this, for binary subword-closed languages, we described simple combinatorial criteria for the behavior of the minimum depths of the decision trees solving the problems of recognition and membership deterministically and nondeterministically.

In the future, we are planning to generalize this approach to some other classes of formal languages.

Acknowledgments

Research reported in this publication was supported by the King Abdullah University of Science and Technology (KAUST).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The author declares no conflict of interest.

Funding Statement

Research funded by the King Abdullah University of Science and Technology.

Footnotes

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

References

  • 1.Atminas A., Lozin V.V. Deciding Atomicity of Subword-Closed Languages. In: Diekert V., Volkov M.V., editors. Lecture Notes in Computer Science, Proceedings of the Developments in Language Theory-26th International Conference, DLT 2022, Tampa, FL, USA, 9–13 May 2022, Proceedings. Volume 13257. Springer; Berlin/Heidelberg, Germany: 2022. pp. 69–77. [Google Scholar]
  • 2.Brzozowski J.A., Jirásková G., Zou C. Quotient Complexity of Closed Languages. Theory Comput. Syst. 2014;54:277–292. doi: 10.1007/s00224-013-9515-7. [DOI] [Google Scholar]
  • 3.Haines L.H. On Free Monoids Partially Ordered by Embedding. J. Comb. Theory. 1969;6:94–98. doi: 10.1016/S0021-9800(69)80111-0. [DOI] [Google Scholar]
  • 4.Hospodár M. Power, positive closure, and quotients on convex languages. Theor. Comput. Sci. 2021;870:53–74. doi: 10.1016/j.tcs.2021.02.002. [DOI] [Google Scholar]
  • 5.Okhotin A. On the State Complexity of Scattered Substrings and Superstrings. Fundam. Inform. 2010;99:325–338. doi: 10.3233/FI-2010-252. [DOI] [Google Scholar]
  • 6.Moshkov M. Complexity of Deterministic and Nondeterministic Decision Trees for Regular Language Word Recognition. In: Bozapalidis S., editor. Aristotle University of Thessaloniki, Proceedings of the 3rd International Conference Developments in Language Theory, Thessaloniki, Greece, 20–23 July 1997. DLT; Toronto, ON, Canada: 1997. pp. 343–349. [Google Scholar]
  • 7.Moshkov M. Decision Trees for Regular Language Word Recognition. Fundam. Inform. 2000;41:449–461. doi: 10.3233/FI-2000-41405. [DOI] [Google Scholar]
  • 8.Moshkov M. Time Complexity of Decision Trees. In: Peters J.F., Skowron A., editors. Trans. Rough Sets III. Volume 3400. Springer; Berlin/Heidelberg, Germany: 2005. pp. 244–459. Lecture Notes in Computer Science. [Google Scholar]
  • 9.Moshkov M. Decision trees for regular factorial languages. Array. 2022;15:100203. doi: 10.1016/j.array.2022.100203. [DOI] [Google Scholar]
  • 10.Breiman L., Friedman J.H., Olshen R.A., Stone C.J. Classification and Regression Trees. Chapman and Hall/CRC; Boca Raton, FL, USA: 1984. [Google Scholar]
  • 11.Quinlan J.R. C4.5: Programs for Machine Learning. Morgan Kaufmann; Burlington, MA, USA: 1993. [Google Scholar]
  • 12.Rokach L., Maimon O. Data Mining with Decision Trees-Theory and Applications. Volume 69 World Scientific; Singapore: 2007. (Series in Machine Perception and Artificial Intelligence). [Google Scholar]
  • 13.AbouEisha H., Amin T., Chikalov I., Hussain S., Moshkov M. Extensions of Dynamic Programming for Combinatorial Optimization and Data Mining. Volume 146 Springer; Berlin/Heidelberg, Germany: 2019. Intelligent Systems Reference Library. [Google Scholar]
  • 14.Aglin G., Nijssen S., Schaus P. Learning optimal decision trees using caching branch-and-bound search; Proceedings of the 34th AAAI Conference on Artificial Intelligence; New York, NY, USA. 7–12 February 2020; pp. 3146–3153. [Google Scholar]
  • 15.Narodytska N., Ignatiev A., Pereira F., Marques-Silva J. Learning optimal decision trees with SAT; Proceedings of the 27th International Joint Conference on Artificial Intelligence; Stockholm, Sweden. 13–19 July 2018; pp. 1362–1368. [Google Scholar]
  • 16.Verwer S., Zhang Y. Learning optimal classification trees using a binary linear program formulation; Proceedings of the 33rd AAAI Conference on Artificial Intelligence, AAAI 2019; Washington, DC, USA. 7–14 February 2019; pp. 1625–1632. [Google Scholar]
  • 17.Moshkov M. Comparative Analysis of Deterministic and Nondeterministic Decision Trees. Volume 179 Springer; Berlin/Heidelberg, Germany: 2020. Intelligent Systems Reference Library. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Not applicable.


Articles from Entropy are provided here courtesy of Multidisciplinary Digital Publishing Institute (MDPI)

RESOURCES