fall 2006costas busch - rpi1 the post correspondence problem

Download Fall 2006Costas Busch - RPI1 The Post Correspondence Problem

Post on 15-Jan-2016

213 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • The Post Correspondence Problem

    Costas Busch - RPI

  • Some undecidable problems forcontext-free languages: Is context-free grammar ambiguous? Is ?are context-free grammars

    Costas Busch - RPI

  • We need a tool to prove that the previousproblems for context-free languagesare undecidable:The Post Correspondence Problem

    Costas Busch - RPI

  • The Post Correspondence ProblemInput:Two sets of strings

    Costas Busch - RPI

  • There is a Post Correspondence Solutionif there is a sequence such that:PC-solution:Indices may be repeated or omitted

    Costas Busch - RPI

  • Example:PC-solution:

    Costas Busch - RPI

  • Example:There is no solutionBecause total length of strings from is smaller than total length of strings from

    Costas Busch - RPI

  • The Modified Post Correspondence ProblemInputs:MPC-solution:

    Costas Busch - RPI

  • Example:MPC-solution:

    Costas Busch - RPI

  • 1. The MPC problem is undecidable2. The PC problem is undecidable(by reducing MPC to PC)(by reducing the membership to MPC)We will show:

    Costas Busch - RPI

  • Theorem: The MPC problem is undecidableProof: We will reduce the membership problem to the MPC problem

    Costas Busch - RPI

  • Membership problemInput: Turing machine string Question:Undecidable

    Costas Busch - RPI

  • Membership problemInput: unrestricted grammar string Question:Undecidable

    Costas Busch - RPI

  • Suppose we have a decider for the MPC problemMPC solution?YESNOString SequencesMPC problemdecider

    Costas Busch - RPI

  • We will build a decider for the membership problemYESNOMembershipproblemdecider

    Costas Busch - RPI

  • MPC problemdeciderMembership problem deciderThe reduction of the membership problemto the MPC problem:yesyesnono

    Costas Busch - RPI

  • MPC problemdeciderMembership problem deciderWe need to convert the input instance ofone problem to the otheryesyesnonoReduction?

    Costas Busch - RPI

  • Convert grammar and stringReduction:to sets of strings and Such that:generatesThere is an MPCsolution for

    Costas Busch - RPI

  • : special symbolFor every symbolGrammar: start variableFor every variable

    Costas Busch - RPI

  • GrammarFor every production: special symbolstring

    Costas Busch - RPI

  • Example:Grammar : String

    Costas Busch - RPI

  • Costas Busch - RPI

  • Costas Busch - RPI

  • Grammar :

    Costas Busch - RPI

  • Derivation:

    Costas Busch - RPI

  • Derivation:

    Costas Busch - RPI

  • Derivation:

    Costas Busch - RPI

  • Derivation:

    Costas Busch - RPI

  • Derivation:

    Costas Busch - RPI

  • has an MPC-solution if and only if

    Costas Busch - RPI

  • MPC problemdeciderMembership problem deciderConstruct

    yesyesnono

    Costas Busch - RPI

  • Since the membership problem is undecidable,The MPC problem is undecidableEND OF PROOF

    Costas Busch - RPI

  • Theorem: The PC problem is undecidableProof: We will reduce the MPC problem to the PC problem

    Costas Busch - RPI

  • Suppose we have a decider for the PC problemPC solution?YESNOString SequencesPC problemdecider

    Costas Busch - RPI

  • We will build a decider for the MPC problemMPC solution?YESNOString SequencesMPC problemdecider

    Costas Busch - RPI

  • PC problemdeciderMPC problem deciderThe reduction of the MPC problemto the PC problem:yesyesnono

    Costas Busch - RPI

  • PC problemdeciderMPC problem decideryesyesnonoReduction?We need to convert the input instance ofone problem to the other

    Costas Busch - RPI

  • : input to the MPC problem: input to the PC problemTranslated to

    Costas Busch - RPI

  • For eachFor eachreplace

    Costas Busch - RPI

  • PC-solutionHas to start with These strings

    Costas Busch - RPI

  • PC-solutionMPC-solution

    Costas Busch - RPI

  • has a PC solutionhas an MPC solutionif and only if

    Costas Busch - RPI

  • PC problemdeciderMPC problem decideryesyesnonoConstruct

    Costas Busch - RPI

  • Since the MPC problem is undecidable,The PC problem is undecidableEND OF PROOF

    Costas Busch - RPI

  • Some undecidable problems forcontext-free languages: Is context-free grammar ambiguous? Is ?are context-free grammarsWe reduce the PC problem to these problems

    Costas Busch - RPI

  • Theorem:Proof:Let be context-free grammars. It is undecidableto determine ifReduce the PC problem to thisproblem(intersection problem)

    Costas Busch - RPI

  • Suppose we have a decider for theintersection problemEmpty-interectionproblemdeciderYESNOContext-free grammars

    Costas Busch - RPI

  • We will build a decider for the PC problemPC solution?YESNOString SequencesPC problemdecider

    Costas Busch - RPI

  • PC problem deciderThe reduction of the PC problemto the empty-intersection problem:noyesyesnoIntersectionproblemdecider

    Costas Busch - RPI

  • PC problem decidernoyesyesnoReduction?We need to convert the input instance ofone problem to the otherIntersectionproblemdecider

    Costas Busch - RPI

  • Context-free grammar :Introduce new unique symbols:Context-free grammar :

    Costas Busch - RPI

  • if and only ifhas a PC solution

    Costas Busch - RPI

  • Because are uniqueThere is a PC solution:

    Costas Busch - RPI

  • PC problem decidernoyesyesnoIntersectionproblemdeciderConstructContext-FreeGrammars

    Costas Busch - RPI

  • Since PC is undecidable,the Intersection problem is undecidableEND OF PROOF

    Costas Busch - RPI

  • For a context-free grammar ,Theorem:it is undecidable to determineif G is ambiguousProof:Reduce the PC problem to this problem

    Costas Busch - RPI

  • PC problem decidernoyesyesnoAmbiguousproblemdeciderConstructContext-FreeGrammar

    Costas Busch - RPI

  • start variable of start variable of start variable of

    Costas Busch - RPI

  • if and only ifis ambiguousif and only ifhas a PC solution

    Costas Busch - RPI

Recommended

View more >