13.07.2015 Views

Parameterized Regular Expressions and Their Languages

Parameterized Regular Expressions and Their Languages

Parameterized Regular Expressions and Their Languages

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!