{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hmwk_1

hmwk_1 - 4 Halting Problem Suppose you are given a program...

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

Discrete Structures Aug 24 2011 Assignment 1: Due at beginning of class Wed, Sept 7 Prof. Hopcroft 1 Sets For each of the following, if possible, give 4 examples of elements from each set: a. { 0 i 1 | i N } b. S 1 = { 0 i 10 i +1 1 | i N } * c. S 2 = { 1 }{ 0 i 10 i +1 1 | i N }{ 0 } * { 1 } d. S 1 S 2 2 Rational Numbers 2.1 Prove each of the following: a. Every rational number is a terminating real or a repeating real number. b. The converse of ( a ): every terminating real number is rational and every repeating real number is a rational number. Hint: Prove that { 0 . 1 i 10 i 10 i · · · | i N } is rational and if a = bc and two of a, b, c are rational then the third is rational. c. An integer is either a perfect square or its square root is irrational. 3 Countability Is the collection of all finite subsets of integers countable?
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 4 Halting Problem Suppose you are given a program P that can be given input I . In some cases computing P on I may run forever (not halt). This can happen if P contains an inﬁnite loop. It would be nice to detect when this will happen for any given input I . Suppose you could write a computer program D does exactly that: D takes P and I as input and returns whether or not P will halt given I . Is this possible? If not why not? What contradiction would this lead to? Hint: Could you compute something that is not computable? 5 Diagonalization Is the class of subsets of integers countably inﬁnite? 1...
View Full Document

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern