• Between each two consecutive [even] or [odd] strings there is exactly one [read] <strong>and</strong> one[head] in the slots devoted to [action] in form (1).• No other cell can change its context, except for those marked with [read] or [head], <strong>and</strong>• Thecontent thatchangesinthecellsmarkedby[read]<strong>and</strong>[head]respects thetransitionfunction δ of M.Moreover, we also add a set of expressions E 5 , accepting words such that:• The initial configuration of M is encoded as the first step of the computation representedby w.• The last computation ends in a final state of M.It is a tedious, but straightforward task to define the sets E 4 <strong>and</strong> E 5 of expressions.Furthermore, the fact that ⋂ e∈E L ✷(e) is empty if <strong>and</strong> only if M accepts on input ā followsimmediately from the remarks given along the construction. This finishes the proof. ✷The generic reduction used in the proof of Expspace-hardness of Nonemptiness ✷ alsoprovides lower bounds on the minimal sizes of words in languages L ✷ (e) (note that thelanguage L ✸ (e) always contains a word of linear size in |e|).Corollary 1. There exists a polynomial p : N → N <strong>and</strong> a sequence of parameterized regularexpressions {e n } n∈N such that each e n is of size at most p(n), <strong>and</strong> every word in the languageL ✷ (e n ) has size at least 2 2n .Before explaining the proof, we note that the single-exponential bound is easy to see(it was hinted at in the first paragraph of the introduction, <strong>and</strong> which was in fact used inconnection with querying incomplete graph data in [7]). For each n, consider an expressione n = (0|1) ∗ x 1 ...x n (0|1) ∗ . If a word w is in L ✷ (e n ), then w must contain every word in{0,1} n as a subword, which implies that its length must be at least 2 n +(n−1).Proof of Corollary 1: Clearly, for each n ∈ N, it is possible to construct a deterministicTuring machine M n over alphabet Σ = {0,1} that on input 1 n works for exactly 2 2n steps,using 2 n cells. Furthermore, it is possible to specify this machine using polynomial size withrespect to n.Next, using the construction in the reduction of Theorem 1, construct a set of parameterizedregular expressions E (Mn,1 n ) such that the single word w n ∈ ⋂ e∈E (Mn,1 n )L ✷ (e) representsa run (or, more precisely, a sequence of configurations) of M n on input 1 n . Note that eachset E (Mn,1 n ) is of size polynomial with respect to n. Moreover, according to the reductionin the proof of Theorem 1, ⋂ e∈E (Mn,1 n )L ✷ (e) contains a single word, of length greater than2 2n , representing the single run of M n on input 1 n .For each n, we define e n as the expression such that L ✷ (e n ) is empty if <strong>and</strong> only if⋂e∈E (Mn,1 n )L ✷ (e) is empty, constructed as in the proof of Lemma 2, so that e n is of size12
polynomial with respect to E (Mn,1 n ). It follows from the proof of such lemma that everyword accepted by L ✷ (e n ) has size at least 2 2n .✷It is also possible to show that the problem Nonemptiness ✷ remains Expspace-hardover the class of simple regular expressions. Indeed, the reduction on the proof of Theorem1 can be modified so that all the expressions in E are simple. As expected, the proof thenbecomes much more technical, <strong>and</strong> we have omitted it for the sake of space. We can alsoshow that the use of Kleene star has a huge impact on complexity.Proposition 2. The problem Nonemptiness ✷ is Σ p 2-complete over the class of expressionsof star-height 0.Proof: It is easy to see that, if e does not use Kleene star, then all the words w ∈ L ✷ (e) areof size polynomial with respect to the size of e. This immediately gives a Σ P 2 algorithm forthe emptiness problem: Given a a parameterized regular expression e not using Kleene star,guess a word w, <strong>and</strong> check that w ∈ L ✷ (e). The proof then follows from the easy fact thatMembership ✷ can be solved in coNP, by guessing a valuation ν such that w ∉ L(ν(e))(we shall show in Section 4.2 that this bound turns out to be tight).The Σ P 2 hardness is established via a reduction from the complement of the ∀∃ 3-SATsatisfiability problem, which is known to be Π P 2-complete. This problem is defined as follows:A formula ϕ is given as the conjunction of clauses {C 1 ,...,C p }, each of which has 3variables taken from the union of disjoint sets {x 1 ,...,x m } <strong>and</strong> {y 1 ,...,y t }. The problemasks whether there exists an assignment σ¯x for {x 1 ,...,x m } such that for every assignmentσȳ for {y 1 ,...,y t } it is the case that ϕ is not satisfiable.Let ϕ := ∀x 1···∀x m ∃y 1 ...∃y t C 1 ∧ ··· ∧ C p be an instance of ∀∃ 3-SAT. From ϕ weconstruct in polynomial time a parameterized regular expression e over alphabet Σ = {0,1}such that there exists an assignment σ¯x for {x 1 ,...,x m } such that for every assignment σȳfor {y 1 ,...,y t } it is the case that ϕ is not satisfiable if <strong>and</strong> only if L ✷ (e) is not empty.Let each C j (1 ≤ j ≤ p) be of the form (l 1 j ∨l 2 j ∨l 3 j), where each literal l i j, for 1 ≤ j ≤ p<strong>and</strong> 1 ≤ i ≤ 3, is either a variable in {x 1 ,...,x m } or {y 1 ,...,y t }, or its negation. Weassociate with each propositional variable x k , 1 ≤ k ≤ m, a fresh variable X k (representingthe positive literal) <strong>and</strong> a fresh variable ˆX k (representing the negation of such literal). Inthe same way, with each propositional variable y k , 1 ≤ k ≤ t, we associate fresh variablesY k <strong>and</strong> Ŷk. Then let W = {X 1 ,...,X m , ˆX 1 ,..., ˆX m }∪{Y 1 ,...,Y t ,,Ŷ1,...,Ŷt}∪{Z}, whereZ is a fresh variable as well.We define an expression e over Σ = {0,1} <strong>and</strong> W as follows:e := (Z ·0·e 1 ) | (1·Z ·e 2 ),where e 1 is the regular expression 1100·(0 | 1) m ·000, <strong>and</strong>wheree 2 : = e 2,1,1 | ··· | e 2,1,m | e 2,2,1 | ··· | e 2,2,m | e 2,3,1 | ··· | e 2,3,t | e 2,4 ,13
- Page 1 and 2: Parameterized Regular Expressions a
- Page 3 and 4: sequence prediction for dynamic mem
- Page 5 and 6: set of variables in V, can of cours
- Page 7 and 8: Lemma 2. Given a set e 1 ,...,e k o
- Page 9 and 10: code an accepting run τ for M on i
- Page 11: polynomial number of regular expres
- Page 15 and 16: • The case where for some 1 ≤ k
- Page 17 and 18: a different variable x i ∈ V. We
- Page 19 and 20: time with respect to the size of A
- Page 21 and 22: Next we show that ϕ is satisfiable
- Page 23 and 24: 3. For each word w ∈ Σ ∗ , the
- Page 25 and 26: Next we show that there is an imple
- Page 27 and 28: Finally, it suffices to perform a r
- Page 29 and 30: that the sequence of configurations
- Page 31 and 32: e 5 6 =⋃(a,q) | δ(q,a)=(q ′ ,a
- Page 33 and 34: 4.4. ContainmentRecall that the Con
- Page 35 and 36: Again, we shall denote this word al
- Page 37 and 38: Given a collection S of words over
- Page 39 and 40: • its size is at most exponential
- Page 41 and 42: states from A e . One reads words o
- Page 43: [20] W. Gelade, F. Neven, Succinctn