Fall 2006Costas Busch - RPI1 The Post Correspondence Problem.

Slides:



Advertisements
Similar presentations
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
Advertisements

Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
CS5371 Theory of Computation
1 The Post Correspondence Problem continued We will prove that the MPC problem is undecidable 2. We will prove that the PC problem is undecidable.
Fall 2006Costas Busch - RPI1 Regular Expressions.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
Recursively Enumerable and Recursive Languages
Courtesy Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
Costas Busch - RPI1 Grammars. Costas Busch - RPI2 Grammars Grammars express languages Example: the English language.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
1 Converting NPDAs to Context-Free Grammars. 2 For any NPDA we will construct a context-free grammar with.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Courtesy Costas Busch - RPI
Fall 2004COMP 3351 NPDA’s Accept Context-Free Languages.
Fall 2003Costas Busch - RPI1 Decidable Problems of Regular Languages.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Regular Grammars Generate Regular Languages. 2 Theorem Regular grammars generate exactly the class of regular languages: If is a regular grammar then.
Linear Bounded Automata LBAs
Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Fall 2006Costas Busch - RPI1 More Applications of the Pumping Lemma.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2006Costas Busch - RPI1 The Chomsky Hierarchy.
Fall 2006Costas Busch - RPI1 PDAs Accept Context-Free Languages.
Prof. Busch - LSU1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Fall 2003Costas Busch - RPI1 Turing Machines (TMs) Linear Bounded Automata (LBAs)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 PDAs Accept Context-Free Languages. 2 Context-Free Languages (Grammars) Languages Accepted by PDAs Theorem:
Fall 2003Costas Busch - RPI1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
Decidability A decision problem is a problem with a YES/NO answer. We have seen decision problems for - regular languages: - context free languages: [Sections.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Costas Busch - LSU1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
Costas Busch - LSU1 The Post Correspondence Problem.
Costas Busch - LSU1 PDAs Accept Context-Free Languages.
CS 154 Formal Languages and Computability April 28 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Recursively Enumerable and Recursive Languages
PDAs Accept Context-Free Languages
Busch Complexity Lectures: Reductions
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
NPDAs Accept Context-Free Languages
PDAs Accept Context-Free Languages
LIMITS OF ALGORITHMIC COMPUTATION
NPDAs Accept Context-Free Languages
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
DPDA Deterministic PDA
Decidable Languages Costas Busch - LSU.
The Post Correspondence Problem
Elementary Questions about Regular Languages
The Off-Line Machine Input File read-only (once) Input string
Turing acceptable languages and Enumerators
Undecidable problems:
Properties of Context-Free languages
Decidability continued….
Presentation transcript:

Fall 2006Costas Busch - RPI1 The Post Correspondence Problem

Fall 2006Costas Busch - RPI2 Some undecidable problems for context-free languages: Is context-free grammar ambiguous? Is ? are context-free grammars

Fall 2006Costas Busch - RPI3 We need a tool to prove that the previous problems for context-free languages are undecidable: The Post Correspondence Problem

Fall 2006Costas Busch - RPI4 The Post Correspondence Problem Input: Two sets of strings

Fall 2006Costas Busch - RPI5 There is a Post Correspondence Solution if there is a sequence such that: PC-solution: Indices may be repeated or omitted

Fall 2006Costas Busch - RPI6 Example: PC-solution:

Fall 2006Costas Busch - RPI7 Example: There is no solution Because total length of strings from is smaller than total length of strings from

Fall 2006Costas Busch - RPI8 The Modified Post Correspondence Problem Inputs: MPC-solution:

Fall 2006Costas Busch - RPI9 Example: MPC-solution:

Fall 2006Costas Busch - RPI10 1. The MPC problem is undecidable 2. The PC problem is undecidable (by reducing MPC to PC) (by reducing the membership to MPC) We will show:

Fall 2006Costas Busch - RPI11 Theorem: The MPC problem is undecidable Proof: We will reduce the membership problem to the MPC problem

Fall 2006Costas Busch - RPI12 Membership problem Input: Turing machine string Question: Undecidable

Fall 2006Costas Busch - RPI13 Membership problem Input: unrestricted grammar string Question: Undecidable

Fall 2006Costas Busch - RPI14 Suppose we have a decider for the MPC problem MPC solution? YES NO String Sequences MPC problem decider

Fall 2006Costas Busch - RPI15 We will build a decider for the membership problem YES NO Membership problem decider

Fall 2006Costas Busch - RPI16 MPC problem decider Membership problem decider The reduction of the membership problem to the MPC problem: yes no

Fall 2006Costas Busch - RPI17 MPC problem decider Membership problem decider We need to convert the input instance of one problem to the other yes no Reduction?

Fall 2006Costas Busch - RPI18 Convert grammar and string Reduction: to sets of strings and Such that: generates There is an MPC solution for

Fall 2006Costas Busch - RPI19 : special symbol For every symbol Grammar : start variable For every variable

Fall 2006Costas Busch - RPI20 Grammar For every production : special symbol string

Fall 2006Costas Busch - RPI21 Example: Grammar : String

Fall 2006Costas Busch - RPI22

Fall 2006Costas Busch - RPI23

Fall 2006Costas Busch - RPI24 Grammar :

Fall 2006Costas Busch - RPI25 Derivation:

Fall 2006Costas Busch - RPI26 Derivation:

Fall 2006Costas Busch - RPI27 Derivation:

Fall 2006Costas Busch - RPI28 Derivation:

Fall 2006Costas Busch - RPI29 Derivation:

Fall 2006Costas Busch - RPI30 has an MPC-solution if and only if

Fall 2006Costas Busch - RPI31 MPC problem decider Membership problem decider Construct yes no

Fall 2006Costas Busch - RPI32 Since the membership problem is undecidable, The MPC problem is undecidable END OF PROOF

Fall 2006Costas Busch - RPI33 Theorem: The PC problem is undecidable Proof: We will reduce the MPC problem to the PC problem

Fall 2006Costas Busch - RPI34 Suppose we have a decider for the PC problem PC solution? YES NO String Sequences PC problem decider

Fall 2006Costas Busch - RPI35 We will build a decider for the MPC problem MPC solution? YES NO String Sequences MPC problem decider

Fall 2006Costas Busch - RPI36 PC problem decider MPC problem decider The reduction of the MPC problem to the PC problem: yes no

Fall 2006Costas Busch - RPI37 PC problem decider MPC problem decider yes no Reduction? We need to convert the input instance of one problem to the other

Fall 2006Costas Busch - RPI38 : input to the MPC problem : input to the PC problem Translated to

Fall 2006Costas Busch - RPI39 For each replace

Fall 2006Costas Busch - RPI40 PC-solution Has to start with These strings

Fall 2006Costas Busch - RPI41 PC-solution MPC-solution

Fall 2006Costas Busch - RPI42 has a PC solution has an MPC solution if and only if

Fall 2006Costas Busch - RPI43 PC problem decider MPC problem decider yes no Construct

Fall 2006Costas Busch - RPI44 Since the MPC problem is undecidable, The PC problem is undecidable END OF PROOF

Fall 2006Costas Busch - RPI45 Some undecidable problems for context-free languages: Is context-free grammar ambiguous? Is ? are context-free grammars We reduce the PC problem to these problems

Fall 2006Costas Busch - RPI46 Theorem: Proof: Let be context-free grammars. It is undecidable to determine if Reduce the PC problem to this problem (intersection problem)

Fall 2006Costas Busch - RPI47 Suppose we have a decider for the intersection problem Empty- interection problem decider YES NO Context-free grammars

Fall 2006Costas Busch - RPI48 We will build a decider for the PC problem PC solution? YES NO String Sequences PC problem decider

Fall 2006Costas Busch - RPI49 PC problem decider The reduction of the PC problem to the empty-intersection problem: noyes no Intersection problem decider

Fall 2006Costas Busch - RPI50 PC problem decider noyes no Reduction? We need to convert the input instance of one problem to the other Intersection problem decider

Fall 2006Costas Busch - RPI51 Context-free grammar : Introduce new unique symbols: Context-free grammar :

Fall 2006Costas Busch - RPI52 if and only if has a PC solution

Fall 2006Costas Busch - RPI53 Because are unique There is a PC solution:

Fall 2006Costas Busch - RPI54 PC problem decider noyes no Intersection problem decider Construct Context-Free Grammars

Fall 2006Costas Busch - RPI55 Since PC is undecidable, the Intersection problem is undecidable END OF PROOF

Fall 2006Costas Busch - RPI56 For a context-free grammar, Theorem: it is undecidable to determine if G is ambiguous Proof: Reduce the PC problem to this problem

Fall 2006Costas Busch - RPI57 PC problem decider noyes no Ambiguous problem decider Construct Context-Free Grammar

Fall 2006Costas Busch - RPI58 start variable of

Fall 2006Costas Busch - RPI59 if and only if is ambiguous if and only if has a PC solution