


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



CSCI 100
Think Like Computers
Turing Machines
Turing Machines
It is widely accepted that anything that is intuitively computable can be computed by a Turing machine If we can find a problem for which a Turing-machine solution can be proven not to exist, then the problem must be unsolvable Turing machine processing
Halting Problem
Halting Problem
program, called SolvesHaltingProblem that determines for any program Example and input SampleData whether program Example halts given input SampleData
Proposed program for solving the Halting problem
Halting Problem
Halting Problem
Proposed program for solving the Halting problem
Halting Problem
It uses the algorithm from SolvesHaltingProblem , such that: NewProgram writes “Halts” if Example loops, and NewProgram goes into an infinite loop if Example halts
If SolvesHaltingProblem prints “Halts”, program NewProgram goes into an infinite loop If SolvesHaltingProblem prints “Loops”, program NewProgram prints “Halts” and stops In either case, SolvesHaltingProblem gives the wrong answer
Halting Problem
Construction of NewProgram
Solving Problems
Exercise 1
Decision trees