This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Harvard CS 121 and CSCI E207 Lecture 17: Undecidable Problems and Unprovable Theorems Harry Lewis November 10, 2009 Reading: Sipser Ch. 5 Harvard CS 121 & CSCI E207 November 10, 2009 Unsolvability of Derivability in General Grammars Theorem: There is no algorithm to determine, given any grammar G and any string w , whether w L ( G ) . Proof: Suppose there were such a decision procedure. Then we could use it to solve the halting problem: Given M and w , to determine if M halts on input w , construct a grammar G such that L ( M ) = L ( G ) and determine if w L ( G ) . Since the halting problem is unsolvable, so is this problem. There is a particular grammar G for which this problem is unsolvable: namely, the grammar for the universal TM. 1 Harvard CS 121 & CSCI E207 November 10, 2009 TwoCounter Machines A counter machine can add and subtract 1 from its registers and check if they are zero. Theorem: The halting problem is unsolvable even for 2counter machines. Proof: 1. One TM tape to two pushdown stores 2. One pushdown store to two counters 3. Four counters to two counters 2 Harvard CS 121 & CSCI E207 November 10, 2009 An Undecidable Problem about Context Free Grammars Theorem: It is undecidable to determine, given CFGs G 1 and G 2 , whether L ( G 1 ) L ( G 2 ) = . Proof : Reduction from {h G,w i : G is a general grammar generating w } Given h G,w i , we can construct grammars G 1 ,G 2 such that: L ( G 1 ) = { C 1 # D R 1 # C 2 # D R 2 # # C n # D R n : n...
View
Full
Document
This document was uploaded on 12/24/2011.
 Fall '09

Click to edit the document details