Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Module 8 Halting Problem revisited –Universal Turing machine half-solves halting problem –A universal Turing machine is an operating system/general purpose.

Similar presentations


Presentation on theme: "1 Module 8 Halting Problem revisited –Universal Turing machine half-solves halting problem –A universal Turing machine is an operating system/general purpose."— Presentation transcript:

1 1 Module 8 Halting Problem revisited –Universal Turing machine half-solves halting problem –A universal Turing machine is an operating system/general purpose computer

2 2 Half-solving the Halting Problem State the Halting Problem Give an input instance of the Halting Problem We saw last time that the Halting Problem is not solvable. How might we half-solve the Halting Problem?

3 3 Example Input Program P bool main(unsigned Q) { int i=2; if ((Q = = 0) || (Q= = 1)) return false; while (i<Q) { if (Q%i = = 0) return (false); i++; } return (true); } Nonnegative integer 4

4 4 Organization Universal Turing machine’s Memory Program P Program P’s Memory Program P bool main(unsigned Q) { int i=2; if ((Q = = 0) || (Q= = 1)) return false; while (i<Q) { if (Q%i = = 0) return (false); i++; } return (true); } Program Counter int i,Q; 4 Line 1

5 5 Description of universal Turing machine * Basic Loop –Find current line of program P –Execute current line of program P Update program P’s memory –Update program counter –Return to Top of Loop Program P Program P’s Memory Program Counter

6 6 Past, Present, Future Turing came up with the concept of a universal Turing machine in the 1930’s –This is well before the invention of the general purpose computer –People were still thinking of computing devices as special-purpose devices (calculators, etc.) –Turing helped move people beyond this narrow perspective Turing/Von Neumann perspective –Computers are general purpose/universal algorithms Focused on computation Stand-alone Today, we are moving beyond this view –Internet, world-wide web –However, results in Turing perspective still relevant

7 7 Debuggers How are debugger’s like gdb or ddd related to universal Turing machines? How do debuggers simplify the debugging process?

8 8 Placing the Halting Problem Solvable Half-solvable  ll Problems H

9 9 Summary Universal Turing machines –1930’s, Turing –Introduces general purpose computing concept –Not a super intelligent program, merely a precise follower of instructions Halting Problem half-solvable but not solvable


Download ppt "1 Module 8 Halting Problem revisited –Universal Turing machine half-solves halting problem –A universal Turing machine is an operating system/general purpose."

Similar presentations


Ads by Google