Yoshiharu Kojima 1,2

Size: px
Start display at page:

Download "Yoshiharu Kojima 1,2"

Transcription

1 Reachability Problems for Controlled Rewriting Systems Yoshiharu Kojima 1,2 joint work with Masahiko Sakai 1 and Florent Jacquemard 3 1 Nagoya University 2 Research Fellow of JSPS 3 INRIA Sacray, LSV AJSW2010, Obergurgl, 3 August, 2010 Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 1 / 24

2 Motivation I have ever studied about reachability and regularity preservation under some strategies (e.g. innermost, context-sensitive, and etc.), but in some problems, these strategies are not sufficient to represent (e.g. XML update). Hence we should formalize another strategy. Related work F. Jacquremard and M. Rusinowitch, Rewrite based verification for XML update, PPDP This paper formalize controlled TRS by XPath expression and global constrained TRS to express XML update. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 2 / 24

3 Outline Introduction of controlled string rewriting systems (CSRS). Proofs of undecidability and decidability of reachability and regular model checking (R (L in ) L err where R is CSRS, L in and L err are regular language) for controlled string rewriting systems (CSRS). Extension of CSRS to the following three kinds of controlled term rewriting systems (CTRS) by means of tree automata: 1 full-control, 2 monadic-control, and 3 prefix-control. Proofs of undecidability and decidability of reachability and regular model checking for above CTRS. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 3 / 24

4 Controlled string rewriting systems (CSRS) [P. Butzbach 73] and [L. Chottin 79] formalized. CSRS can control prefix of redexes by regular languages. Definition (rewrite rule) Each rewrite rule is of the form: v 1 v 2 if Lv 1 where v 1,v 2 Σ and L is regular language over Σ for the set of alphabet Σ. Definition (rewrite relation) s can be rewritten to t by an above rewrite rule if s = uv 1 w,t = uv 2 w and u L. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 4 / 24

5 Controlled string rewriting systems Example a a if c a a R = c if c a b b if c a a d b b d if c a d b aaa bb a aa bb caa bb ca a bb a aa b b caa b b cca bb caa db R (a b ) {c,d} = {c i d j j i} (context-free language). Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 5 / 24

6 Undecidable properties for CSRS Theorem Regular model checking is undecidable for length-one CSRS. Reachability is undecidable for flat CSRS. Flat CSRS CSRS where each rule is of the form a b, a bc, or ab c and latter two rules can be only applied at right-end of strings. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 6 / 24

7 Proof (Undecidability of reachability). Simulating emptiness problem of context-sensitive grammar. Context-sensitive grammar Grammar composed by quadruple N,T,P,S where each rule in P is of the form αaβ αγβ for α,β (N T),A N, and γ (N T) +. Simulated by the rules S SI,AB AC and A a [M. Penttonen 74] where I,A,B,C N and a T. Membership problems are PSPACE-complete, and emptiness problems are undecidable. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 7 / 24

8 Proof (Undecidable properties of reachability). Simulate a CSG G = N,T,P,S where each production rule in P is of the form S SI, AB AC, or A a. Let CSRS R as the following: R 1 = {S SI if S S SI P }, R 2 = {B C if (N T) AB AB AC P }, R 3 = {A a if (N T) A A a P }, and R 4 = {ab a if T ab,a if a a,b T }, R = R 1 R 2 R 3 R 4. Then, we have S R1 SI I R2 A 1 A n R3 a 1 a n R4 iff a 1 a n is produced by CSG G and hence we have S R iff L(G). Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 8 / 24

9 Decidable property for CSRS Theorem Reachability for non-length-decreasing CSRS is PSPACE-complete. Lemma For CSRS R over Σ and CSG G s.t. L(G) = {a 1 a n }, we can construct a CSG G s.t. L(G ) = {t a 1 a n R t}. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 9 / 24

10 Proof (sketch). S G, G A l 1A 2 A i A n G A l 1, q in A 2 A i A n G A l 1, q in A 2, q 2 A i, q f A n G G, G a 1 a i a n a i b 1 b m if La i a 1 b 1 b m a n G A l 1 A 2 B 1 B m A n G A l 1, q in A 2, q 2 B 1 B m A n Input: CSRS R = {a i b 1 b m if La i } and CSG G s.t. L(G) = {a 1 a i a n }. Output: CSG G s.t. L(G ) = {a 1 a i a n,a 1 b 1 b m a n } Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 10 / 24

11 Proof (sketch). S A l 1 A 2 A i A n a 1 a i a n G G a i b 1 b m if La i a 1 b 1 b m a n a 1 a i a n is rewritten to a 1 b 1 b m a n by the rule a i b 1 b m if La i. CSG G produce a 1 a i a n as follows: 1 G has non-terminal A that corresponds to a Σ and its terminal is Σ 2 Firstly, G produces A l 1 A i A n. 3 Next, G produces a 1 a i a n by the rules of the form A k a k P. Terminals are only produced by such rules. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 11 / 24

12 Proof (sketch). S A l 1 G, G A 2 A i A n a 1 a i a n G, G G a i b 1 b m if La i A l 1, q in A 2 A i A n G a 1 b 1 b m a n A l 1, q in A 2, q 2 A i, q f A n G A l 1, q in A 2, q 2 B 1 B m A n G simulate DFA A that corresponds to L in the rewrite rule. 1 Produce non-terminal A l 1,q in from A l 1 (l is marker for left-end). 2 Simulate transition δ(a k,q k ) q k of A by the production rule A k,q k A k+1 A k,q k A k+1,q k. 3 If q f is final state of A, then it implies a 1 a i 1 L(A) and B 1 B m is produced by the rule A i,q f B 1 B m. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 12 / 24

13 Proof (sketch). S G, G A l 1A 2 A i A n G A l 1, q in A 2 A i A n G A l 1, q in A 2, q 2 A i, q f A n G G, G a 1 a i a n a i b 1 b m if La i a 1 b 1 b m a n G A l 1 A 2 B 1 B m A n G A l 1, q in A 2, q 2 B 1 B m A n Finally, a 1 b 1 b m a n is produced by the rules A k,q k A k and A k a k. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 13 / 24

14 Results for CSRS Undecidable properties Regular model checking for length-one CSRS. Reachability for flat CSRS. Decidable property Reachability for non-length decreasing CSRS is PSPACE-complete. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 14 / 24

15 Controlled term rewriting systems (CTRS) CTRS (R, A,S ) is a pair of rewrite rules R and a tree automaton A,S named selection automaton. Definition (rewrite rules) Rewrite rules are of the form: (s 1 t 1, A,S ) where s,t T (F,X), A(= Q,Q f, ) is a usual tree automaton and S Q. A,S is named selection automaton. Definition (rewrite relation) s can be rewritten to t by the above rule if: s = C[s 1 σ],t = C[t 1 σ], and q S.C[s 1 σ] A C[q] A q f Q f. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 15 / 24

16 Three kinds of CTRS Definition For every selection automaton A(= Q,Q f, ),S in CTRS R, if does not contain ε-transition and there exists a state q 0 Q\S s.t. every transition rule f(q 1,...,q n ) q meets the following condition: if q q 0, then there exists at most one i s.t. q i q 0, otherwise, q = q 1 = = q n = q 0, then the CTRS is monadic control. In addition to condition of monadic control, if every transition rule f(q 1,...,q n ) q meets following condition, then the CTRS is prefix control If q S, then q 1 = = q n = q 0. Otherwise, the CTRS is full-control. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 16 / 24

17 Three kinds of CTRS C s C C s s σ σ σ Full control Monadic control Prefix control Red part in the above figures represent controlled part. Full-control can control whole context and substitution. Monadic-control can control path. Prefix-control can control prefix. Generality (Context-sensitive ) Prefix-control Monadic-control Full-control. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 17 / 24

18 Example Full-CTRS can represent a rule like: a c if a is brother of b and descendant of f by the TA A = {q, q a,q b,q qb,q f }, {q f }, where is the union of the followings and S = { q a }: {a q a,b q b }, {g(q 1,...,q n ) q g f, i,j.(q i = q a q j = q b )}, {g(q 1,...,q n ) q ab g f, i,j.(q i = q a q j = q b )}, {g(q 1,...,q n ) q ab g f, i.q i q f i.q i = q ab }, {g(q 1,...,q n ) q f g f, i.q i = q f }, {f(q 1,...,q n ) q i.q i = q ab }, {f(q 1,...,q n ) q f i.(q i = q ab q i = q f )}. We have the transition A C 1 [f(c 2 [g(a,b,t 1,...,t n )])] C 1 [f(c 2 [g( q a,q b,q,...,q)])] C 1 [f(q ab )] C A 1 [q f ] q f Q f A A Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 18 / 24

19 Undecidability and decidability for CTRS Undecidability Reachability is undecidable for flat prefix-ctrs. Regular model checking is undecidable for depth-one prefix-ctrs. Reachability is undecidable for ground full-ctrs. Decidability Reachability is decidable for non-size-decreasing full-ctrs. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 19 / 24

20 Theorem (Results of undecidability) The following problems are undecidable: 1 Reachability is undecidable for flat prefix-ctrs. 2 Regular model checking is undecidable for depth-one prefix-ctrs. 3 Reachability is undecidable for ground full-ctrs. Proof. By Simulating the problems for string case. 1,2 By representing every string a 1 a n as the tree a 1 ( (a n )), depth-one CTRS can simulate length-one CSRS and flat prefix-ctrs can simulate flat CSRS. 3 By introducing binary symbol f and representing every string a 1 a n as the tree f(a 1,f( f(a n 1,a n ))), ground full-ctrs can simulate flat-csrs. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 20 / 24

21 Proof. (ground full-ctrs). Ground full-ctrs R can simulate CSRS R that simulates CSG G where each production rule is of the form: S SI, AB AC, A a S R SI is simulated by S f(s,i) R and I f(i,i) R. A R a is simulated by A a R. ab R a and a R is simulated by f(a,b) a R and a R. AB R AC is simulated by B C if parents brother is A R. This reduction is like f(a,f(b, )) f(a,f(c, )). f f f S f f a 1 f S R I A 1 A 2 a 2 R R f R f f I I A n 1 A n a n 1 a n Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 21 / 24

22 Theorem (Results of decidability) Reachability is decidable for non-size-decreasing full-ctrs. Proof. For every term t, the set of terms reachable to t is finite. However, complexity of this problem is still open. In string cases, we have a corresponding grammar (context-sensitive grammar), but we don t have a corresponding grammar for tree (context-sensitive tree grammar?). Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 22 / 24

23 Conclusion Proofs of decidability and undecidability for some problems for CSRS. Reachability is undecidable for flat CSRS. Regular model checking is undecidable for length-one CSRS. Reachability for non-length-decreasing CSRS is PSPACE-complete. Formalizing CTRS by selection automata. Proofs of decidability and undecidability for some problems for CTRS. Reachability is undecidable for flat prefix-ctrs. Regular model checking is undecidable for depth-one CTRS. Reachability is decidable for non-size-decreasing CTRS. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 23 / 24

24 Future works The following problems are still open: Reachability for ground monadic- or ground prefix-ctrs. Complexity of reachability for non-size-decreasing CTRS. We can prove this by formalizing context-sensitive tree grammar? Subclasses of CTRS s.t. regular model-checking is decidable. There exists decidable results of confluence, equivalence problem, and or so for basic strict CSRS [G. Senizergues 90]. Y.Kojima, M.Sakai, F.Jacquemard () Reachability problems for CRS AJSW2010, 3 August 24 / 24

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata. Code No: R09220504 R09 Set No. 2 II B.Tech II Semester Examinations,December-January, 2011-2012 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 75 Answer

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 14 Ana Bove May 14th 2018 Recap: Context-free Grammars Simplification of grammars: Elimination of ǫ-productions; Elimination of

More information

Controlled Term Rewriting

Controlled Term Rewriting Controlled Term Rewriting Florent Jacquemard 1, Yoshiharu Kojima 2,3, and Masahiko Sakai 2 1 INRIA & LSV, ENS Cachan, 61 av. Pdt Wilson 94230 Cachan, France florent.jacquemard@inria.fr 2 Graduate School

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3},

(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3}, Code No: 07A50501 R07 Set No. 2 III B.Tech I Semester Examinations,MAY 2011 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All

More information

Foundations of Informatics: a Bridging Course

Foundations of Informatics: a Bridging Course Foundations of Informatics: a Bridging Course Week 3: Formal Languages and Semantics Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen University noll@cs.rwth-aachen.de http://www.b-it-center.de/wob/en/view/class211_id948.html

More information

Chapter 6. Properties of Regular Languages

Chapter 6. Properties of Regular Languages Chapter 6 Properties of Regular Languages Regular Sets and Languages Claim(1). The family of languages accepted by FSAs consists of precisely the regular sets over a given alphabet. Every regular set is

More information

Chapter 3. Regular grammars

Chapter 3. Regular grammars Chapter 3 Regular grammars 59 3.1 Introduction Other view of the concept of language: not the formalization of the notion of effective procedure, but set of words satisfying a given set of rules Origin

More information

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, 1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, v, x, y, z as per the pumping theorem. 3. Prove that

More information

Finite Automata and Formal Languages TMV026/DIT321 LP Useful, Useless, Generating and Reachable Symbols

Finite Automata and Formal Languages TMV026/DIT321 LP Useful, Useless, Generating and Reachable Symbols Finite Automata and Formal Languages TMV026/DIT321 LP4 2012 Lecture 13 Ana Bove May 7th 2012 Overview of today s lecture: Normal Forms for Context-Free Languages Pumping Lemma for Context-Free Languages

More information

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen Pushdown automata Twan van Laarhoven Institute for Computing and Information Sciences Intelligent Systems Version: fall 2014 T. van Laarhoven Version: fall 2014 Formal Languages, Grammars and Automata

More information

Pushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen

Pushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen Pushdown Automata Notes on Automata and Theory of Computation Chia-Ping Chen Department of Computer Science and Engineering National Sun Yat-Sen University Kaohsiung, Taiwan ROC Pushdown Automata p. 1

More information

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor 60-354, Theory of Computation Fall 2013 Asish Mukhopadhyay School of Computer Science University of Windsor Pushdown Automata (PDA) PDA = ε-nfa + stack Acceptance ε-nfa enters a final state or Stack is

More information

5 Context-Free Languages

5 Context-Free Languages CA320: COMPUTABILITY AND COMPLEXITY 1 5 Context-Free Languages 5.1 Context-Free Grammars Context-Free Grammars Context-free languages are specified with a context-free grammar (CFG). Formally, a CFG G

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 14 SMALL REVIEW FOR FINAL SOME Y/N QUESTIONS Q1 Given Σ =, there is L over Σ Yes: = {e} and L = {e} Σ Q2 There are uncountably

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automata and Formal Language Theory Course Notes Part II: The Recognition Problem (II) Chapter II.4.: Properties of Regular Languages (13) Anton Setzer (Based on a book draft by J. V. Tucker and

More information

DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17. Beregnelighed. Jacob Aae Mikkelsen DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................

More information

Section 1 (closed-book) Total points 30

Section 1 (closed-book) Total points 30 CS 454 Theory of Computation Fall 2011 Section 1 (closed-book) Total points 30 1. Which of the following are true? (a) a PDA can always be converted to an equivalent PDA that at each step pops or pushes

More information

Computational Models - Lecture 5 1

Computational Models - Lecture 5 1 Computational Models - Lecture 5 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 10/22, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

A Polynomial Algorithm for Uniqueness of Normal Forms of Linear Shallow Term Rewrite Systems 1. Julian Zinn 2 and Rakesh Verma

A Polynomial Algorithm for Uniqueness of Normal Forms of Linear Shallow Term Rewrite Systems 1. Julian Zinn 2 and Rakesh Verma A Polynomial Algorithm for Uniqueness of Normal Forms of Linear Shallow Term Rewrite Systems 1 Julian Zinn 2 and Rakesh Verma Computer Science Department University of Houston Houston, TX, 77204, USA http://www.cs.uh.edu

More information

Decidable Call by Need Computations in Term Rewriting (Extended Abstract)

Decidable Call by Need Computations in Term Rewriting (Extended Abstract) Decidable Call by Need Computations in Term Rewriting (Extended Abstract) Irène Durand 1 and Aart Middeldorp 2 1 LaBRI 2 Institute of Information Sciences and Electronics Université de Bordeaux I University

More information

Tree Automata and Rewriting

Tree Automata and Rewriting and Rewriting Ralf Treinen Université Paris Diderot UFR Informatique Laboratoire Preuves, Programmes et Systèmes treinen@pps.jussieu.fr July 23, 2010 What are? Definition Tree Automaton A tree automaton

More information

Computation Histories

Computation Histories 208 Computation Histories The computation history for a Turing machine on an input is simply the sequence of configurations that the machine goes through as it processes the input. An accepting computation

More information

UNIT-VI PUSHDOWN AUTOMATA

UNIT-VI PUSHDOWN AUTOMATA Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic

More information

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed HKN CS/ECE 374 Midterm 1 Review Nathan Bleier and Mahir Morshed For the most part, all about strings! String induction (to some extent) Regular languages Regular expressions (regexps) Deterministic finite

More information

Properties of Context-Free Languages

Properties of Context-Free Languages Properties of Context-Free Languages Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr

More information

Non-context-Free Languages. CS215, Lecture 5 c

Non-context-Free Languages. CS215, Lecture 5 c Non-context-Free Languages CS215, Lecture 5 c 2007 1 The Pumping Lemma Theorem. (Pumping Lemma) Let be context-free. There exists a positive integer divided into five pieces, Proof for for each, and..

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harry Lewis October 8, 2013 Reading: Sipser, pp. 119-128. Pushdown Automata (review) Pushdown Automata = Finite automaton

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Push-Down Automata CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability

More information

The Post Correspondence Problem

The Post Correspondence Problem The Post Correspondence Problem - Given a set, P of pairs of strings: where t i, b i Σ P = {[ t 1 b 1 ], t 2 b 2 ],, t k b k ]} - Question: Does there exist a sequence i 1, i 2, i n such that: t i1 t i2

More information

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement

More information

Author: Vivek Kulkarni ( )

Author: Vivek Kulkarni ( ) Author: Vivek Kulkarni ( vivek_kulkarni@yahoo.com ) Chapter-2: Finite State Machines Solutions for Review Questions @ Oxford University Press 2013. All rights reserved. 1 Q.1 Construct Mealy and Moore

More information

This lecture covers Chapter 7 of HMU: Properties of CFLs

This lecture covers Chapter 7 of HMU: Properties of CFLs This lecture covers Chapter 7 of HMU: Properties of CFLs Chomsky Normal Form Pumping Lemma for CFs Closure Properties of CFLs Decision Properties of CFLs Additional Reading: Chapter 7 of HMU. Chomsky Normal

More information

PUSHDOWN AUTOMATA (PDA)

PUSHDOWN AUTOMATA (PDA) PUSHDOWN AUTOMATA (PDA) FINITE STATE CONTROL INPUT STACK (Last in, first out) input pop push ε,ε $ 0,ε 0 1,0 ε ε,$ ε 1,0 ε PDA that recognizes L = { 0 n 1 n n 0 } Definition: A (non-deterministic) PDA

More information

Rational graphs trace context-sensitive languages

Rational graphs trace context-sensitive languages Rational graphs trace context-sensitive languages Christophe Morvan 1 and Colin Stirling 2 1 IRISA, Campus de eaulieu, 35042 Rennes, France christophe.morvan@irisa.fr 2 Division of Informatics, University

More information

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu Part 4 out of 5 ETH Zürich (D-ITET) October, 12 2017 Last week, we showed the equivalence of DFA, NFA and REX

More information

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages Context Free Languages Automata Theory and Formal Grammars: Lecture 6 Context Free Languages Last Time Decision procedures for FAs Minimum-state DFAs Today The Myhill-Nerode Theorem The Pumping Lemma Context-free

More information

Chapter 6: NFA Applications

Chapter 6: NFA Applications Chapter 6: NFA Applications Implementing NFAs The problem with implementing NFAs is that, being nondeterministic, they define a more complex computational procedure for testing language membership. To

More information

ACS2: Decidability Decidability

ACS2: Decidability Decidability Decidability Bernhard Nebel and Christian Becker-Asano 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem

More information

Outline. CS21 Decidability and Tractability. Machine view of FA. Machine view of FA. Machine view of FA. Machine view of FA.

Outline. CS21 Decidability and Tractability. Machine view of FA. Machine view of FA. Machine view of FA. Machine view of FA. Outline CS21 Decidability and Tractability Lecture 5 January 16, 219 and Languages equivalence of NPDAs and CFGs non context-free languages January 16, 219 CS21 Lecture 5 1 January 16, 219 CS21 Lecture

More information

Context-Free Grammars and Languages. Reading: Chapter 5

Context-Free Grammars and Languages. Reading: Chapter 5 Context-Free Grammars and Languages Reading: Chapter 5 1 Context-Free Languages The class of context-free languages generalizes the class of regular languages, i.e., every regular language is a context-free

More information

CS243, Logic and Computation Nondeterministic finite automata

CS243, Logic and Computation Nondeterministic finite automata CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I Internal Examination 2017-18 B.Tech III Year VI Semester Sub: Theory of Computation (6CS3A) Time: 1 Hour 30 min. Max Marks: 40 Note: Attempt all three

More information

Context-Free Grammars. 2IT70 Finite Automata and Process Theory

Context-Free Grammars. 2IT70 Finite Automata and Process Theory Context-Free Grammars 2IT70 Finite Automata and Process Theory Technische Universiteit Eindhoven May 18, 2016 Generating strings language L 1 = {a n b n n > 0} ab L 1 if w L 1 then awb L 1 production rules

More information

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam ECS 120: Theory of Computation Handout MT UC Davis Phillip Rogaway February 16, 2012 Midterm Exam Instructions: The exam has six pages, including this cover page, printed out two-sided (no more wasted

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

CS 121, Section 2. Week of September 16, 2013

CS 121, Section 2. Week of September 16, 2013 CS 121, Section 2 Week of September 16, 2013 1 Concept Review 1.1 Overview In the past weeks, we have examined the finite automaton, a simple computational model with limited memory. We proved that DFAs,

More information

Plan for 2 nd half. Just when you thought it was safe. Just when you thought it was safe. Theory Hall of Fame. Chomsky Normal Form

Plan for 2 nd half. Just when you thought it was safe. Just when you thought it was safe. Theory Hall of Fame. Chomsky Normal Form Plan for 2 nd half Pumping Lemma for CFLs The Return of the Pumping Lemma Just when you thought it was safe Return of the Pumping Lemma Recall: With Regular Languages The Pumping Lemma showed that if a

More information

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013 Q.2 a. Prove by mathematical induction n 4 4n 2 is divisible by 3 for n 0. Basic step: For n = 0, n 3 n = 0 which is divisible by 3. Induction hypothesis: Let p(n) = n 3 n is divisible by 3. Induction

More information

Automata-based Verification - III

Automata-based Verification - III COMP30172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20: email: howard.barringer@manchester.ac.uk March 2009 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition

More information

COM364 Automata Theory Lecture Note 2 - Nondeterminism

COM364 Automata Theory Lecture Note 2 - Nondeterminism COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly

More information

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

More information

Finite Automata Theory and Formal Languages TMV026/TMV027/DIT321 Responsible: Ana Bove

Finite Automata Theory and Formal Languages TMV026/TMV027/DIT321 Responsible: Ana Bove Finite Automata Theory and Formal Languages TMV026/TMV027/DIT321 Responsible: Ana Bove Tuesday 28 of May 2013 Total: 60 points TMV027/DIT321 registration VT13 TMV026/DIT321 registration before VT13 Exam

More information

Automata-based Verification - III

Automata-based Verification - III CS3172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20/22: email: howard.barringer@manchester.ac.uk March 2005 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Suppose h maps number and variables to ɛ, and opening parenthesis to 0 and closing parenthesis

Suppose h maps number and variables to ɛ, and opening parenthesis to 0 and closing parenthesis 1 Introduction Parenthesis Matching Problem Describe the set of arithmetic expressions with correctly matched parenthesis. Arithmetic expressions with correctly matched parenthesis cannot be described

More information

Theory of Computation (IV) Yijia Chen Fudan University

Theory of Computation (IV) Yijia Chen Fudan University Theory of Computation (IV) Yijia Chen Fudan University Review language regular context-free machine DFA/ NFA PDA syntax regular expression context-free grammar Pushdown automata Definition A pushdown automaton

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

CA320 - Computability & Complexity

CA320 - Computability & Complexity CA320 - Computability & Complexity David Sinclair Context-Sensitive Grammars An unrestricted grammar is a 4-tuple G = (V,Σ,S,P), where V and Σ are disjoint sets of variables and terminals respectively.

More information

Extended Tree Automata Models for the Verification of Infinite State Systems

Extended Tree Automata Models for the Verification of Infinite State Systems Extended Tree Automata Models for the Verification of Infinite State Systems Florent Jacquemard To cite this version: Florent Jacquemard. Extended Tree Automata Models for the Verification of Infinite

More information

Context Sensitive Grammar

Context Sensitive Grammar Context Sensitive Grammar Aparna S Vijayan Department of Computer Science and Automation December 2, 2011 Aparna S Vijayan (CSA) CSG December 2, 2011 1 / 12 Contents Aparna S Vijayan (CSA) CSG December

More information

Further discussion of Turing machines

Further discussion of Turing machines Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

More information

NPDA, CFG equivalence

NPDA, CFG equivalence NPDA, CFG equivalence Theorem A language L is recognized by a NPDA iff L is described by a CFG. Must prove two directions: ( ) L is recognized by a NPDA implies L is described by a CFG. ( ) L is described

More information

Hubert Comon-Lundh Florent Jacquemard Nicolas Perrin. Tree Automata with Memory, Visibility and Structural Constraints. Research Report LSV-07-01

Hubert Comon-Lundh Florent Jacquemard Nicolas Perrin. Tree Automata with Memory, Visibility and Structural Constraints. Research Report LSV-07-01 Hubert Comon-Lundh Florent Jacquemard Nicolas Perrin Tree Automata with Memory, Visibility and Structural Constraints Research Report LSV-07-01 January 2007 Tree Automata with Memory, Visibility and Structural

More information

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK COMS11700 Undecidability Department of Computer Science, University of Bristol Bristol, UK 4 April 2014 COMS11700: Undecidability Slide 1/29 Decidability We are particularly interested in Turing machines

More information

Non-emptiness Testing for TMs

Non-emptiness Testing for TMs 180 5. Reducibility The proof of unsolvability of the halting problem is an example of a reduction: a way of converting problem A to problem B in such a way that a solution to problem B can be used to

More information

4.2 The Halting Problem

4.2 The Halting Problem 172 4.2 The Halting Problem The technique of diagonalization was discovered in 1873 by Georg Cantor who was concerned with the problem of measuring the sizes of infinite sets For finite sets we can simply

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation CISC 4090 Theory of Computation Context-Free Languages and Push Down Automata Professor Daniel Leeds dleeds@fordham.edu JMH 332 Languages: Regular and Beyond Regular: Captured by Regular Operations a b

More information

CISC4090: Theory of Computation

CISC4090: Theory of Computation CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

More information

Learning Context Free Grammars with the Syntactic Concept Lattice

Learning Context Free Grammars with the Syntactic Concept Lattice Learning Context Free Grammars with the Syntactic Concept Lattice Alexander Clark Department of Computer Science Royal Holloway, University of London alexc@cs.rhul.ac.uk ICGI, September 2010 Outline Introduction

More information

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc.

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc. The Pumping Lemma For every regular language L, there is a number l 1 satisfying the pumping lemma property: All w L with w l can be expressed as a concatenation of three strings, w = u 1 vu 2, where u

More information

6.8 The Post Correspondence Problem

6.8 The Post Correspondence Problem 6.8. THE POST CORRESPONDENCE PROBLEM 423 6.8 The Post Correspondence Problem The Post correspondence problem (due to Emil Post) is another undecidable problem that turns out to be a very helpful tool for

More information

CS 373: Theory of Computation. Fall 2010

CS 373: Theory of Computation. Fall 2010 CS 373: Theory of Computation Gul Agha Mahesh Viswanathan Fall 2010 1 1 Normal Forms for CFG Normal Forms for Grammars It is typically easier to work with a context free language if given a CFG in a normal

More information

October 6, Equivalence of Pushdown Automata with Context-Free Gramm

October 6, Equivalence of Pushdown Automata with Context-Free Gramm Equivalence of Pushdown Automata with Context-Free Grammar October 6, 2013 Motivation Motivation CFG and PDA are equivalent in power: a CFG generates a context-free language and a PDA recognizes a context-free

More information

On Model Checking for Visibly Pushdown Automata

On Model Checking for Visibly Pushdown Automata Japan Institute of Advanced Industrial Science and Technology Research Center for Specification and Verification LATA 2012 On Model Checking for Visibly Pushdown Automata Nguyen Van Tang and Hitoshi Ohsaki

More information

Problem Session 5 (CFGs) Talk about the building blocks of CFGs: S 0S 1S ε - everything. S 0S0 1S1 A - waw R. S 0S0 0S1 1S0 1S1 A - xay, where x = y.

Problem Session 5 (CFGs) Talk about the building blocks of CFGs: S 0S 1S ε - everything. S 0S0 1S1 A - waw R. S 0S0 0S1 1S0 1S1 A - xay, where x = y. CSE2001, Fall 2006 1 Problem Session 5 (CFGs) Talk about the building blocks of CFGs: S 0S 1S ε - everything. S 0S0 1S1 A - waw R. S 0S0 0S1 1S0 1S1 A - xay, where x = y. S 00S1 A - xay, where x = 2 y.

More information

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission. CSE 5 Homework Due: Monday October 9, 7 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in this

More information

CS375 Midterm Exam Solution Set (Fall 2017)

CS375 Midterm Exam Solution Set (Fall 2017) CS375 Midterm Exam Solution Set (Fall 2017) Closed book & closed notes October 17, 2017 Name sample 1. (10 points) (a) Put in the following blank the number of strings of length 5 over A={a, b, c} that

More information

Properties of context-free Languages

Properties of context-free Languages Properties of context-free Languages We simplify CFL s. Greibach Normal Form Chomsky Normal Form We prove pumping lemma for CFL s. We study closure properties and decision properties. Some of them remain,

More information

CS 133 : Automata Theory and Computability

CS 133 : Automata Theory and Computability CS 133 : Automata Theory and Computability Lecture Slides 1 Regular Languages and Finite Automata Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University

More information

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA) Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

More information

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages and and Department of Computer Science and Information Systems Birkbeck, University of London ptw@dcs.bbk.ac.uk Outline and Doing and analysing problems/languages computability/solvability/decidability

More information

Innermost Reductions Find All Normal Forms on Right-Linear Terminating Overlay TRSs

Innermost Reductions Find All Normal Forms on Right-Linear Terminating Overlay TRSs Innermost Reductions Find All Normal Forms on Right-Linear Terminating Overlay TRSs Masahiko Sakai,Kouji Okamoto,Toshiki Sakabe Graduate School of Information Science, Nagoya University, Furo-cho, Chikusa-ku,

More information

Context Free Language Properties

Context Free Language Properties Context Free Language Properties Knowing that the context free languages are exactly those sets accepted by nondeterministic pushdown automata provides us a bit of information about them. We know that

More information

Lecture 17: Language Recognition

Lecture 17: Language Recognition Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to

More information

Parsing. Context-Free Grammars (CFG) Laura Kallmeyer. Winter 2017/18. Heinrich-Heine-Universität Düsseldorf 1 / 26

Parsing. Context-Free Grammars (CFG) Laura Kallmeyer. Winter 2017/18. Heinrich-Heine-Universität Düsseldorf 1 / 26 Parsing Context-Free Grammars (CFG) Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Winter 2017/18 1 / 26 Table of contents 1 Context-Free Grammars 2 Simplifying CFGs Removing useless symbols Eliminating

More information

Decidability (intro.)

Decidability (intro.) CHAPTER 4 Decidability Contents Decidable Languages decidable problems concerning regular languages decidable problems concerning context-free languages The Halting Problem The diagonalization method The

More information

Computability Theory

Computability Theory CS:4330 Theory of Computation Spring 2018 Computability Theory Decidable Languages Haniel Barbosa Readings for this lecture Chapter 4 of [Sipser 1996], 3rd edition. Section 4.1. Decidable Languages We

More information

Formal Languages, Automata and Models of Computation

Formal Languages, Automata and Models of Computation CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2011 1 Content - More Properties of Regular Languages (RL)

More information

Pushdown Automata: Introduction (2)

Pushdown Automata: Introduction (2) Pushdown Automata: Introduction Pushdown automaton (PDA) M = (K, Σ, Γ,, s, A) where K is a set of states Σ is an input alphabet Γ is a set of stack symbols s K is the start state A K is a set of accepting

More information

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA) Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting

More information

Ogden s Lemma for CFLs

Ogden s Lemma for CFLs Ogden s Lemma for CFLs Theorem If L is a context-free language, then there exists an integer l such that for any u L with at least l positions marked, u can be written as u = vwxyz such that 1 x and at

More information

Homework 4. Chapter 7. CS A Term 2009: Foundations of Computer Science. By Li Feng, Shweta Srivastava, and Carolina Ruiz

Homework 4. Chapter 7. CS A Term 2009: Foundations of Computer Science. By Li Feng, Shweta Srivastava, and Carolina Ruiz CS3133 - A Term 2009: Foundations of Computer Science Prof. Carolina Ruiz Homework 4 WPI By Li Feng, Shweta Srivastava, and Carolina Ruiz Chapter 7 Problem: Chap 7.1 part a This PDA accepts the language

More information

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata : Organization of Programming Languages Theory of Regular Expressions Finite Automata Previous Course Review {s s defined} means the set of string s such that s is chosen or defined as given s A means

More information

The efficiency of identifying timed automata and the power of clocks

The efficiency of identifying timed automata and the power of clocks The efficiency of identifying timed automata and the power of clocks Sicco Verwer a,b,1,, Mathijs de Weerdt b, Cees Witteveen b a Eindhoven University of Technology, Department of Mathematics and Computer

More information

Theory of Computation (IX) Yijia Chen Fudan University

Theory of Computation (IX) Yijia Chen Fudan University Theory of Computation (IX) Yijia Chen Fudan University Review The Definition of Algorithm Polynomials and their roots A polynomial is a sum of terms, where each term is a product of certain variables and

More information