Lecture 4: Unsolvable Problems - PowerPoint PPT Presentation

1 / 89
About This Presentation
Title:

Lecture 4: Unsolvable Problems

Description:

Enumerable and Decidable Sets. Algorithm Solvability. Problem Reduction ... Set Enumerability and Generability. A * is enumerable (generable) if ... – PowerPoint PPT presentation

Number of Views:112
Avg rating:3.0/5.0
Slides: 90
Provided by: yueta
Category:

less

Transcript and Presenter's Notes

Title: Lecture 4: Unsolvable Problems


1
Lecture 4 Unsolvable Problems
  • ???

??????? ?????????
2
Content
  • Enumerable and Decidable Sets
  • Algorithm Solvability
  • Problem Reduction
  • Diagonalization Method

3
Lecture 4 Unsolvable Problems
  • Enumerable and Decidable Sets

??????? ?????????
4
Set Enumerability and Generability
A ? ? is enumerable (generable) if
? computable function g N?? such that
If g is not totally defined, then D(g)0, 1, ,
k ?1.
5
The Generation Process
Enumerable (Generable)
A
Generate
6
The Enumeration Process
Enumerable (Generable)
A
Enumerate
?
7
The Enumeration Process
Enumerable (Generable)
Is such a process always terminable?
A
Enumerate
?
8
The Enumeration Process
Enumerable (Generable)
A
Enumerate
9
The Labeling Process
Enumerable (Generable)
A
Labeling
2
10
Exercises
  • Write two algorithms to enumerate (generate) the
    set of all even numbers of integer in different
    sequences.
  • What is difference between countable (studied
    in discrete math) and enumerable?

11
The Countability of Real Number
Is R countable?
Is (0,1)?R countable?
12
Prove (0,1)?R is uncountable
Assume that (0, 1) is countable.
Suppose that it is counted as
13
Prove (0,1)?R is uncountable
Assume that (0, 1) is countable.
Suppose that it is counted as
Consider the following number
d00
d11
d22
d33
d44

14
Prove (0,1)?R is uncountable
Assume that (0, 1) is countable.
Suppose that it is counted as
Consider the following number

15
Prove (0,1)?R is uncountable
Assume that (0, 1) is countable.
Suppose that it is counted as
Consider the following number

0.
h0
h1
h2
h3
h4
vfk
16
Prove (0,1)?R is uncountable
Assume that (0, 1) is countable.
Suppose that it is counted as
Consider the following number

0.
h0
h1
h2
h3
h4
vfk
17
Semidecidability
A ? ? is semidecidable if there exists an
algorithm which, when applying to any ? ? A, can
decide that ? is in A, i.e., there exists an
membership algorithm for A.
True
False or Never Halt
18
Theorem 1
A is enumerable iff A is semidecidable.
?
Pf)
A is enumerable
? g N?? such that g(N)A.
Hence, given any ??A, we generate strings
. . . . . . . .
g(1)?1
g(0)?0
Then, we will finally reach g(k) ?k ?.
This allows us to concludes that ??A.
19
Theorem 1
We have
Want
A is enumerable iff A is semidecidable.
?
Pf)
Thinking first.
What do we know?
There exists an membership algorithm ? for A on
TM such that
A is semidecidable
How to prove?
Find g such that
20
Theorem 1
We have
Want
A is enumerable iff A is semidecidable.
?
Pf)
Numbering the following black cells
Preliminaries
21
Theorem 1
We have
Want
A is enumerable iff A is semidecidable.
?
Pf)
Numbering the following black cells
Preliminaries
6
? 0, 1
0
1
5
? ?, 0, 1, 00, 01, 10, 11, 000,
2
3
4
7
22
Theorem 1
We have
Want
A is enumerable iff A is semidecidable.
?
Pf)
Step 1. Set n k 1.
Step 2. List the first n strings
Step 3. Hand simulates n steps of ?
on TM for each
The algorithm to generate g(k)
23
Theorem 1
We have
Want
A is enumerable iff A is semidecidable.
?
Pf)
Step 1. Set n k 1.
Step 2. List the first n strings
Step 3. Hand simulates n steps of ?
on TM for each
The algorithm to generate g(k)
Terminating Record
24
Theorem 1
We have
Want
A is enumerable iff A is semidecidable.
?
Pf)
Step 1. Set n k 1.
Step 2. List the first n strings
Step 3. Hand simulates n steps of ?
on TM for each
The algorithm to generate g(k)
Step 4. Let m terminating computations.
Step 5. if m lt k 1 n n 1 goto Step
2 else return the kth string.
k
25
Theorem 2
A is enumerable iff A is a domain of some
computable functions.
Pf)
Exercise
26
Theorem 2
A is enumerable iff A is a domain of some
computable functions.
How about if A is not enumerable?
27
Discussion
Program Computability
Enumeration
(Some reformation may be required)
Enumeration
Membership Determination
(Semidecidability)
28
Complement Set
29
Decidable Set
A ? ? is decidable if there exists an computable
function, say, D such that
30
Theorem 3
31
Theorem 3
enumerable.
semidecidable.
Pf)
?
Show that A is enumerable as follows
  • Fact ? can be enumerated as ?0, ?1, ?2,
  • Since A is decidable, ? a computable function D
    st.
  • The computable function g to enumerate A can be

g
A is enumerable.
32
Theorem 3
enumerable.
semidecidable.
Pf)
?
  • Fact ? can be enumerated as ?0, ?1, ?2,
  • Since A is decidable, ? a computable function D
    st.
  • The computable function h to enumerate can be

h
33
Theorem 3
enumerable.
semidecidable.
Pf)
?
  • Suppose ?1 semidecides A, ?2 semidecides .
  • For any ???, input it to ?1 and ?2
    simultaneously.
  • If ?1 terminates, return true.
  • If ?2 terminates, return false.

34
Lecture 4 Unsolvable Problems
  • Algorithm Solvability

??????? ?????????
35
Enumeration, Decidability and Solvability
Enumeration
(Semidecidability)
Decidability
To deal with the existence of algorithm (program)
to solve problems.
Solvability
That is, given a problem, whether there exists a
program to solve (any instance of) the problem.
36
Example
Problem (PE Program Equivalence)
?PE
q Are program ?1 and program ?2 equivalent?
Any Algorithm?
37
Example
Solvable? Computable?
Problem (PE Program Equivalence)
?PE
q Are program ?1 and program ?2 equivalent?
Decidable?
38
Example
Solvable? Computable?
Problem Reformulation
Problem (PE Program Equivalence)
?PE
q Are program ?1 and program ?2 equivalent?
Decidable?
Problem PE is solvable iff A is decidable
(recursive).
39
Definitions
  • Semisolvable
  • Solvable
  • Totally Unsolvable

if q is true, it answers yes. if q is false, it
may not give answer (never halt).
? algorithm
if q is true, it answers yes. if q is false, it
answers no.
? algorithm
not semisolvale.
40
Problem and Complement Problem
41
Problem and Complement Problem
Example
Turing Machine Version
42
Problem and Complement Problem
Example
Register Machine Version
43
Theorem 4
Pf)
?
?algorithm ?P such that
P is solvable
if q is true, it answers yes. if q is false, it
answers no.
To show that P is semisolvable, we need to find a
algorithm ? such that
?
44
Theorem 4
Pf)
?
?algorithm ?P such that
P is solvable
if q is true, it answers yes. if q is false, it
answers no.
To show that P is semisolvable, we need to find a
algorithm ? such that
It can be
45
Theorem 4
Pf)
?
?algorithm ?P such that
P is solvable
if q is true, it answers yes. if q is false, it
answers no.
It can be
46
Theorem 4
Pf)
?
To run ? and ? alternatively,
if ? answers yes, then yes
if ? answers yes, then no.
47
Corollary
P is semisolvable but not solvable
is totally unsolvable.
48
The Halting Problem
More simple,
  • Register Machine Version
  • Turing Machine Version

49
Theorem 5
?
The HP (halting problem) is not solvable.
????
We will prove a simpler version.
50
Theorem 5
?
The HP (halting problem) is not solvable.
????
51
Theorem 5
The HP (halting problem) is not solvable.
Pf)
Assume that HP is solvable.
?algorithm, given ? and lt?, 1gt, can tell
whether ? will halt on lt?, 1gt.
Define
We can have an algorithm, say, ?decide to decide
the elements of A.
That is,
52
Theorem 5
The HP (halting problem) is not solvable.
Construct ?strange by making use of ?decide
Pf)
What are done by ?strange?
53
Theorem 5
The HP (halting problem) is not solvable.
Construct ?strange by making use of ?decide
Pf)
START
Duplicate ? as ? _at_?
iff
?decide
true
false
?
HALT
54
Theorem 5
The input to ?strange is a programs string, say,
??. ?strange will never halt on ?? if and only
if program ? will halt on feeding its code as
input parameter.
The HP (halting problem) is not solvable.
Construct ?strange by making use of ?decide
Pf)
START
Duplicate ? as ? _at_?
iff
?decide
true
false
?
HALT
55
Theorem 5
The HP (halting problem) is not solvable.
Pf)
Assume that HP is solvable.
. . . . . . . . . . . . . . . .
iff
iff
56
Theorem 5
The HP (halting problem) is not solvable.
Pf)
Assume that HP is solvable.
. . . . . . . . . . . . . . . .
iff
iff
57
Theorem 6
The HP (halting problem) is not solvable.
The HP (halting problem) is semisolvable.
Pf)
Trivial (Run it)
58
The Non-Halting Problem (NHP)
  • Register Machine Version
  • Turing Machine Version

59
Theorem 7
The NHP is not semisolvable.
The NHP is totally unsolvable.
60
Lecture 4 Unsolvable Problems
  • Problem Reduction

??????? ?????????
61
Is a Problem Solvable?
  • Methods to identify the problems solvability
  • Problem Reduction
  • Diagonalization method
  • Rices Theorem

62
Problem Reduction
r
Let P and P be two problems. If there is an
algorithm (r) which will map any q?P into q?P st.
q is true iff q is true.
Then, we say that problem P reduces to P.
63
Problem Reduction
Conceptually, P is larger.
r
Let P and P be two problems. If there is an
algorithm (r) which will map any q?P into q?P
st.
q is true iff q is true.
Then, we say that problem P reduces to P.
64
Discussion
r
q is true iff q is true.
semisolvable
How about P?
If P is
solvable
65
Discussion
r
q is true iff q is true.
semisolvable
semisolvable
If P is
P is
solvable
solvable
66
Discussion
r
q is true iff q is true.
How about P?
semisolvable
If P is
solvable
67
Discussion
r
q is true iff q is true.
semisolvable
If P is
P is ?????????
solvable
68
Discussion
r
q is true iff q is true.
not solvable
How about P?
If P is
totally unsolvable
69
Discussion
r
q is true iff q is true.
not solvable
If P is
P is ????????
totally unsolvable
70
Discussion
r
q is true iff q is true.
not solvable
How about P?
If P is
totally unsolvable
71
Discussion
r
q is true iff q is true.
not solvable
not solvable
If P is
P is
totally unsolvable
totally unsolvable
72
Discussion
r
73
Theorem 8
The halting-problems for TM(?), R, SR, SR2, are
semisolvable but not solvable.
r
74
Theorem 9
The problem of TM equivalence (PE) is totally
unsolvable.
Any Algorithm?
75
Theorem 9
The problem of TM equivalence (PE) is totally
unsolvable.
Pf)
Fact NHP is totally unsolvable.
Method of problem reduction
Find r st.
iff
How?
76
Theorem 9
  • doesnt
  • halt on lt?, kgt

The problem of TM equivalence (PE) is totally
unsolvable.
Pf)
Fact NHP is totally unsolvable.
Input lt?, kgt?
?
77
Theorem 9
  • doesnt
  • halt on lt?, kgt

The problem of TM equivalence (PE) is totally
unsolvable.
Pf)
Fact NHP is totally unsolvable.
Input lt?, kgt?
?
78
Lecture 4 Unsolvable Problems
  • Diagonalization Method

??????? ?????????
79
Example
Show that HP is not solvable using
diagonalization method.
  • Fact The set of all programs is enumerable.
    (why?)
  • Let be the string
    representation of all programs.
  • Suppose that HP is solvable. Then, we can have
    the following termination record
  • Construct ?strange such that

Can you write such a program?
80
Example
Show that HP is not solvable using
diagonalization method.
  • Fact The set of all programs is enumerable.
    (why?)
  • Let be the string
    representation of all programs.
  • Suppose that HP is solvable. Then, we can have
    the following termination record
  • Construct ?strange such that

81
Example
Show that HP is not solvable using
diagonalization method.
  • Fact The set of all programs is enumerable.
    (why?)
  • Let be the string
    representation of all programs.
  • Suppose that HP is solvable. Then, we can have
    the following termination record
  • Construct ?strange such that

82
Theorem 10
totally unsolvable ? not semisolvable
The total function problem is totally unsolvable.
Pf)
  • Assume it is semisolvable.
  • Then, we can enumerate the all total function as
  • Let x1 be the input/output register.

Totally defined functions
  • Then,

83
Theorem 10
totally unsolvable ? not semisolvable
The total function problem is totally unsolvable.
Pf)
  • Assume it is semisolvable.

. . . . . . . . . . . . . . . . . . . . .
  • Define
  • Clearly, g is total.

84
Theorem 10
totally unsolvable ? not semisolvable
The total function problem is totally unsolvable.
Pf)
  • Assume it is semisolvable.

. . . . . . . . . . . . . . . . . . . . .
  • Define
  • Clearly, g is total.

85
Theorem 10
totally unsolvable ? not semisolvable
The total function problem is totally unsolvable.
Pf)
  • Assume it is semisolvable.

. . . . . . . . . . . . . . . . . . . . .
  • Define
  • Clearly, g is total.

86
Theorem 11
There is a total function which is not the
associate function of any count program.
87
Exercises
  • Special halting problem (SHP) and general halting
    problem (GHP) are defined as follows
  • Prove
  • If GHP is not solvable, then SHP is not solvable.
  • If SHP is not solvable, then GHP is not solvable.

88
Exercises
  • Special equivalence problem (SE) is defined as
  • Show that SE is not solvable.
  • General equivalence problem (GE) is defined as
  • Show that GE is not solvable.

89
Exercises
  • Define
  • Show that MEMBER is not solvable.
Write a Comment
User Comments (0)
About PowerShow.com