Assignment 3 Prof. John MacDonald Spencer Frei February 6, 2014 1. 2.4.14, Applesauce. Given the APC 0 28500 11 070, the last digit can be found by first summing up the 3 × d1 + 1 × d2 + 3 × d3 + 1 × d4 + 3 × d5 + . . . , where di is the i-th digit. We have the sum 3(0)+1(2)+3(8)+1(5)+3(0)+1(0)+3(1)+1(1)+3(0)+1(7)+3(0) = 2+24+5+3+1+7 = 42 . Modulo ten, 42 ≡ 2 (mod 10), and since the UPC code requires that this sum plus the last digit must be equal to zero modulo 10, we need the last digit to be 8. 2. 2.4.25. Bank codes. A bank code is 011701398, and the following errors are undetected: 711001398, 011708391, To see why they are undetected, we recall that the bank code checking sum is computed by summing the digits times 7, 3, 9, 7, 3, 9, 7, 3, 9 and then considering the sum modulo ten and checking if it’s zero. For the original bank code, we check: 7(0)+3(1)+9(1)+7(7)+3(0)+9(1)+7(3)+3(9)+9(8) = 3+9+49+9+27+27+72 = 190 ≡ 0 (mod 10) . So the original code is good, while checking the first “bad” code gives 7(7)+3(1)+9(1)+7(0)+3(0)+9(1)+7(3)+3(9)+9(8) = 49+3+9+0+9+21+27+72 = 190 ≡ 0 (mod 10) . This code produces the same result since the 7 was switched, but still remains in a place where the appropriate factor in the checksum is still 7 (i.e., 7 × 7 still appears in the sum), and the 7 × 0 appears again at a later time. The second “bad” code is similar: we compute 7(0)+3(1)+9(1)+7(7)+3(0)+9(8)+7(3)+3(9)+9(1) = 0+3+9+49+0+72+21+27+9 = 190 ≡ 0 Again, this time we just switched the 1 and the 8 in the sum, but since we switched them in places three spots apart they still have the factor of 9 in the checksum and hence give the same total sum. 3. 2.4.27. What’s 2015 on a mod 7 clock? What is the remainder when 2015 is divided by 7? These are the exact same thing: notice that 2015 = 7 × 287 + 6, and so the remainder of 2015 when divided by 7 is exactly 6. For the modulo clock, think about removing every multiple of 7 from the number 2015: since 2015 = 7 × 287 + 6, we can remove 287 multiples of 7 from 2015 to get six left over on the clock. In fact, the “remainder of x when dividing by n” is the exact same thing as “the number x taken modulo n”. 1 (mod 10) . 4. 2.6.8. Check the rationality of the numbers: √ 4 20 √ , , 1.75, 9 3 5 Clearly 4 9 √ 2 , 14 3.14159 . is rational: we have already expressed the number as a ratio of two integers! And for 1.75, one can immediately recognize that it is 1 + For √ 20 √ , 3 5 3 4 = 74 . if the number is in fact rational, then we can write for some integers a, b ∈ Z, √ 20 a √ = , b 3 5 Squaring both sides, we get that or √ !2 a 2 20 √ = b 3 5 20 20 4 a2 20 = = = = . 32 (5) 9(5) 45 9 b2 We then see that, since 22 = 4 and 32 = 9, we can take ab = 23 , so that the number is rational. √ √ √ √ √ Another way to√ see this would be to write 20 = 4 × 5 = 4 × 5 = 2 5, then it is obvious √ √ 5 = 2 . This is easier but the other method is better for checking if a number is that 3√205 = 2× 3 3 5 even possibly rational first. √ 5. 2.6.10. Show that 5 is irrational. √ Well, if 5 were rational, then we would be able to write for some integers a, b ∈ Z, b 6= 0, that √ 5= a . b We can assume that we have already cancelled out all of the common factors of a and b above, since whenever we have a rational number we can always write it in this kind of form. (Think about having 6/8 or 10/25 or such). Now, squaring both sides gives that 5= a2 =⇒ 5b2 = a2 . b2 So, we have written that a2 is equal to another square times 5. Since a2 has a factor of 5, then a must also have a factor of 5 since 5 is a prime number, so if 5 divides a2 then 5 must also divide a. Since 5 is a factor of a, we can factor out 5 and get some integer c for which a = 5c. Substituting this into 5b2 = a2 , we get 5b2 = (5c)2 = 25c2 =⇒ b2 = 5c2 . But now we have shown that 5 is a factor of b2 ! This is the exact same situation as before. That is, since 5 is prime and divides b2 , 5 must also divide b, so that we can write for some integer d, b = 5d. But then we have a 5c = . b 5d And so √ we have a common factor between a and b, which contradicts our previous assumption. Thus 5 must be irrational. 2 6. 2.6.13. Show that √ 3+ √ 5 is irrational. √ √ By the last problem, √ √ we know 5 is irrational, and it was shown in the textbook that 3 is also irrational. If 3 + 5 is rational, then we can write for some integers a, b ∈ Z with no common factors √ √ a 3+ 5= . b Squaring gives √ √ √ √ √ √ a2 ( 3)2 + ( 5)2 + 2 3 5 = 8 + 2 3 5 = 2 . b But then we have written, rearranging, √ √ a2 a2 − 8b2 3 5= 2 −8= . b 2b2 √ √ √ √ √ So we have that 15 = 3 5 is a rational number,√if 3 + 5 is rational. This means there are some c, d ∈ Z with no common factors for which 15 = c/d, so that 15 = c2 /d2 =⇒ 15d2 = c2 . Since 3 and 5 are prime and divide c2 , by the same argument as before, we can get that 3 and 5 must divide c. Thus, we can write for some integer f ∈ Z, c = 15f , so that c2 = 152 f 2 . But then substituting this into 15d2 = c2 = 152 f 2 , we have written d2 = 15f 2 and hence d2 is divisible by 3 and 5, and by the same argument we get some integer g ∈ Z for which d = 15g. Then c 15f = , d 15g which is a contradiction √ √to the fact that c and d have no common factors. Thus, irrational. Thus, 3 + 5 must be irrational. √ 15 must be √ √2 √ 7. 2.6.29. Show that the number ( 2 ) 2 is rational. By the rule for raising exponents to another exponent, (ab )c = (a)b×c , we know that √ √ √2 √ √ √ √ ( 2) 2 = ( 2) 2× 2 = ( 2)2 = 2 . It’s mainly a matter of recognizing the rules of orders of operations (PEMDAS). 8. 2.7.16. Find the decimal expansion of 21.5/15. We multiply both sides by 2 to get a rational number first, so that our fraction is really 43 2 · 21.5 = . 2 · 15 30 Noting that 43 = 30 + 13, we get 30 13 13 43 = + =1+ . 30 30 30 30 Doing the long division, we bring down the zero and get 130/30: since 130 = 4 × 30 + 10, we then have ten leftover and bring down the zero to get 100/30: since 100 = 3 × 30 + 10, we again have ten leftover and bring down the zero to get 100/30. This process continues, so that by doing long division we get that 21.5 43 = = 1.43333 · · · . 30 15 3 9. 2.7.18. Express 20.4545 as a fraction. Notice the decimal is not repeating, so it’s rational. We can multiply 20.4545 by ten thousand over ten thousand to get 20.4545 = 10000 204545 40909 × 5 40909 11 × 3719 . × 20.4545 = = = = 4 10000 10000 5 × 2000 2000 2 × 53 10. 2.7.22. Express 5.63121212. . . as a fraction. We want to use the method they showed in the textbook: if we let M = 5.63121212 · · · , then we know that 100M = 563.12121212 · · · , and that 10000M = 56312.121212 · · · , so that 10000M − 100M = 9900M = 56312 − 563 = 55749 . So, we have that M= 4 55749 . 9900
© Copyright 2026 Paperzz