Module08 - Module 8 • Halting Problem revisited –...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Module 8 Halting Problem revisited Universal Turing machine half-solves halting problem A universal Turing machine is an operating system/general purpose computer
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
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?
Background image of page 2
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
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
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
Background image of page 4
Description of universal Turing machine * Basic Loop Find current line of program P Execute current line of program P Update program P’s memory
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

Module08 - Module 8 • Halting Problem revisited –...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online