Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2006Costas Busch - RPI1 The Post Correspondence Problem.

Similar presentations


Presentation on theme: "Fall 2006Costas Busch - RPI1 The Post Correspondence Problem."— Presentation transcript:

1 Fall 2006Costas Busch - RPI1 The Post Correspondence Problem

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

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

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

5 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

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

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

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

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

10 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:

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

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

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

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

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

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

17 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?

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

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

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

21 Fall 2006Costas Busch - RPI21 Example: Grammar : String

22 Fall 2006Costas Busch - RPI22

23 Fall 2006Costas Busch - RPI23

24 Fall 2006Costas Busch - RPI24 Grammar :

25 Fall 2006Costas Busch - RPI25 Derivation:

26 Fall 2006Costas Busch - RPI26 Derivation:

27 Fall 2006Costas Busch - RPI27 Derivation:

28 Fall 2006Costas Busch - RPI28 Derivation:

29 Fall 2006Costas Busch - RPI29 Derivation:

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

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

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

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

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

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

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

37 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

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

39 Fall 2006Costas Busch - RPI39 For each replace

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

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

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

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

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

45 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

46 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)

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

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

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

50 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

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

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

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

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

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

56 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

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

58 Fall 2006Costas Busch - RPI58 start variable of

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


Download ppt "Fall 2006Costas Busch - RPI1 The Post Correspondence Problem."

Similar presentations


Ads by Google