This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Discrete Structures Sept 7, 2011 Assignment 1 Solutions: Prof. Hopcroft The homework was graded out of 100 points, with 20 points to each problem. 1 Sets Each subsection was worth 5 points. For each of the following, if possible, give 4 examples of elements from each set: a. { i 1  i N } 1 01 001 0001 b. S 1 = { i 10 i +1 1  i N } * 101 01001 0010001 10101001 c. S 2 = { 1 }{ i 10 i +1 1  i N }{ } * { 1 } 1010011 10010001001 1000100001000000001 11011 d. S 1 S 2 1010010001 Note: that is the only element in the intersection. Not even the empty string is in the intersection. 2 Rational Numbers Each section was worth 6 points, with 2 points given for making an attempt on the problems. Prove each of the following: a. Every rational number is a terminating real or a repeating real number. +2 for an answer that address the problem, +2 for mentioning long division, +2 for correctness 1 Proof. Let t be a rational number, then t = p q , where p and q are integers. If p > q , then as a real number t = x.y . Now for this proof we are only interested in whether or not y is terminating or repeating. Hence, we can use t = t x and only consider t . We can do this because t = 0 .y and if t is a terminating or repeating real number then t is as well. The proof that t is a terminating or repeating real! We note that t is a rational number and can be written as t = n m for integers n < m . To write t as a real number we can perform long division! Long division is a recursive process and involves carrying a remainder at each stage. This remainder must be an integer less than m (or we did long division incorrectly)! Also if we ever see the same remainder, the long division process will just repeat itself and produce a repeating real number. Hence either the long division process ends within m steps and produces a terminating real or sees a duplicate remainder and produces a repeating real!...
View Full
Document
 '07
 SELMAN

Click to edit the document details