150 likes | 157 Views
Explore the concepts of decidability and partial decidability in computation, including the definition of an alphabet, strings, and problems. Learn about decidable and semidecidable problems, as well as Turing machines and their ability to solve problems.
E N D
An alphabet is a finite set of symbols. • Example: a,b,c are symbols; {a,b,c} is an alphabet. • Example: 0,1 are symbols; {0,1} is an alphabet. • (Sigma) represents an alphabet. • A string over is a sequence of symbols from . • Example: 01001 is a string over {0,1} • Example: aabbaaa is a string over {a,b,c} • * is the set of all finite strings over
Example: {0,1}* is the set of all finite binary strings • Note that the input to a Turing machine is a string of tape symbols. • The output to a Turing machine is also a string of symbols.
A problem is a set of yes-no questions. • A problem consists of a set of objects (instances of the problem)called the base set, together with a right answer, either “yes” or “no”, for each object. • Example: Blank tape halting problem. • Base set: set of all Turing machines • Instance of the problem: A Turing machine M • Right answer for M: “Yes” if TM M halts on blank tape, “no” if not
Example: Student passing problem • Base set: set of all comp006 students • Instance of problem: A particular student A • Right answer for A: “Yes” if student A passes, “no” if not • If P is a problem then P, the complement of P, is P with the “yes” and “no” answers interchanged.
The complement of the blank tape halting problem is the blank tape non-halting problem, in which the answer is “yes” if the TM fails to halt on blank tape, and “no” if it halts. • The complement of the passing problem is the failing problem. • A problem may have one or more encodings which represent instances of the problem as strings of symbols. • For the blank tape halting problem an encoding represents Turing machines as strings of symbols.
For the passing problem an encoding represents students as strings of symbols. • Let S be the base set of a problem P and let x be an element of S. A Turing machine M solves the instance x of P if M gives the right answer on the encoding x’ of x and halts. • M can print “yes” or “no” on the tape • M can halt in state “y” or “n” • M solves a problem P if M gives the right answer on all instances of P, and halts.
M solves the blank tape halting problem if M, given an encoding of Turing machine T, always halts and answers “yes” if T halts on blank tape, and “no” if not. • M solves the passing problem if M, given an encoding of a student A, halts and answers “yes” if A passes, and halts and answers “no” if A fails.
A problem P is decidable (solvable) if there is a Turing machine T that solves P; such a T always halts. Else P is undecidable (unsolvable). • A problem P is semidecidable (partially decidable, partially solvable) if there is a Turing machine T that partially solves P; such a T solves all instances of P for which the right answer is “yes”, but fails to halt for all instances of P for which the right answer is “no”.
The blank tape halting problem is semidecidable if there is a Turing machine M that, given an encoding of TM T, halts and says “yes” if T halts on blank tape, but M fails to halt if T fails to halt on blank tape • The passing problem is semidecidable if there is a Turing machine M that, given an encoding of a student A, halts and says “yes” if A passes the course, but fails to halt if A fails the course. • Any problem whose base set is finite, is decidable! Can you see why? Even if we don’t know the answer the problem is decidable.
If P is decidable then P is semidecidable. • If P is semidecidable and P is semidecidable then P is decidable. • Let Pyes be the set of encodings of instances x of P such that the right answer is “yes.” • Let Pno be the set of encodings of instances x of P such that the right answer is “no.”
For the blank tape halting problem, Pyes is the set of encodings of Turing machines that halt on blank tape. Pno is the set of encodings of Turing machines that do not halt on blank tape. • For the passing problem Pyes is the set of encodings of students who pass the course and Pno is the set of encodings of students who do not pass the course.
If P is semidecidable then Pyes is called recursively enumerable. • If P is decidable, Pyes and Pno are said to be recursive. • Functions can also be Turing computable • A function f from strings to strings is Turing computable if whenever the Turing machine starts with x on the tape, it ends with f(x) on the tape • Encode integers and tuples of integers as strings
Thus one defines computability of functions on integers • The common functions (addition, multiplication, subtraction) on integers are all computable by Turing machines • Not all functions are computable by Turing machines. • The “busy beaver function” is not computable • We may discuss this later • All primitive recursive functions are Turing computable
We may discuss primitive recursive functions later • Some computable functions are not primitive recursive (Ackermann’s function) • Maybe we will discuss this later