Download presentation
Presentation is loading. Please wait.
Published byJocelin Allison Modified over 8 years ago
1
Costas Busch - LSU1 The Post Correspondence Problem
2
Costas Busch - LSU2 Some undecidable problems for context-free languages: Is context-free grammar ambiguous? Is ? are context-free grammars
3
Costas Busch - LSU3 We need a tool to prove that the previous problems for context-free languages are undecidable: The Post Correspondence Problem
4
Costas Busch - LSU4 The Post Correspondence Problem Input: Two sets of strings
5
Costas Busch - LSU5 There is a Post Correspondence Solution if there is a sequence such that: PC-solution: Indices may be repeated or omitted
6
Costas Busch - LSU6 Example: PC-solution:
7
Costas Busch - LSU7 Example: There is no solution Because total length of strings from is smaller than total length of strings from
8
Costas Busch - LSU8 The Modified Post Correspondence Problem Inputs: MPC-solution:
9
Costas Busch - LSU9 Example: MPC-solution:
10
Costas Busch - LSU10 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
Costas Busch - LSU11 Theorem: The MPC problem is undecidable Proof: We will reduce the membership problem to the MPC problem
12
Costas Busch - LSU12 Membership problem Input: Turing machine string Question: Undecidable
13
Costas Busch - LSU13 Membership problem Input: unrestricted grammar string Question: Undecidable
14
Costas Busch - LSU14 Suppose we have a decider for the MPC problem MPC solution? YES NO String Sequences MPC problem decider
15
Costas Busch - LSU15 We will build a decider for the membership problem YES NO Membership problem decider
16
Costas Busch - LSU16 MPC problem decider Membership problem decider The reduction of the membership problem to the MPC problem: yes no
17
Costas Busch - LSU17 MPC problem decider Membership problem decider We need to convert the input instance of one problem to the other yes no Reduction?
18
Costas Busch - LSU18 Convert grammar and string Reduction: to sets of strings and Such that: generates There is an MPC solution for
19
Costas Busch - LSU19 : special symbol For every symbol Grammar : start variable For every variable
20
Costas Busch - LSU20 Grammar For every production : special symbol string
21
Costas Busch - LSU21 Example: Grammar : String
22
Costas Busch - LSU22
23
Costas Busch - LSU23
24
Costas Busch - LSU24 Grammar :
25
Costas Busch - LSU25 Derivation:
26
Costas Busch - LSU26 Derivation:
27
Costas Busch - LSU27 Derivation:
28
Costas Busch - LSU28 Derivation:
29
Costas Busch - LSU29 Derivation:
30
Costas Busch - LSU30 has an MPC-solution if and only if
31
Costas Busch - LSU31 MPC problem decider Membership problem decider Construct yes no
32
Costas Busch - LSU32 Since the membership problem is undecidable, The MPC problem is undecidable END OF PROOF
33
Costas Busch - LSU33 Theorem: The PC problem is undecidable Proof: We will reduce the MPC problem to the PC problem
34
Costas Busch - LSU34 Suppose we have a decider for the PC problem PC solution? YES NO String Sequences PC problem decider
35
Costas Busch - LSU35 We will build a decider for the MPC problem MPC solution? YES NO String Sequences MPC problem decider
36
Costas Busch - LSU36 PC problem decider MPC problem decider The reduction of the MPC problem to the PC problem: yes no
37
Costas Busch - LSU37 PC problem decider MPC problem decider yes no Reduction? We need to convert the input instance of one problem to the other
38
Costas Busch - LSU38 : input to the MPC problem : input to the PC problem Translated to
39
Costas Busch - LSU39 For each replace
40
Costas Busch - LSU40 PC-solution Has to start with These strings
41
Costas Busch - LSU41 PC-solution MPC-solution
42
Costas Busch - LSU42 has a PC solution has an MPC solution if and only if
43
Costas Busch - LSU43 PC problem decider MPC problem decider yes no Construct
44
Costas Busch - LSU44 Since the MPC problem is undecidable, The PC problem is undecidable END OF PROOF
45
Costas Busch - LSU45 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
Costas Busch - LSU46 Theorem: Proof: Let be context-free grammars. It is undecidable to determine if Reduce the PC problem to this problem (intersection problem)
47
Costas Busch - LSU47 Suppose we have a decider for the intersection problem Empty- interection problem decider YES NO Context-free grammars
48
Costas Busch - LSU48 We will build a decider for the PC problem PC solution? YES NO String Sequences PC problem decider
49
Costas Busch - LSU49 PC problem decider The reduction of the PC problem to the empty-intersection problem: noyes no Intersection problem decider
50
Costas Busch - LSU50 PC problem decider noyes no Reduction? We need to convert the input instance of one problem to the other Intersection problem decider
51
Costas Busch - LSU51 Context-free grammar : Introduce new unique symbols: Context-free grammar :
52
Costas Busch - LSU52 if and only if has a PC solution
53
Costas Busch - LSU53 Because are unique There is a PC solution:
54
Costas Busch - LSU54 PC problem decider noyes no Intersection problem decider Construct Context-Free Grammars
55
Costas Busch - LSU55 Since PC is undecidable, the Intersection problem is undecidable END OF PROOF
56
Costas Busch - LSU56 For a context-free grammar, Theorem: it is undecidable to determine if G is ambiguous Proof: Reduce the PC problem to this problem
57
Costas Busch - LSU57 PC problem decider noyes no Ambiguous problem decider Construct Context-Free Grammar
58
Costas Busch - LSU58 start variable of
59
Costas Busch - LSU59 if and only if is ambiguous if and only if has a PC solution
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.