Undecidability of the Post Correspondence Problem in Coq

Size: px
Start display at page:

Download "Undecidability of the Post Correspondence Problem in Coq"

Transcription

1 Undecidaility of the Post Correspondence Prolem in Coq Bachelor Talk Edith Heiter Advisors: Prof. Dr. Gert Smolka, Yannick Forster August 23, 2017

2 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion What to Expect? Formalized decision prolems: Post correspondence prolem (PCP) modified Post correspondence prolem (MPCP) word prolem in string-rewriting systems halting prolem for Turing machines Formal definition and verification of reductions from the literature proving PCP undecidale: Hopcroft et al. (2006) Davis et al. (1994) Wim H. Hesselink (2015) constructive Coq development 1

3 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion The Post Correspondence Prolem print sprint dog doge dog doge eats at dogeatsprint dogeatsprint eats at print sprint Assume a fixed alphaet Σ. strings Σ := L Σ instance P of type pcp := L (Σ Σ ) S is a match if concat (map π 1 S) = concat (map π 2 S), areviated as C 1 S = C 2 S S is a match for P if S [ ], S P, and S is a match Definition (Post correspondence prolem) PCP P := S. S is a match for P 2

4 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion The Modified Post Correspondence Prolem print sprint print sprint dog doge dog doge dog doge eats at eats at eats at print sprint Assume a fixed alphaet Σ. strings Σ := L Σ instance (d, P) of type mpcp := (Σ Σ ) pcp S is a match if C 1 S = C 2 S S is a match for P if S [ ], S P, and S is a match Definition (Modified Post correspondence prolem) MPCP (d, P) := S. (d :: S) is a match for (d :: P) 3

5 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Undecidaility in Coq Definition (Undecidaility) A class P : X P is undecidale if the halting prolem (Halt) reduces to P. Definition (Reduction) Let P : X P and Q : Y P e two classes. A reduction of P to Q is a function f : X Y such that x. P x Q (f x). Halt MPCP Hopcroft et al. (2006) Davis et al. (1994) SR Hesselink (2015) PCP 4

6 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion String-Rewriting Systems Σ := {a, } R := {a/a, aa/a} aa R aa aa R a finite alphaet of symols finite set of rewrite rules u/v R x R y y R z xuy R xvy z R z x R z Definition: Word prolem in string-rewriting systems SR (R, x, y) := x R y 5

7 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Reducing String Rewriting to MPCP Word prolem aa R a with R = {a/a, aa/a} aa aa aa a $ $aa a a a a a a a a aa a a $ $ $ $aa $aa aa $aa $aa aa $aa aa aa $aa aa aa a $ $aa aa aa a $ $aa aa aa $aa aa aa a copy dominoes transfer unchanged symols to the next string rewrite dominoes simulate a single rewrite consecutive strings are separated y { } { } { $ f (R, x, y) :=, y $, a $x $ a a : Σ u v } u/v R 6

8 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Correctness Proof x R y MPCP (f (R, x, y)) Let x, y and z e strings over Σ and R a set of rewrite rules. Lemma If x R y, then there is a match for the MPCP instance f (R, x, y). Lemma Let A f (R, x, y). If C 1 A = z (C 2 A), then z R y. Proof. Size induction on A with a generalized claim for all z. A more general lemma yields either z R y or z R m and C 1 A = m (C 2 A ) for a smaller list A. The inductive hypothesis yields m R y. Theorem (SR reduces to MPCP) SR (R, x, y) MPCP (f (R, x, y)) 7

9 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Intermediate Result Halt MPCP SR PCP Hopcroft et al. (2006) Davis et al. (1994) RSR 8

10 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Turing Machines 1 and the Halting Prolem aa Ba A Ba tape := leftof a A midtape B a A rightof a B (a : Σ) (A B : Σ ) Turing machine M := (Q, δ, q 0, H) over finite alphaet Σ transition function δ : Q Σ Q Σ {L, N, R} halting function H : Q B configurations conf : Q tape and step function ˆδ : conf conf ˆδ (q, aa) = (q, caa) if δ (q, ) = (q, c, R) ˆδ (q, aa) = (q, aa) if δ (q, ) = (q,, L) 1 Andrea Asperti and Wilmer Ricciotti (2015) 9

11 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Turing Machines 2 and the Halting Prolem final configurations H c := H (π 1 c) = true reachaility predicate: ˆδ c c H c c c c c Definition: Reachaility Reach (M, c 1, c 2 ) := c 1 c 2 Definition: Halting prolem Halt (M, t):= c f. (q 0, t) c f H cf 2 Andrea Asperti and Wilmer Ricciotti (2015) 10

12 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Reducing Reachaility to String Rewriting f (M, c 1, c 2 ) := (R, x, y)f (M, c 1, c 2 ) := (R, c 1, c 2 )f (M, c 1, c 2 ) := (, c 1, c 2 ) a q 0 a a q1 a aa q1 aa q0 aa qf q 0 aa aq 1 a aq 1 a aaq 0 aq f a string encoding : conf Γ with Γ := q : Q a : Σ c (q, ) (q, aa) (q, BaA) (q, Ba ) c q q aa BqaA Baq each rewrite rule realizes one ˆδ-step q 0 a/aq 1 represents δ (q 0, a ) = (q 1,, R) aq 0 /q f a and q 0 /q f represent δ (q 0, ) = (q f,, L) contains rules that simulate the result of δ (q, a ) and δ (q, ) for all non final states q : Q and symols a : Σ 11

13 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Translating the Transition Function into Rewrite Rules δ (q 1, ) = (q 2, write, move) u v u v write move q 1 q 2 c q 1 q 2 c L q 1 q 2 q 1 q 2 N q 1 q 2 q 1 q 2 R q 1 c q 1 c R q 1 q 2 c q 1 q 2 c L q 1 q 2 q 1 q 2 N q 1 q 2 q 1 q 2 R δ (q 1, a ) = (q 2, write, move) u v u v write move q 1 a q 2 a c q 1 a q 2 c a L q 1 a q 2 a N q 1 a a q 2 R q 1 a q 2 c q 1 a q 2 c L q 1 a q 2 N q 1 a q 2 R 12

14 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Correctness Proof Lemmas If c is not a final configuration, then c ˆδ c. If c z, then z = ˆδ c and c is not a final configuration. Proof. Both lemmas require large case analyses on the tape of configuration c and the result of transitions. Theorem (Reach reduces to SR) c 1 c 2 c 1 c 2 13

15 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Reducing the Halting Prolem to String Rewriting f (M, t) := (R, (q 0, t), y)f (M, t) := (R, (q 0, t), ε)f (M, t) := ( D, (q 0, t), ε) (q 0, t) c f if and only if (q 0, t) c f provide rules enaling c f ε for all final configurations c f : D := { (q f s/q f ), (sq f /q f ), (q f /ε) q f Q H, s Σ {, } } q 0 aa aq f a D aq f D aq f D aq f D q f q f D ε Theorem (Halt reduces to SR) ( c f. (q 0, t) c f H cf ) (q 0, t) D ε 14

16 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Undecidaility Result Halt MPCP SR PCP Reach RSR Hopcroft et al. (2006) Davis et al. (1994) Realization of one Turing machine transition reduction via SR: q 0 a/aq 1 direct reduction to MPCP: q 0 a aq 1 a a 15

17 PCP and Undecidaility SR to MPCP Turing Machines Reach to SR Halt to SR Conclusion Future Work Formalize undecidaility proofs ased on reductions of PCP: prolems related to context-free grammars: inclusion and non-emptiness of intersection (Hopcroft et al. 2006, Hesselink 2015) satisfiaility prolem for variants of specification formalisms (Finkeiner and Hahn 2016, Song and Wu 2014) validity of first-oder formulas (Schöning 2009) secrecy prolem for security protocols (Tiplea et al. 2005) Show PCP λ and Turing undecidale: implement the reductions in the weak call-y-value λ-calculus L (Forster and Smolka 2017) formalize the computational equivalence of L and Turing machines (Dal Lago and Martini 2008) 16

18 References Andrea Asperti and Wilmer Ricciotti. A formalization of multi-tape Turing machines. Theoretical Computer Science, 603:23 42, Martin D. Davis, Ron Sigal, and Elaine J. Weyuker. Computaility, Complexity, and Languages: Fundamentals of Theoretical Computer Science. Academic Press, Wim H. Hesselink. Post s correspondence prolem and the undecidaility of context-free intersection. Manuscript, July John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, Emil L Post. A variant of a recursively unsolvale prolem. Bulletin of the American Mathematical Society, 52(4): , Axel Thue. Proleme üer Veränderungen von Zeichenreihen nach gegeenen Regeln. J. Dywad, 1914.

19 Coq Development Spec Proof Σ Definitions MPCP to PCP SR to MPCP Halt to SR Halt to MPCP SR to RSR RSR to PCP PCP undecidaility Halt, SR, MPCP, PCP : 955 Halt, SR, RSR, PCP : 1112 Halt, MPCP, PCP : 1043

20 Proof (SR to MPCP) Lemma If z R y, then there is some A f (R, x, y) such that C 1 A = z (C 2 A). Proof. Induction on. Lemma If x R y, then there is a match for the MPCP instance f (R, x, y). Proof. The list $ $x :: A is a match for the MPCP instance.

21 Proof (SR to MPCP) Lemma Let A f (R, x, y). If C 1 A = z m (C 2 A), then either z R y and m = [ ] or A = B + :: A, C 1 B = z, C 2 B = m, and z R m for some A, B, m. Proof. Induction on A for all strings z and m. Let A = d :: A. z = [ ]: z = az : y $ $, u v with u = [ ], and y $ $, u v, and a a are candidates for d are candidates for d

22 Proof (Reach to SR) Lemma If c z, then z = ˆδ c and c is not a final configuration. Proof. Let c = (q, t). We have (q, t) = xuy and z = xvy with u/v. Case analysis on tape t. Assume t =. (q, ) = q = xuy. If u/v = q 1 / aq 2 simulating δ (q 1, ) = (q 2, a, R), then q = xq 1 y yields q = q 1 and ˆδ c = aq2 = x aq 2 y = z. Remark: It is important that. Assume a configuration (q 1, ) = q 1 and δ (q 1, ) = (q 2, a, R). The only applicale rewrite rule is (q 1 / aq 2 ) and ˆδ(q1, ) = (q 2, a ) = aq 2. If the only one tape delimiter is, the rule (q 1 / aq 2 ) for the right end of the tape is also suitale. But aq 2 (q 2, a ) = aq 2.

23 Proof (Halt to SR) Lemmas 1. If c f is a final configuration, then c f D ε. 2. If c D z for some z, then c is a final configuration. 3. If c D ε, then c c f for some final configuration c f. Proof (3). Induction on the derivation with a generalized claim for all c. c = ε is contradictory. c D z: If the rewrite rule is from, we use the inductive hypothesis and z D ε, otherwise the lemma aove.

24 Reducing Restricted String Rewriting to PCP { $ f (R, x, y):=, y $,, $x $ Example: } { a, ã ã a { } a : Σ u, ũ ṽ v } u/v R R := {aa/a, a/a}, x := aa and y := a. Since aa R a holds, we should e ale to construct a match for the PCP instance { } $, a $,,, a, ã, $aa $ ã a,, aa, a a a aa a, a a, $ $aa aa ã ã a a $ $ $aa ã a $ $aa ã a $

25 Reducing the Halting Prolem to MPCP tape leftof midtape rightof c (q, ) (q, aa) (q, BaA) (q, Ba ) c q q aa BqaA Baq Encoding of configurations using a lank symol. $ $ q s aa q s a q 0 a a a... q 0 q f q f q f... q f q f q f $ $ initial domino transition dominoes for all non final states copy dominoes for all symols and, deletion dominoes for all final states final dominoes for all final states

26 Reducing MPCP to PCP f { 1, 10111, } { = $#1#0#1#1#1 $#1#0#, #1, #1#0#1#1#1 1#1#1# 1#0#, #1#0 0#, } #$ $ Both instances are solvale: $#1#0#1#1#1 $#1#0# #1 1#1#1# #1 1#1#1# #1#0 0# #$ $ interleave the domino components with # symols starting to the left of the first symol in the top string and to the right in the ottom string delete empty dominoes since the interleaving has no effect provide an additional copy of the first MPCP domino starting at the top and the ottom with $# provide an extra domino adding the missing # at the top row

THE STRONG INVARIANCE THESIS

THE STRONG INVARIANCE THESIS THE STRONG INVARIANCE THESIS FOR A λ-calculus LOLA WORKSHOP 2017 Yannick Forster 1 Fabian Kunze 1,2 Marc Roth 1,3 1 SAARLAND UNIVERSITY 2 MAX PLANCK INSTITUTE FOR INFORMATICS 3 CLUSTER OF EXCELLENCE (MMCI)

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

Post s Correspondence Problem (PCP) Is Undecidable. Presented By Bharath Bhushan Reddy Goulla

Post s Correspondence Problem (PCP) Is Undecidable. Presented By Bharath Bhushan Reddy Goulla Post s Correspondence Problem (PCP) Is Undecidable Presented By Bharath Bhushan Reddy Goulla Contents : Introduction What Is PCP? Instances Of PCP? Introduction Of Modified PCP (MPCP) Why MPCP? Reducing

More information

Lecture 12: Mapping Reductions

Lecture 12: Mapping Reductions Lecture 12: Mapping Reductions October 18, 2016 CS 1010 Theory of Computation Topics Covered 1. The Language EQ T M 2. Mapping Reducibility 3. The Post Correspondence Problem 1 The Language EQ T M The

More information

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability

The Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability The Turing Machine Computability Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical provides a

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

Outline 1 PCP. 2 Decision problems about CFGs. M.Mitra (ISI) Post s Correspondence Problem 1 / 10

Outline 1 PCP. 2 Decision problems about CFGs. M.Mitra (ISI) Post s Correspondence Problem 1 / 10 Outline 1 PCP 2 Decision problems about CFGs M.Mitra (ISI) Post s Correspondence Problem 1 / 10 PCP reduction Given: M, w in encoded form To construct: an instance (A, B) of MPCP such that M accepts w

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

ECS 120 Lesson 20 The Post Correspondence Problem

ECS 120 Lesson 20 The Post Correspondence Problem ECS 120 Lesson 20 The Post Correspondence Problem Oliver Kreylos Wednesday, May 16th, 2001 Today we will continue yesterday s discussion of reduction techniques by looking at another common strategy, reduction

More information

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines Definition of Algorithm:

More information

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet: Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 8 Nancy Lynch Today More undecidable problems: About Turing machines: Emptiness, etc. About

More information

How to write proofs - II

How to write proofs - II How to write proofs - II Problem (Ullman and Hopcroft, Page 104, Exercise 4.8). Let G be the grammar Prove that S ab ba A a as baa B b bs abb L(G) = { x {a, b} x contains equal number of a s and b s }.

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

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad-500 014 Subject: FORMAL LANGUAGES AND AUTOMATA THEORY Class : CSE II PART A (SHORT ANSWER QUESTIONS) UNIT- I 1 Explain transition diagram, transition

More information

Section 14.1 Computability then else

Section 14.1 Computability then else Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible algorithms. Example (Turing machines). Associate

More information

CS154 Final Examination

CS154 Final Examination CS154 Final Examination June 7, 2010, 7-10PM Directions: CS154 students: answer all 13 questions on this paper. Those taking CS154N should answer only questions 8-13. The total number of points on this

More information

CS 7220 Computational Complexity and Algorithm Analysis

CS 7220 Computational Complexity and Algorithm Analysis CS 7220 Computational Complexity and Algorithm Analysis Spring 2016 Section 7: Computability Part IV Undecidability Pascal Hitzler Data Semantics Laboratory Wright State University, Dayton, OH http://www.pascal-hitzler.de

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 III: Limits of Computation Chapter III.1: Introduction Anton Setzer http://www.cs.swan.ac.uk/ csetzer/lectures/ automataformallanguage/current/index.html

More information

How to Pop a Deep PDA Matters

How to Pop a Deep PDA Matters How to Pop a Deep PDA Matters Peter Leupold Department of Mathematics, Faculty of Science Kyoto Sangyo University Kyoto 603-8555, Japan email:leupold@cc.kyoto-su.ac.jp Abstract Deep PDA are push-down automata

More information

Theory of Computation Turing Machine and Pushdown Automata

Theory of Computation Turing Machine and Pushdown Automata Theory of Computation Turing Machine and Pushdown Automata 1. What is a Turing Machine? A Turing Machine is an accepting device which accepts the languages (recursively enumerable set) generated by type

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

Turing Machines. Nicholas Geis. February 5, 2015

Turing Machines. Nicholas Geis. February 5, 2015 Turing Machines Nicholas Geis February 5, 2015 Disclaimer: This portion of the notes does not talk about Cellular Automata or Dynamical Systems, it talks about turing machines, however this will lay the

More information

There are two main techniques for showing that problems are undecidable: diagonalization and reduction

There are two main techniques for showing that problems are undecidable: diagonalization and reduction Reducibility 1 There are two main techniques for showing that problems are undecidable: diagonalization and reduction 2 We say that a problem A is reduced to a problem B if the decidability of A follows

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 III: Limits of Computation Chapt. III.1: Introduction Anton Setzer http://www.cs.swan.ac.uk/ csetzer/lectures/ automataformallanguage/current/index.html

More information

On Rice s theorem. Hans Hüttel. October 2001

On Rice s theorem. Hans Hüttel. October 2001 On Rice s theorem Hans Hüttel October 2001 We have seen that there exist languages that are Turing-acceptable but not Turing-decidable. An important example of such a language was the language of the Halting

More information

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012 Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM

More information

Theory of Computer Science. Theory of Computer Science. D8.1 Other Halting Problem Variants. D8.2 Rice s Theorem

Theory of Computer Science. Theory of Computer Science. D8.1 Other Halting Problem Variants. D8.2 Rice s Theorem Theory of Computer Science May 15, 2017 D8. Rice s Theorem and Other Undecidable Problems Theory of Computer Science D8. Rice s Theorem and Other Undecidable Problems Malte Helmert University of Basel

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic and Theory of Computing Fuhua (Frank) Cheng Department of Computer Science University of Kentucky 1 Tale of Contents: Week 1: Preliminaries (set alger relations, functions) (read Chapters

More information

CS5371 Theory of Computation. Lecture 15: Computability VI (Post s Problem, Reducibility)

CS5371 Theory of Computation. Lecture 15: Computability VI (Post s Problem, Reducibility) CS5371 Theory of Computation Lecture 15: Computability VI (Post s Problem, Reducibility) Objectives In this lecture, we introduce Post s correspondence problem (playing with a special type of domino) We

More information

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,

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

AC68 FINITE AUTOMATA & FORMULA LANGUAGES JUNE 2014

AC68 FINITE AUTOMATA & FORMULA LANGUAGES JUNE 2014 Q.2 a. Show by using Mathematical Induction that n i= 1 i 2 n = ( n + 1) ( 2 n + 1) 6 b. Define language. Let = {0; 1} denote an alphabet. Enumerate five elements of the following languages: (i) Even binary

More information

Finite Automata and Languages

Finite Automata and Languages CS62, IIT BOMBAY Finite Automata and Languages Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS62: New Trends in IT: Modeling and Verification of Cyber-Physical Systems (2

More information

The exact complexity of the infinite Post Correspondence Problem

The exact complexity of the infinite Post Correspondence Problem The exact complexity of the infinite Post Correspondence Problem Olivier Finkel To cite this version: Olivier Finkel. The exact complexity of the infinite Post Correspondence Problem. Information Processing

More information

CS154 Final Examination

CS154 Final Examination CS154 Final Examination June 7, 2010, 7-10PM Directions: CS154 students: answer all 13 questions on this paper. Those taking CS154N should answer only questions 8-13. The total number of points on this

More information

Theory of Computation

Theory of Computation Theory of Computation COMP363/COMP6363 Prerequisites: COMP4 and COMP 6 (Foundations of Computing) Textbook: Introduction to Automata Theory, Languages and Computation John E. Hopcroft, Rajeev Motwani,

More information

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata Automata and Formal Languages - CM81 Non-Deterministic Finite Automata Andrés Sicard-Ramírez Universidad EAFIT Semester 217-2 Non-Deterministic Finite Automata (NFA) Introduction q i a a q j a q k The

More information

Reducability. Sipser, pages

Reducability. Sipser, pages Reducability Sipser, pages 187-214 Reduction Reduction encodes (transforms) one problem as a second problem. A solution to the second, can be transformed into a solution to the first. We expect both transformations

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 43 Lecture 10: Overview Linear Bounded Automata Acceptance Problem for LBAs

More information

UNIT-VIII COMPUTABILITY THEORY

UNIT-VIII COMPUTABILITY THEORY CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the

More information

Undecidable Problems and Reducibility

Undecidable Problems and Reducibility University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

More information

Fundamentele Informatica II

Fundamentele Informatica II Fundamentele Informatica II Answer to selected exercises 5 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 5.1.a (q 0, ab, Z 0 ) (q 1, b,

More information

Advanced Undecidability Proofs

Advanced Undecidability Proofs 17 Advanced Undecidability Proofs In this chapter, we will discuss Rice s Theorem in Section 17.1, and the computational history method in Section 17.3. As discussed in Chapter 16, these are two additional

More information

Automata Theory (2A) Young Won Lim 5/31/18

Automata Theory (2A) Young Won Lim 5/31/18 Automata Theory (2A) Copyright (c) 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Automata Theory and Formal Grammars: Lecture 1

Automata Theory and Formal Grammars: Lecture 1 Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)

More information

Limits of Computability

Limits of Computability Limits of Computability Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang Schreiner

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

More information

Theory of Computation - Module 4

Theory of Computation - Module 4 Theory of Computation - Module 4 Syllabus Turing Machines Formal definition Language acceptability by TM TM as acceptors, Transducers - designing of TM- Two way infinite TM- Multi tape TM - Universal Turing

More information

An early completion algorithm: Thue s 1914 paper on the transformation of symbol sequences

An early completion algorithm: Thue s 1914 paper on the transformation of symbol sequences An early completion algorithm: Thue s 1914 paper on the transformation of symbol sequences James F. Power Department of Computer Science, National University of Ireland, Maynooth, Co. Kildare, Ireland.

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Rewriting Systems and Chomsky Grammars CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard

More information

The Post Correspondence Problem; Applications to Undecidability Results

The Post Correspondence Problem; Applications to Undecidability Results Chapter 8 The Post Correspondence Problem; Applications to Undecidability Results 8.1 The Post Correspondence Problem The Post correspondence problem (due to Emil Post) is another undecidable problem that

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

SFWR ENG 2FA3. Solution to the Assignment #4

SFWR ENG 2FA3. Solution to the Assignment #4 SFWR ENG 2FA3. Solution to the Assignment #4 Total = 131, 100%= 115 The solutions below are often very detailed on purpose. Such level of details is not required from students solutions. Some questions

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

Finite Automata and Regular Languages (part II)

Finite Automata and Regular Languages (part II) Finite Automata and Regular Languages (part II) Prof. Dan A. Simovici UMB 1 / 25 Outline 1 Nondeterministic Automata 2 / 25 Definition A nondeterministic finite automaton (ndfa) is a quintuple M = (A,

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.

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

Friendly Logics, Fall 2015, Lecture Notes 1

Friendly Logics, Fall 2015, Lecture Notes 1 Friendly Logics, Fall 2015, Lecture Notes 1 Val Tannen 1 Some references Course Web Page: http://www.cis.upenn.edu/~val/cis682. I have posted there the remarkable On the Unusual Effectiveness of Logic

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

Theory of Computation

Theory of Computation Theory of Computation Prof. Michael Mascagni Florida State University Department of Computer Science 1 / 33 This course aims to cover... the development of computability theory using an extremely simple

More information

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions

Turing Machine properties. Turing Machines. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions. Alternate TM definitions Turing Machine properties Turing Machines TM Variants and the Universal TM There are many ways to skin a cat And many ways to define a TM The book s Standard Turing Machines Tape unbounded on both sides

More information

Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017

Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 Solution to CS375 Homework Assignment 11 (40 points) Due date: 4/26/2017 1. Find a Greibach normal form for the following given grammar. (10 points) S bab A BAa a B bb Ʌ Solution: (1) Since S does not

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 13: Algorithmic Unsolvability The Halting Problem I In the last lecture we have shown

More information

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page. 6.045J/18.400J: Automata, Computability and Complexity March 30, 2005 Quiz 2 Prof. Nancy Lynch Please write your name in the upper corner of each page. Problem Score 1 2 3 4 5 6 Total Q2-1 Problem 1: True

More information

Plan for Today and Beginning Next week (Lexical Analysis)

Plan for Today and Beginning Next week (Lexical Analysis) Plan for Today and Beginning Next week (Lexical Analysis) Regular Expressions Finite State Machines DFAs: Deterministic Finite Automata Complications NFAs: Non Deterministic Finite State Automata From

More information

Decidability: Church-Turing Thesis

Decidability: Church-Turing Thesis Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there

More information

Exam Computability and Complexity

Exam Computability and Complexity Total number of points:... Number of extra sheets of paper:... Exam Computability and Complexity by Jiri Srba, January 2009 Student s full name CPR number Study number Before you start, fill in the three

More information

Introduction to Formal Languages, Automata and Computability p.1/51

Introduction to Formal Languages, Automata and Computability p.1/51 Introduction to Formal Languages, Automata and Computability Finite State Automata K. Krithivasan and R. Rama Introduction to Formal Languages, Automata and Computability p.1/51 Introduction As another

More information

Chomsky and Greibach Normal Forms

Chomsky and Greibach Normal Forms Chomsky and Greibach Normal Forms Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science Computation Theory p.1/25 Simplifying a CFG It is often convenient to simplify CFG One

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 14: Applications of PCP Goal of this Lecture Our goal is to present some typical undecidability

More information

3515ICT: Theory of Computation. Regular languages

3515ICT: Theory of Computation. Regular languages 3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #2 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 1 Lecture 2: Overview Recall some basic definitions from Automata Theory.

More information

Chap. 4,5 Review. Algorithms created in proofs from prior chapters

Chap. 4,5 Review. Algorithms created in proofs from prior chapters Chap. 4,5 Review Algorithms created in proofs from prior chapters (p. 55) Theorem 1.39: NFA to DFA (p. 67) Lemma 1.55: Regex to NFA (p. 69) Lemma 1.60: DFA to regex (through GNFA) (p. 112) Lemma 2.21:

More information

Finite Automata and Regular Languages

Finite Automata and Regular Languages Finite Automata and Regular Languages Topics to be covered in Chapters 1-4 include: deterministic vs. nondeterministic FA, regular expressions, one-way vs. two-way FA, minimization, pumping lemma for regular

More information

CS3719 Theory of Computation and Algorithms

CS3719 Theory of Computation and Algorithms CS3719 Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational tool - analysis

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

Turing Machines, diagonalization, the halting problem, reducibility

Turing Machines, diagonalization, the halting problem, reducibility Notes on Computer Theory Last updated: September, 015 Turing Machines, diagonalization, the halting problem, reducibility 1 Turing Machines A Turing machine is a state machine, similar to the ones we have

More information

On Decision Problems for Probabilistic Büchi Automata

On Decision Problems for Probabilistic Büchi Automata On Decision Prolems for Proailistic Büchi Automata Christel Baier 1, Nathalie Bertrand 2, Marcus Größer 1 1 TU Dresden, Germany 2 IRISA, INRIA Rennes, France Cachan 05 février 2008 Séminaire LSV 05/02/08,

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University In 1943, McCulloch and Pitts [4] published a pioneering work on a model for studying

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 10 Nancy Lynch Today Final topic in computability theory: Self-Reference and the Recursion

More information

On Stateless Multicounter Machines

On Stateless Multicounter Machines On Stateless Multicounter Machines Ömer Eğecioğlu and Oscar H. Ibarra Department of Computer Science University of California, Santa Barbara, CA 93106, USA Email: {omer, ibarra}@cs.ucsb.edu Abstract. We

More information

The complexity of unary tiling recognizable picture languages: nondeterministic and unambiguous cases

The complexity of unary tiling recognizable picture languages: nondeterministic and unambiguous cases Fundamenta Informaticae X (2) 1 20 1 IOS Press The complexity of unary tiling recognizale picture languages: nondeterministic and unamiguous cases Alerto Bertoni Massimiliano Goldwurm Violetta Lonati Dipartimento

More information

E.g. The set RE of regular expressions is given by the following rules:

E.g. The set RE of regular expressions is given by the following rules: 1 Lecture Summary We gave a brief overview of inductively defined sets, inductively defined functions, and proofs by structural induction We showed how to prove that a machine is correct using induction

More information

Chapter 8. Turing Machine (TMs)

Chapter 8. Turing Machine (TMs) Chapter 8 Turing Machine (TMs) Turing Machines (TMs) Accepts the languages that can be generated by unrestricted (phrase-structured) grammars No computational machine (i.e., computational language recognition

More information

Formal Models in NLP

Formal Models in NLP Formal Models in NLP Finite-State Automata Nina Seemann Universität Stuttgart Institut für Maschinelle Sprachverarbeitung Pfaffenwaldring 5b 70569 Stuttgart May 15, 2012 Nina Seemann (IMS) Formal Models

More information

Parikh s theorem. Håkan Lindqvist

Parikh s theorem. Håkan Lindqvist Parikh s theorem Håkan Lindqvist Abstract This chapter will discuss Parikh s theorem and provide a proof for it. The proof is done by induction over a set of derivation trees, and using the Parikh mappings

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Organization Prof. Dr. Joel Greenyer April 11, 2013 Organization Lecture: Thursdays, 10:15 11:45, F 128 Tutorial: Thursdays, 13:00 13:45, G 323 first

More information

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 10 : Context-Free Grammars

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 10 : Context-Free Grammars COMP-330 Theory of Computation Fall 2017 -- Prof. Claude Crépeau Lec. 10 : Context-Free Grammars COMP 330 Fall 2017: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic finite

More information

CDM Parsing and Decidability

CDM Parsing and Decidability CDM Parsing and Decidability 1 Parsing Klaus Sutner Carnegie Mellon Universality 65-parsing 2017/12/15 23:17 CFGs and Decidability Pushdown Automata The Recognition Problem 3 What Could Go Wrong? 4 Problem:

More information

CS6901: review of Theory of Computation and Algorithms

CS6901: review of Theory of Computation and Algorithms CS6901: review of Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational

More information

Automata Theory CS F-13 Unrestricted Grammars

Automata Theory CS F-13 Unrestricted Grammars Automata Theory CS411-2015F-13 Unrestricted Grammars David Galles Department of Computer Science University of San Francisco 13-0: Language Hierarchy Regular Languaes Regular Expressions Finite Automata

More information

The Church-Turing Thesis

The Church-Turing Thesis The Church-Turing Thesis Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/

More information

arxiv: v1 [cs.cc] 3 Feb 2019

arxiv: v1 [cs.cc] 3 Feb 2019 Some Remarks on Real-Time Turing Machines (Preliminary Report) arxiv:1902.00975v1 [cs.cc] 3 Feb 2019 Holger Petersen Reinsburgstr. 75 70197 Stuttgart February 5, 2019 Abstract The power of real-time Turing

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

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

P systems based on tag operations

P systems based on tag operations Computer Science Journal of Moldova, vol.20, no.3(60), 2012 P systems based on tag operations Yurii Rogozhin Sergey Verlan Abstract In this article we introduce P systems using Post s tag operation on

More information

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 1 : Introduction

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lecture 1 : Introduction COMP-330 Theory of Computation Fall 2017 -- Prof. Claude Crépeau Lecture 1 : Introduction COMP 330 Fall 2017: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic finite automata

More information

Saarland University. Verified Algorithms for Context-Free Grammars in Coq

Saarland University. Verified Algorithms for Context-Free Grammars in Coq Saarland University Faculty of Natural Sciences and Technology I Bachelor s Thesis Verified Algorithms for Context-Free Grammars in Coq Author: Jana Hofmann Advisor: Prof. Dr. Gert Smolka Reviewers: Prof.

More information

Einführung in die Computerlinguistik

Einführung in die Computerlinguistik Einführung in die Computerlinguistik Context-Free Grammars formal properties Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2018 1 / 20 Normal forms (1) Hopcroft and Ullman (1979) A normal

More information