70 likes | 205 Views
Computability (Solvability). Can all functions be computed? . Clock example. Your Job: Let me know as soon as the clock stops. Let me know as soon as the clock never stops. Which one of these is not possible?. Repeat as long as X is not equal to 0 Add one to X
E N D
Computability (Solvability) Can all functions be computed?
Clock example Your Job: Let me know as soon as the clock stops. Let me know as soon as the clock never stops. Which one of these is not possible?
Repeat as long as X is not equal to 0 Add one to X ● If the initial value of X is 0. Since X is already 0, the whole loop is skipped (no statements are repeated). ● If the initial value of X is a negative integer. The loop will end when X becomes 0. ● If the initial value of X is greater than 0 the loop will never end since there are an infinite number of integers greater than 0. Does this loop end?
Can we construct an algorithm A that would take any program P (and P's input) as input. A should determine if P halts: If P stops: print “P halts.” If P does not stop (infinite loop) print “P does not halt.” Halting problem
How about these? • If P stops: print “hello” • If P does not stop print “see you later” • If P does not stop do nothing (undefined) • If P stops print “see you later” • If P stops: do nothing • If P does not stop print “see you later”
…continued The non computable example above is known as the Halting Problem and it cannot be solved. The Church-Turing thesis stated conditions which a function must satisfy in order to be computable. It is named after Alonzo Church and Alan Turing. This question concerned mathematicians even before digital computers were in developed. In particular, during the 1930's much work was devoted to this.
Another Unsolvable Problem Problem: Construct an algorithm that would figure out the steps needed to perform any task asked of it. This is also unsolvable. It is not possible to construct an algorithm that would, on its own, construct an algorithm to solve a random problem.