Module08Worksheet - bool main(string x P’(5 if(x.length 2...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Module 8 Worksheet In Class Questions 1) (S5) A universal Turing machine is able to execute any program on any input. Which of the two following people is most like a universal Turing machine and why? Brilliant scientist Obedient soldier Take home review questions 1) What does a universal Turing machine do? 2) How was the concept of a universal Turing machine revolutionary? 3) How did we half-solve the Halting problem? 4) How are debuggers related to universal Turing machines? 5) On worksheets 5 and 6, you worked with the following program P.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bool main(string x) { P’(5); if ((x.length( ) % 2) = = 0) return (yes); else return(no); } bool P’(int y) { /* details hidden */ } Suppose you are given some program Q and an input y to program Q. You now want to create a program Q’ such that Q’ accepts the set of even length strings if and only if Q halts on input y. How would you create this input Q’? Could you write a program that takes any pair (Q,y) and produces Q’?...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online