On the undecidability and descriptional complexity of synchronized regular expressions

In Freydenberger (Theory Comput Syst 53(2):159–193, 2013. https://doi.org/10.1007/s00224-012-9389-0), Freydenberger shows that the set of invalid computations of an extended Turing machine can be recognized by a synchronized regular expression [as defined in Della Penna et al. (Acta Informatica 39(1):31–70, 2003. https://doi.org/10.1007/s00236-002-0099-y)]. Therefore, the widely discussed predicate “={0,1}∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$=\{0,1\}^*$$\end{document}” is not recursively enumerable for synchronized regular expressions (SRE). In this paper, we employ a stronger form of non-recursive enumerability called productiveness and show that the set of invalid computations of a deterministic Turing machine on a single input can be recognized by a synchronized regular expression. Hence, for a polynomial-time decidable subset of SRE, where each expression generates either {0,1}∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{0, 1\}^*$$\end{document} or {0,1}∗-{w}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{0, 1\}^* -\{w\}$$\end{document} where w∈{0,1}∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$w \in \{0, 1\}^*$$\end{document}, the predicate “={0,1}∗\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$=\{0,1\}^*$$\end{document}” is productive. This result can be easily applied to other classes of language descriptors due to the simplicity of the construction in its proof. This result also implies that many computational problems, especially promise problems, for SRE are productive. These problems include language class comparison problems (e.g., does a given synchronized regular expression generate a context-free language?), and equivalence and containment problems of several types (e.g., does a given synchronized regular expression generate a language equal to a fixed unbounded regular set?). In addition, we study the descriptional complexity of SRE. A generalized method for studying trade-offs between SRE and many classes of language descriptors is established.

with other extensions such as backreferences (as defined in [1]). Della Penna et al. use SRE to present a formal study of the backreferences extension and of a new extension called the synchronized exponents proposed by them. They also study the classification of SRE in the formal language hierarchy and show that SRE are context-sensitive but do not generate all context-free languages. The membership problem for SRE and SRE with certain restrictions is studied in [6] as well. In [5], Carle shows that the language of palindromes cannot be generated by a synchronized regular expression, and the language {ww|w ∈ {0, 1} * } is a synchronized regular language. Hence, the class of synchronized regular languages is incomparable with the class of context-free languages.
In [7], Freydenberger shows that the set of invalid computations of an extended Turing machine can be recognized by an extended regular expression (introduced by Câmpeanu et al [4]), hence, by a synchronized regular expression. Therefore, the widely discussed predicate "= {0, 1} * " is not recursively enumerable for SRE. Moreover, Freydenberger shows that the regularity, cofiniteness, and RegEx(k)-ity (defined in [7]) problems are not recursively enumerable for SRE. More research on extended regular expressions (EXREGs) can be found in [2,9,26,27].
In this paper, we employ a stronger form of non-recursive enumerability called productiveness. A productive set S is not recursively enumerable. Furthermore, for any effective axiomatic system F, there is an effective procedure to construct an element that is in S, but not provable in F (see Sect. 3.1 for precise definitions). Then, we show that the set of invalid computations of a deterministic Turing machine on a single input can be recognized by a synchronized regular expression. Hence, for a polynomial-time decidable subset of SRE, where each expression generates either {0, 1} * or {0, 1} * − {w} where w ∈ {0, 1} * , the predicate "= {0, 1} * " is productive. This special type of universality problem is denoted by "= {0, 1} * | |L c |≤1 ". This result can be easily applied to other classes of language descriptors, such as 1-SRE (see Definition 6), one-reversal bounded one-counter machines, and real-time one-way cellular automata (the definition can be found in [20]), due to the simplicity of the construction in its proof. This result also implies the productiveness of many problems for SRE. These problems include: 1. a variety of equivalence and containment problems such as testing equivalence to any fixed unbounded regular languages, 2. language class comparison problem which is defined as follows: For two classes of language descriptors D 1 and D 2 , determine for any a ∈ D 1 , whether L(a) ∈ L(D 2 )?
The general containment problem for pattern languages over fixed alphabets is shown to be undecidable in [8] which can be applied to SRE directly since all pattern languages can be represented by SRE (see [6]). We study the problems of testing equivalence and containment to many fixed languages since these results are stronger and have more practical meanings. For example, the result of testing equivalence to a fixed regular set enables us to show there is no approximating minimization algorithm between SRE and DFA accepting this fixed regular set. Several authors have investigated the existence and applicability of analogues of Rice's Theorem for many classes of languages. For example, in [17,18], sufficient conditions are given for a language predicate to be as hard as the language predicate = {0, 1} * . There are five major differences between the previous results in [17,18] and the results in this paper. 1. In Theorem 4.5, we show a way to study predicates that are not true for any regular/context-free sets. This is not done in the previous research. Most of the previous results require the language predicates to be true for some regular sets.
2. Due to the properties of the predicate "= {0, 1} * | |L c |≤1 ", most of the results in this paper are applicable to promise problems. For example, Theorem 4.3 states that for a polynomial-time decidable subset of SRE, where each expression is guaranteed to generate a regular set, the predicates are productive. 3. The previous results are only for regular expressions, context-free grammars, and in some cases, context-sensitive grammars. But, because of the simple construction in Proposition 3, we can easily apply the results of this paper to any class of language descriptors D such that L(D) contains the language {x # y |x, y ∈ ( − {#}) * and |x| = |y|} and L(D) is closed under union, and concatenation with regular sets. For example, the results of this paper can be applied to SRE, 1-SRE, one-reversal bounded one-counter machines, and real-time one-way cellular automata. 4. The previous results cannot be applied to the language class comparison problems between incomparable classes. But the results in this paper enable us to study such problems. For example, we know that the class of synchronized regular languages is incomparable with the class of context-free languages. In Corollary 4, we show that it is productive to determine, for an arbitrary synchronized regular expression, whether it generates a context-free language. 5. The previous results require the language predicates to be with certain restrictions, such as closed under left or right derivatives. But in Corollary 3, we show that it is productive to determine, for an arbitrary synchronized regular expression, whether it generates a k-pattern language (defined in Definition 3) for any k ≥ 1. Due to the dichotomization of the reduction in the proof, we do not need any closure property for k-pattern languages.
The second aim of this paper is to study the descriptional complexity of SRE. In the theory of formal languages, questions concerning descriptional complexity are widely discussed. How succinctly can a descriptor generate a language in comparison with some other descriptors generating the same language? It is well-known that for all natural number n ≥ 1, there exists a regular language accepted by some nondeterministic finite automata (NFA) with n states but every deterministic finite automaton (DFA) accepting the same language has at least 2 n states. In [13], Hartmanis shows that there is no recursive trade-off between pushdown automata (PDA) and deterministic pushdown automata (DPDA). In [7], Freydenberger shows that there is no recursive trade-off between SRE and regular expressions. More related research can be found in [14]. In this paper, we study trade-offs between SRE and many language descriptors including DFA, subclasses of regular expressions, and multi-patterns.
Multi-patterns (MP) and multi-pattern languages (MPL) are defined in [19] to exhibit common patterns for a given sample of words. As Della Penna et al. mentioned in [6], backreferences are a generalization of patterns, i.e., expressions that make reference to the string matched by a previous subexpression, we believe it is interesting to consider the relationship between SRE and MPL. Several results established in this paper are related to MPL. We prove that it is productive whether a given synchronized regular expression generates a multi-pattern language. In addition, we show that there is no recursive trade-off between SRE and MP.
This paper is organized as follows.
In Sect. 2, we review the definitions of SRE and MP. Several preliminary definitions and notations are also explained.
In Sect. 4, sufficient conditions are given for a language predicate to be as hard as the language predicates "= {0, 1} * | |L c |≤1 " for SRE. These conditions yield a method for proving productiveness results through highly efficient many-one reductions. Using this method, we prove many computational problems are productive for SRE.
In Sect. 5, we study the descriptional complexity of SRE and generalize a method for showing non-recursive trade-offs between SRE and many classes of language descriptors.

Definitions and notations
In this section, we review the definitions of SRE and MPL from [6] and [19], respectively. Several preliminary definitions and notations are also explained. The reader is referred to [16] for all unexplained notations and terminologies in language theory.
We use λ to denote the empty string and ∅ to denote the empty set. We use N to denote the set of natural numbers. Let P denote the class of sets that can be recognized in polynomial time by a deterministic Turing Machine. If A is many-one reducible to B, we write A ≤ m B.

Definition 1
The synchronized regular expressions on an alphabet , a set of variables V and a set of exponents X are defined as follows: If e 1 , e 2 ∈ S R E, then: 1. e * 1 ∈ S R E (star) 2. ∀x ∈ X : e x 1 ∈ S R E (exponentiation) 3. ∀v ∈ V : e 1 %v ∈ S R E (variable binding) 4. e 1 e 2 ∈ S R E (concatenation) 5. e 1 + e 2 ∈ S R E (union) Beyond these basic syntactic definitions, a synchronized regular expression must meet the following conditions to be considered valid.

Definition 2
The SRE validity test is defined as follows: 1. Each variable occurs in a binding operation no more than once in the expression. 2. Each occurrence of a variable in the expression is preceded by a binding of that variable somewhere to the left of the occurrence in the expression.
Unless otherwise specified, any mention of SRE in this paper refers to valid SRE. The following examples are used in later proofs of this paper and can help the readers better understand SRE.

Example 2.1
The synchronized regular expression 0 x 1 x specifies the language {0 n 1 n | n ≥ 0}.

Definition 3
Let V be an alphabet of variables such that V ∩{0, 1} = ∅. A pattern α is a string over V ∪{0, 1}. Let H be the set of homomorphisms h where h : (V ∪{0, 1}) * → (V ∪{0, 1}) * . Then, the language generated by the pattern α is defined as The language generated by the multi-pattern π is For all integer k ≥ 1, a k-pattern p is a set of patterns of cardinality k. The language generated by the k-pattern p is
Proof It is not hard to see that no single pattern can specify this language but the multi-pattern π = {0x x, 1x} specifies this language.
Proof The proof can be found in [19].
Let D be a class of language descriptors that describe languages over . In this paper, we only consider finite . Then, ∀d ∈ D, L(d) = {w ∈ * | w is described by d} and L(D) = {L ⊆ * | ∃d ∈ D such that L = L(d)}. ∀d ∈ D, let |d| denote the size of d and < d > denote a code of d.
Our code of a language descriptor is efficient and described informally below.
1. For a regular expression, synchronized regular expression, or multi-pattern, the code is itself.
3. For a Turing machine with a set of states Q and tape alphabet T , states are denoted by q u where u is a base 10 numeral without leading 0's representing integers {0, 1, . . . , |Q|−1}. Each machine move δ(q, a) = (q , a , d) where q, q ∈ Q, a, a ∈ T and d ∈ {L, R} is denoted by a 5-tuple (q, a, q , a , d). For other types of automata, we have similar rules. We use tuples to denote machine moves and q u to denote states.
The size of a DFA is the number of states of the DFA. The size of a pattern is the number of symbols of the pattern. The size of a context-free grammar is the number of symbols of all its productions. For example, the following context-free grammar d accepts the language Comparing two classes of language descriptors D 1 and D 2 , we assume that L(D 1 )∩L(D 2 ) is not finite. We say that a function f : N → N where f (n) ≥ n is an upper bound for the trade-off between D 1 and D 2 when transforming from a minimal descriptor in D 1 for an arbitrary language to an equivalent minimal descriptor in D 2 , if for all L ∈ L(D 1 ) ∩ L(D 2 ) the following holds: If no recursive function is an upper bound for the trade-off between D 1 and D 2 , we say the trade-off between D 1 and D 2 is non-recursive.
3 Productiveness and the predicate "= {0, 1} * " for SRE Section 3 consists of the two Sects. 3.1 and 3.2. Section 3.1 consists of the definition of productiveness, a stronger form of non-recursive enumerability, and two propositions that can be used to prove productiveness results. Section 3.2 consists of Theorem 3.1, which shows for a polynomial-time recognizable subset D of SRE({0, 1}), such that ∀d ∈ D ,

Productiveness
Productive sets and their properties are a standard topic in mathematical logic/recursion theory textbooks such as [25] and [28]. Productiveness is a recursion-theoretic abstraction of what causes Gödel's first incompleteness theorem to hold. Definition 4 recalls the definition of a productive set on N, as developed in [25].

Definition 4
Let W be an effective Gödel numbering of the recursively enumerable sets. A set A of natural numbers is called productive if there exists a total recursive function f so that From this definition, we can see that no productive set is recursively enumerable. It is well-known that the set of all provable sentences in an effective axiomatic system is always a recursively enumerable set. So for any effective axiomatic system F, if a set A of Gödel numbers of true sentences in F is productive, then there is at least one element in A which is true but cannot be proven in F. Moreover, there is an effective procedure to produce such an element.
Let W be an effective Gödel numbering of the recursively enumerable sets. K denotes the set {i ∈ N | i ∈ W i }. K denotes the set {i ∈ N | i / ∈ W i }. Two well-known facts of productive sets (see [25]) that are necessary for the research developed here are as follows: Let , be two different finite alphabets such that both A ⊆ * and A ⊆ * . It is easily seen that There exists a total recursive function F : Hence, language A is productive for some finite alphabet such that A ⊆ * if and only if A is productive for all finite alphabets such that A ⊆ * . This is the sense in which the concepts of productiveness are independent of particular finite alphabets.
The following proposition is used to prove many productiveness results for SRE. It also shows in which way the productiveness is stronger than non-recursive enumerability, i.e., every productive set A has an infinite recursively enumerable subset, and for any sound proof procedure P, one can effectively construct an element that is in A, but not provable in P.

Proposition 2 Let A ⊆ * , B ⊆ * , and A ≤ m B. Then, the following holds:
1. If A is productive, then so is B.

If A is productive, then there exists a total recursive function
: * → * , called a productive function for A, such that for all x ∈ * , is some Gödel-numbering of Turing machines over alphabet .

If A is productive, then A is not recursively enumerable (RE). However, A does have an infinite RE subset.
Proof of 1: By Proposition 1, if A is productive, then K ≤ m A. Hence by the transitivity of the many-one reducibility, K ≤ m B. Hence by Proposition 1, B is also productive. Proof of 2: Let the natural numbers be represented in unary. Let K ≤ m A (via F). Then, there exists a total recursive function g : * → {1} * such that, for all x ∈ * , The proof of the existence of function g can be seen in Theorem V(a) [25] page 84. Let the function : * → * be defined by, for all x ∈ * , (x) = F(g(x)). The function is a total recursive function since it is the composition of two total recursive functions with appropriate domains and ranges. The function is actually a productive function for A. This is seen as follows. Let x ∈ * ; and suppose that By the productive property of K using productive function ). Hence, as was to be verified, Proof of 3: Since K is not RE and K ≤ m A by assumption, A is also not RE. The remainder of the proof is essentially the same as that of Theorem X [25] pages 90-91. It is given here, for the convenience of the reader. Let : * → * be a productive total recursive function for A. A total recursive function g : N → * can be computed inductively as follows. Let x 0 be some Gödel index for . Then, Since the function g as defined is one-to-one, the set {g(n) | n ≥ 0} is an infinite RE subset of A.

The predicate "= {0, 1} * " for SRE
To make our results stronger and more applicable, we first study the sets of valid and invalid computations of Turing machines. Unlike the definition stated in [12] and [16], we define the sets of valid and invalid computations of Turing machines on given inputs. This refined definition enables us to investigate the complexity/undecidability of the restricted language predicate: testing equivalence to {0, 1} * for languages whose complements' cardinalities are less than or equal to one (denoted by "= {0, 1} * | |L c |≤1 ").
The instances of this restricted predicate have very important semantic properties: they are the simplest regular sets. These restrictions make the predicate more widely applicable: for example, they directly apply to promise problems, predicates on regular sets, and descriptional complexity of language descriptors. Throughout this section, M = (Q, , T , δ, q 0 , B, F) is a single tape deterministic Turing machine where: shift and R is the right shift; and , is the set of strings of the form #id 0 #id 1 #id 2 · · · #id n # such that is defined as follows: Then t ∈ L 1 . 2. t is of the form above. There are only two possibilities: (a) t does not end with id n # where id n is a final ID of M. Then, t ∈ L 2 . (b) t ends with id n #. Then, there are only two cases: (i) t does not start with #id 0 where id 0 is the initial ID of M on w. Then, t ∈ L 3 .
Proof of 2, 3, and 4: From the definition of L 3 , we can see that the regular expression N M,w accepting L 3 contains O(|w|) parentheses. Hence, we need O(|w|log|w|) time to encode and count these parentheses. From Definition 1, SRE languages are closed under union and concatenation efficiently. It is obvious that every regular language is an SRE language. From Example 2.2, it is easy to see that we can efficiently construct an SRE to specify the language L 1 ∪ L 2 ∪ L 3 ∪ L 4 . Now, we give a synchronized regular expression to specify a language that is central to the specification of L 5 . For simplicity, assume the input alphabet of the Turing machine = {0, 1}. For any a, b, c, d ∈ {0, 1}, the SRE (0+1) x abc(0+1) * #(0+1) x (0+1)d specifies the language {uabcw#vd | u, w, v ∈ {0, 1} * , |u| = |v|−1} over language alphabet {0, 1, #}. From this synchronized regular expression, we can construct a synchronized regular expression to specify L 5 by concatenation with regular sets and union with SRE languages. Hence, we can efficiently construct a synchronized regular expression to specify L 1 ∪ L 2 ∪ L 3 ∪ L 4 ∪ L 5 .
By this proposition and the following theorem, we show that even for a polynomialtime recognizable subset D of SRE({0, 1}) where each element in D generates either {0, 1} * or {0, 1} * − {w} (w ∈ {0, 1} * ), the predicate "= {0, 1} * " is already productive. This means the predicate "= {0, 1} * | |L c |≤1 " is not recursively enumerable for SRE ({0, 1}), independent of the complexity of testing whether an instance is in D . Results of this type occur throughout this paper and have many applications, especially for promise problems. Moreover, since synchronized regular expressions are recursive language descriptors, the predicate " = {0, 1} * " is recursively enumerable. It is worth noticing that the languages L 1 through L 5 in Proposition 3 are very simple languages. So we can easily apply the results of this paper to any class of language descriptors D such that L(D) contains the language {x # y |x, y ∈ ( − {#}) * and |x| = |y|} and L(D) is closed under union, and concatenation with regular sets. For example, the results of this paper can be applied to one-reversal bounded one-counter machines, and real-time one-way cellular automata (defined in [20]). Proof of 1: Let e be constructed in a certain way to accept L 1 , . . . , L 5 so that e has a special format. For example, e must contain 5 easily separable sub-expressions such that the first sub-expression accepts L 3 , and the remaining sub-expressions accept L 1 , L 2 , L 4 , L 5 in this exact order. Since Proof In Example 2.2 and the proof of Proposition 3, the synchronized regular expressions we present are 1-SRE. A 1-SRE language concatenation with a regular set or union with a regular set is still a 1-SRE language. A 1-SRE language union with a 1-SRE language is still a 1-SRE language. So we can construct a 1-level synchronized regular expression to accept Therefore, all the results for SRE in this paper hold for 1-SRE.

Language predicates for SRE
In this section, we show that many important language predicates are as hard as the predicate "= {0, 1} * | |L c |≤1 " for SRE. This section consists of three major theorems. Theorem 4.1 shows the productiveness of testing equivalence and containment to any fixed unbounded regular set for SRE. Theorem 4.3 gives widely applicable sufficient conditions for proving productiveness results for SRE. One condition of Theorem 4.3 is that the language predicates need to be true for only one regular set {0, 1} * . Theorem 4.5 shows how to prove productiveness results for predicates that are not true for any regular/context-free languages by giving two interesting examples related to multi-pattern languages.
The following definition from [15] is necessary for Theorem 4.1.

Definition 7 A regular set
Proof The proof is similar to that used in [17] to show that the predicate "= L 0 " is undecidable for context-free grammars where L 0 is any fixed context-free language with unbounded regular subset. Since R 0 is unbounded, from Lemma 7, there exist r , s, x, y ∈ {0, 1} * such that {r }·{0x, 1y} * ·{s} ⊆ R 0 . ∀e 1 ∈ D where D is defined in Theorem 3.1, we can efficiently construct a synchronized regular expression e 2 such that Theorem 4.1 shows that for any fixed unbounded regular set R 0 , the predicates "= R 0 " and "⊇ R 0 " are productive even for a polynomial-time recognizable subset of SRE ({0, 1}) where each element generates either R 0 or R 0 − {w} (w ∈ {0, 1} * ). We believe this result has significant practical meanings since in reality, finding an approximation that differs from R 0 by a finite set is often done and very interesting.
The proof of Theorem 4.1 can be easily applied to any fixed language L 0 with an unbounded regular subset as long as the language L 0 ∩ {r } · {0x, 1y} * · {s} can be generated by a synchronized regular expression. Here, we give an example to show that Theorem 4.1 works for many non-regular languages. Extended regular expressions (EXREGs) are introduced by Câmpeanu et al [4] and are closed under intersection with regular sets [3]. It is easy to see that SRE contain EXREGs effectively since variable bindings can function as backreferences (defined in [4]). Hence, for any language L 0 generated by an extended regular expression, the language L 0 ∩{r } · {0x, 1y} * · {s} can be generated by a synchronized regular expression. Hence, we can get the following corollary.
It may be practically more relevant to ask for an approximating minimization algorithm between SRE and DFA/CFG/EXREGs, i.e., given a synchronized regular expression e, finding a DFA/CFG/EXREG accepting L(e) whose size is bounded by f (M) where f : N → N is a recursive function and M is the size of a minimal DFA/CFG/EXREG accepting L(e). The results of testing equivalence and containment to some fixed language L 0 also enable us to show there is no approximating minimization algorithm between SRE and DFA/CFG/EXREGs accepting L 0 . For simplicity, we only show the following theorem for the case L 0 = {0, 1} * .

Proof
We only prove there is no algorithm for solving the approximating minimization problem between SRE and CFG. For DFA, the proof is easier since the universality problem is decidable for DFA. For EXREGs, the proof is similar. Assume there is an algorithm for solving the approximating minimization problem between SRE and CFG. Then, for any synchronized regular expression generating a context-free language L 0 , one can find an equivalent CFG of size K accepting L 0 , such that K ≤ f (M) where M is the size of a minimal CFG accepting L 0 . In this case, let L 0 = {0, 1} * . We know the size of a minimal CFG accepting {0, 1} * is 8 (see the example in Sect. 2). Hence, for any synchronized regular expression e, we can run this algorithm and find an equivalent CFG d. For any context-free grammar with n nonterminals, nonterminals are denoted by s u where u is a base 10 numeral without leading 0's representing integers  Proof The proof is similar to that used in [18] which shows the undecidability of many predicates on context-free languages which are true for {0, 1} * . We only prove when L (REG({0, 1})) − le f t = ∅, the theorem holds. The other part of the proof is very similar. Since L (REG({0, 1})) − le f t = ∅, there exists a regular language L f such that L f / ∈ le f t . Then, ∀e 1 ∈ D where D is defined in Theorem 3.1, we can efficiently construct a synchronized regular expression e 2 such that Theorem 4.3 is extremely useful for proving productiveness results of language class comparison problems for SRE with a promise that each synchronized regular expression is guaranteed to generate a regular language. We illustrate the power and applicability of Theorem 4.3. Proof The definitions of the classes of regular sets of 2, 3, and 11 through 18 can be found in [22]. The definition of 4 can be found in [23], 5 in [24], 19 in [11], 20 in [29], and 21 in [21]. The proof for each of the above predicates consists of two parts. The first part consists of observing that the predicates are true for {0, 1} * . The second part of the proof consists of showing that le f t or right is a proper subset of the regular sets which can be found in [18].
Since Theorem 4.3 only requires the predicates to be true for one regular set {0, 1} * , we can use its proof to study the complexity/undecidability of predicates on many classes of languages other than the regular sets. Two interesting examples are the following corollaries of the proof of Theorem 4.3. Due to the power and applicability of this proof and the dichotomization of its reduction, we can show Corollary 3 despite that MPL is an anti-AFL (anti-abstract family of languages, see [10] for definition) and k-pattern languages may not be closed under left or right derivatives ( [19]), and any class of languages ⊆ L(CFG ({0, 1})) that contains {0, 1} * satisfies Corollary 4 regardless of the closure properties of . SRE({0, 1}), L(d) is a k-pattern language for any k ≥ 1} is productive, and {< d >| d ∈ SRE({0, 1}), L(d) is a multi-pattern language } is productive.
Proof Let L f = {0 n 1 n | n ≥ 0}. We know that L f is an SRE language by Example 2.1. We also know that L f is not a multi-pattern language and MPL is closed under left and right derivatives [19]. Hence, with the same construction in the proof of Theorem 4.3, if L(e 1 ) = {0, 1} * , then L(e 2 ) = {0, 1} * which is a 1-pattern language. Otherwise, there exists a string w ∈ {0, 1} + such that w\L(e 2 ) = L f . Since L f is not a multi-pattern language and MPL languages are closed under left derivatives, L(e 2 ) is not a multi-pattern language. Hence, L(e 2 ) is not a k-pattern language for any k ≥ 1.

Corollary 4 For any fixed set where
Proof Let L f = {ww | w ∈ {0, 1} * }. The SRE (0 + 1) * %X · X (X is a variable) specifies So far, all language class comparison problems we have studied need to be true for only one regular set {0, 1} * . The following theorem illustrates how we can investigate the complexity/undecidability of predicates that are not true for any regular set, or any context-free languages.
is a multi-pattern language but not context-free. Otherwise, ∃w ∈ {0, 1} * such that 0 h(w)11\L(e 2 ) = L f . MPL is closed under left and right derivatives [19] ⇒ L(e 2 ) is not a multi-pattern language.

Descriptional complexity of SRE
In this section, we study the descriptional complexity of SRE using the special properties of the predicate "= {0, 1} * | |L c |≤1 ". Regular languages are the most commonly used formal languages. In [7], Freydenberger shows that there is no recursive trade-off between SRE and regular expressions. But it may be practically more relevant to ask the trade-off between SRE and a class of language descriptors accepting a particular subset of regular languages. To show that our results are even more widely applicable, we tune Theorem 5.2 with slight changes to study the trade-off between SRE and multi-patterns. Here, we redefine I N V ALC M(w) developed in Definition 5 to tune the conditions in Theorem 5.2 so they can fit the properties of multi-patterns (Lemmas 5. With the tuned conditions, we establish Theorem 5.3 to show there is no recursive trade-off between SRE and multi-patterns. This is another example to show Proposition 3 is easily applicable.
The following lemma for DFA is well-known and needed for proving Theorem 5.1. We establish the following theorem to generalize Theorem 5.1. Many non-recursive tradeoffs between SRE and other classes of language descriptors can be proved using it. Then, there is no recursive trade-off between SRE and D.
Proof Assume there exists a recursive function g : N → N such that for any synchronized regular expression e specifying the coded I N V ALC M(w) (notice that we can efficiently code I N V ALC M(w) into alphabet {0, 1} and |I N V ALC M(w) c | ≤ 1), for any d ∈ D specifying L(e), g(|e|) > |d|. Since f is strictly increasing, we know f (g(|e|)) > f (|d|) > |t| where t ∈ V ALC M(w). Clearly, the function f • g remains a recursive function. |t| > x where x is the number of steps that the Turing machine N takes to halt on w. Hence, f (g(|e|)) > x. Hence, the halting problem is recursive, which is a contradiction.
The following corollary illustrates the power and applicability of Theorem 5.2. It is also interesting for us to investigate the trade-off between SRE and multi-patterns. To illustrate that our results are tunable and widely applicable, we slightly change the definition of INVALCM(w) as follows to investigate this problem. Intuitively, the redefined INVALCM(w) is either {0, 1} * or {0, 1} * − {w} · {0, 1} * .

Definition 8
Recall the deterministic Turing machine M = (Q, , T , δ, q 0 , B, F) we mentioned in Sect. 3. For all w ∈ + , letting w = w 1 w 2 w 3 . . . w k where w j ∈ (1 ≤ j ≤ k), the set of valid computations of M on w denoted by V ALC M (w), is the set of strings of the form #id 0 #id 1 #id 2 · · · #id n # · t such that

Conclusion
In this paper, productiveness is employed, which is a stronger form of non-recursive enumerability. If a language predicate is productive, then the predicate is not recursively enumerable. Moreover, for the given language predicate, there is an effective procedure which, given as input a program enumerating an effective axiomatic system which proves only true values of the language predicate, produces a statement which cannot be proven by the given axiomatic system but which is still true with respect to the language predicate. We have revised the definition of the sets of invalid computations of Turing machines and used this definition to show that the predicate "= {0, 1} * | |L c |≤1 " is productive for SRE. This result enables us to establish the productiveness of many problems for SRE, especially promise problems. Using