{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Module07Worksheet

Module07Worksheet - 3 In the number of languages proof from...

This preview shows pages 1–2. Sign up to view the full content.

Module 7 Worksheet In Class Questions 1) (S3) Is the input a yes or no input instance to the halting problem? 2) (S3) Can you change the input x so that the input changes from yes to no or no to yes? 3) (S5) What is the earliest element of list L that is a legal program that takes as input one unsigned integer? 4) (S6) What would P H return on the input on slide 3? 5) (S6) Is there an input that will cause P H to infinite loop? 6) (S8) Assuming P H exists, does D exist as a well-formed program? 7) (S10) What needs to be proven to show that H is unsolvable? 8) (S13) Is it possible for two different rows to be completely identical? Why or why not? 9) (S14) In the example, which numbers distinguish B from the behavior of P 0 ? Which numbers distinguish B from the behavior of P 1 ? 10) (S25) Do these implications make sense? Why or why not?

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

View Full Document
Take home review questions 1) Define the halting problem and argue it is a fundamental program behavior problem. 2) How many C++ programs are there and why?
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3) In the number of languages proof from module 5, we used diagonalization to produce a language that was not on the list. In the halting problem proof of module 7, we used diagonalization to produce ??? 4) Is it true that we are trying to make program D behave differently on input y than program P H behaves on input y? Explain. 5) bool main(unsigned y) { program P = generate(y); if (P H (P,y)) while (1>0); else return(yes); } program generate(unsigned y) /* generates yth program in Σ P * */ bool P H (program P, unsigned y) /* solves Halting problem */ Describe in words what this program D does on input 5. 6) Suppose we try to prove that the Rejecting problem, defined below, is unsolvable. Will the given program D from problem 5 (replacing P H with P R ) still be guaranteed to be different than any program P? Explain why or why not. Input: program P, unsigned y Y/N question: Does P reject input y?...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

Module07Worksheet - 3 In the number of languages proof from...

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

View Full Document
Ask a homework question - tutors are online