Title: Undecidable problems for Recursively enumerable languages
1Undecidable problemsfor Recursively enumerable
languages
2Take a recursively enumerable language
Decision problems
- contains two different strings
- of the same length?
All these problems are undecidable
3Theorem
For a recursively enumerable language
it is undecidable to determine whether is
finite
Proof
We will reduce the halting problem to this problem
4Let be the TM with
Suppose we have a decider for the finite
language problem
YES
finite
finite language problem decider
NO
not finite
5We will build a decider for the halting problem
YES
halts on
Halting problem decider
doesnt halt on
NO
6We want to reduce the halting problem to the
finite language problem
Halting problem decider
NO
YES
finite language problem decider
YES
NO
7We need to convert one problem instance to the
other problem instance
Halting problem decider
NO
YES
convert input ?
finite language problem decider
YES
NO
8Construct machine
On arbitrary input string
Initially, simulates on input
If enters a halt state, accept (
inifinite language)
Otherwise, reject ( finite language)
9halts on
if and only if
is infinite
10halting problem decider
NO
YES
finite language problem decider
construct
YES
NO
11Take a recursively enumerable language
Decision problems
- contains two different strings
- of the same length?
All these problems are undecidable
12Theorem
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
13Let be the TM with
Suppose we have the decider for the two-strings
problem
YES
contains
Two-strings problem decider
Doesnt contain
NO
two equal length strings
14We will build a decider for the halting problem
YES
halts on
Halting problem decider
doesnt halt on
NO
15We want to reduce the halting problem to the
empty language problem
Halting problem decider
YES
YES
Two-strings problem decider
NO
NO
16We need to convert one problem instance to the
other problem instance
Halting problem decider
YES
YES
Two-strings problem decider
convert inputs ?
NO
NO
17Construct machine
On arbitrary input string
Initially, simulate on input
When enters a halt state, accept if
or
(two equal length strings
)
Otherwise, reject (
)
18halts on
if and only if
accepts two equal length strings
accepts and
19Halting problem decider
YES
YES
Two-strings problem decider
construct
NO
NO
20Rices Theorem
21Definition
Non-trivial properties of recursively enumerable
languages
any property possessed by some (not
all) recursively enumerable languages
22Some non-trivial properties of recursively
enumerable languages
- contains two different strings
- of the same length
23Rices Theorem
Any non-trivial property of a recursively
enumerable language is undecidable
24The Post Correspondence Problem
25Some undecidable problems for context-free
languages
are context-free grammars
- Is context-free grammar ambiguous?
26We need a tool to prove that the
previous problems for context-free languages are
undecidable
The Post Correspondence Problem
27The Post Correspondence Problem
Input
Two sequences of strings
28There is a Post Correspondence Solution if there
is a sequence such that
PC-solution
Indeces may be repeated or ommited
29Example
PC-solution
30Example
There is no solution
Because total length of strings from is smaller
than total length of strings from
31The Modified Post Correspondence Problem
Inputs
MPC-solution
32Example
MPC-solution
33We will show
1. The MPC problem is undecidable
(by reducing the membership to MPC)
2. The PC problem is undecidable
(by reducing MPC to PC)
34Theorem The MPC problem is undecidable
Proof We will reduce the membership
problem to the MPC problem
35Membership problem
Input recursive language string
Question
Undecidable
36Membership problem
Input unrestricted grammar string
Question
Undecidable
37Suppose we have a decider for the MPC problem
MPC solution?
String Sequences
YES
MPC problem decider
NO
38We will build a decider for the membership
problem
YES
Membership problem decider
NO
39The reduction of the membership problem to the
MPC problem
Membership problem decider
yes
yes
MPC problem decider
no
no
40We need to convert the input instance of one
problem to the other
Membership problem decider
yes
yes
convert inputs ?
MPC problem decider
no
no
41Grammar
start variable
special symbol
For every symbol
For every variable
42Grammar
string
special symbol
For every production
43Example
Grammar
String
44(No Transcript)
45(No Transcript)
46Grammar
47(No Transcript)
48(No Transcript)
49(No Transcript)
50has an MPC-solution
if and only if
51Membership problem decider
yes
yes
Construct
MPC problem decider
no
no
52Since the membership problem is undecidable, The
MPC problem is uncedecidable
END OF PROOF
53Theorem The PC problem is undecidable
Proof We will reduce the MPC problem
to the PC problem
54Suppose we have a decider for the PC problem
PC solution?
String Sequences
YES
PC problem decider
NO
55We will build a decider for the MPC problem
MPC solution?
String Sequences
YES
MPC problem decider
NO
56The reduction of the MPC problem to the PC
problem
MPC problem decider
yes
yes
PC problem decider
no
no
57We need to convert the input instance of one
problem to the other
MPC problem decider
yes
yes
convert inputs ?
PC problem decider
no
no
58 input to the MPC problem
59We construct new sequences
60We insert a special symbol between any two
symbols
61(No Transcript)
62Special Cases
63has a PC solution
if and only if
has an MPC solution
64PC-solution
MPC-solution
65MPC problem decider
yes
yes
Construct
PC problem decider
no
no
66Since the MPC problem is undecidable, The PC
problem is undecidable
END OF PROOF
67Some undecidable problems for context-free
languages
are context-free grammars
- Is context-free grammar
- ambiguous?
We reduce the PC problem to these problems
68Theorem
Let be context-free grammars. It
is undecidable to determine if
Rdeduce the PC problem to this problem
Proof
69Suppose we have a decider for the empty-intersecti
on problem
Context-free grammars
Empty- interection problem decider
YES
NO
70We will build a decider for the PC problem
PC solution?
String Sequences
YES
PC problem decider
NO
71The reduction of the PC problem to the
empty-intersection problem
PC problem decider
yes
yes
Empty- interection problem decider
no
no
72We need to convert the input instance of one
problem to the other
PC problem decider
no
yes
Empty- interection problem decider
convert inputs ?
no
yes
73 input to the PC problem
74Introduce new unique symbols
75Context-free grammar
76Context-free grammar
77has a PC solution
if and only if
78Because are unique
There is a PC solution
79PC problem decider
no
yes
Empty- interection problem decider
Construct Context-Free Grammars
no
yes
80Since PC is undecidable, the empty-intersection
problem is undecidable
END OF PROOF
81For a context-free grammar ,
Theorem
it is undecidable to determine if G is ambiguous
Reduce the PC problem to this problem
Proof
82PC problem decider
no
yes
Ambiguous- grammar problem decider
Construct Context-Free Grammar
no
yes
83start variable of
start variable of
start variable of
84has a PC solution
if and only if
if and only if
is ambiguous