Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Fall 2004COMP 3352 is empty? is finite? contains two different strings of the same length? Take a recursively enumerable language Decision problems: All these problems are undecidable
Fall 2004COMP 3353 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the halting problem to this problem
Fall 2004COMP 3354 finite language problem decider YES NO Suppose we have a decider for the finite language problem: Let be the TM with finite not finite
Fall 2004COMP 3355 Halting problem decider YES NO halts on We will build a decider for the halting problem: doesn’t halt on
Fall 2004COMP 3356 YES NO YES Halting problem decider finite language problem decider We want to reduce the halting problem to the finite language problem
Fall 2004COMP 3357 YES NO YES Halting problem decider finite language problem decider We need to convert one problem instance to the other problem instance convert input ?
Fall 2004COMP 3358 Construct machine : If enters a halt state, accept ( inifinite language) Initially, simulates on input Otherwise, reject ( finite language) On arbitrary input string
Fall 2004COMP 3359 halts on is infinite if and only if
Fall 2004COMP construct YES NO YES halting problem decider finite language problem decider
Fall 2004COMP is empty? is finite? contains two different strings of the same length? Take a recursively enumerable language Decision problems: All these problems are undecidable
Fall 2004COMP Theorem: For a recursively enumerable language it is undecidable to determine whether contains two different strings of same length Proof: We will reduce the halting problem to this problem
Fall 2004COMP Two-strings problem decider YES NO Suppose we have the decider for the two-strings problem: Let be the TM with contains Doesn’t contain two equal length strings
Fall 2004COMP Halting problem decider YES NO halts on We will build a decider for the halting problem: doesn’t halt on
Fall 2004COMP YES NO YES NO Halting problem decider Two-strings problem decider We want to reduce the halting problem to the empty language problem
Fall 2004COMP YES NO YES NO Halting problem decider Two-strings problem decider We need to convert one problem instance to the other problem instance convert inputs ?
Fall 2004COMP Construct machine : When enters a halt state, accept if or Initially, simulate on input (two equal length strings ) On arbitrary input string Otherwise, reject ( )
Fall 2004COMP halts on if and only if accepts two equal length strings accepts and
Fall 2004COMP construct YES NO YES NO Halting problem decider Two-strings problem decider
Fall 2004COMP Rice’s Theorem
Fall 2004COMP Non-trivial properties of recursively enumerable languages: any property possessed by some (not all) recursively enumerable languages Definition:
Fall 2004COMP Some non-trivial properties of recursively enumerable languages: is empty is finite contains two different strings of the same length
Fall 2004COMP Rice’s Theorem: Any non-trivial property of a recursively enumerable language is undecidable
Fall 2004COMP The Post Correspondence Problem
Fall 2004COMP Some undecidable problems for context-free languages: Is context-free grammar ambiguous? Is ? are context-free grammars
Fall 2004COMP We need a tool to prove that the previous problems for context-free languages are undecidable: The Post Correspondence Problem
Fall 2004COMP The Post Correspondence Problem Input: Two sequences of strings
Fall 2004COMP There is a Post Correspondence Solution if there is a sequence such that: PC-solution: Indices may be repeated or omitted
Fall 2004COMP Example: PC-solution:
Fall 2004COMP Example: There is no solution Because total length of strings from is smaller than total length of strings from
Fall 2004COMP 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 2004COMP Theorem: The PC problem is undecidable Proof: We will reduce the MPC problem to the PC problem
Fall 2004COMP 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 2004COMP Theorem: Proof: Let be context-free grammars. It is undecidable to determine if Rdeduce the PC problem to this problem
Fall 2004COMP Suppose we have a decider for the empty-intersection problem Empty- interection problem decider YES NO Context-free grammars
Fall 2004COMP For a context-free grammar, Theorem: it is undecidable to determine if G is ambiguous Proof: Reduce the PC problem to this problem