This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Section 3.4 The integers and Division 69 SECTION 3.4 The Integers and Division 2. 10. 12. 14. 16. 18. 20. a) lla since (1210.. b) alt) since 02(10. . Suppose a l b, so that b 2 at for some t, and b I c, so that c 2 be for some 3. Then substituting the ﬁrst equation into the second, we obtain c 2 ((11):; 2 a(ts). This means that a  c, as desired. . Under the hypotheses, we have c 2 as and d 2 bit for some .5 and t. h’lultiplying we obtain cd 2 ab(st), which means that ab 1 ed, as desired. . The simplest counterexample is provided by a 2 4 and b 2 e 2 2. in each case we can carry out the arithmetic on a calculator. a) Since 8 ' 5 2 40 and 44 E 40 2 4, we have quotient 44 div 8 2 5 and remainder 44 mod 8 2 4. b) Since 21 37 2 777, we have quotient 777 div 21 2 37 and remainder 777 mod 21 2 0. c) As above, we can compute 123 div 1.9 2 6 and 123 mod 19 2 9. However, since the dividend is negative
and the remainder is nonzero, the quotient is 7(6 + 1) 2 —7 and the remainder is 19 E 9 2 10. To check that
—123 div 19 2 —7 and —123 mod 19 210, we note that —123 2 (—7)(10) + 10. (1) Since 1 div 23 2 0 and 1 mod 23 2 1, we have *1 div 23 2 —1 and —1 mod 23 2 22. e) Since 2002 div 8? 2 23 and 2002 mod 87 2 1, we have —2002 div 87 2 —24 and 2002 mod 87 2 86. 1') Clearly 0 div 1? 2 0 and 0 mod 17 2 0. g) We have 1234567 div 1001 2 1233 and 1234567 mod 1001 2 334. h) Since 100 div 101 2 0 and 100 mod 101 2 100, we have —100 div 101 2 —1 and —100 mod 101 2 1. Assume that a E 0 (mod m). This means that. m  a — 1), say a. — b 2 me, so that a 2 b i— inc. Now let us
compute a mod m. We know that b 2 qm +7' for some nonnegative '3" less than in (namely, 1' 2 1) mod in Therefore we. can write a 2 gm + r + me 2 (q + c)m + I". By definition this means that 7" must also equal
a mod m. That is what we wanted to prove. By Theorem 2 we have a 2 (it; 4 r with 0 S r < d. Dividing the equation by d we obtain n/d = q + ('r/d),
with 0 S (r/d) < 1. Thus by ('leﬁnition it is clear that q is La/(ij. The original equation shows, of course,
that r 2 a. — dq, proving the second of the original statements. In each case we just apply the division algorithm (carry out the division) to obtain the quotient and remainder,
as in elementary school. However, if the dividend is negative, we must make sure to make the remainder
positive, which may involve a quotient 1 less than might be expected. a) Since E17 2 2(41) + 1, the remainder is 1. That is, El? mod 2 2 1.
—17 22(EQ)E1, so 717 mod 27% —1. b) Since 144 2 7  20 + 4, the remainder is 4. That is, 144 mod 7 2 4. c) Since 7101 2 13 (8) + 3, the remainder is 3. That is, ~101 mod 13 2 3. Note that we do not write
—101 2 l3  (—7) — 10; we can‘t have E101 mod 13 2 ~10, because a mod 1) is always nonnegative. (1) Since 1.09 2 19  10 + 9, the remainder is 9. That. is, 199 mod 19 2 9. Note that we do not write Among the infinite set of correct answers are 4, 16, —8, 1204, and ~70103b'0. Subtracting, we From a E b {mod T11) we know that b 2 a 4» sm for some integer .3. Similarly, d 2 r: 4» tin.
have b — d 2 (a — c) —l— (s E t)m, which means that e. E c E b E d. (mod m). TO 22. 24. 26. 28. 30. 32. 34. Chapter 3 The Fundamentais: Algorithms, the Integers, and iliatr'ices
Fi'orn a E b (mod :01) we know that b 2 a+sm for some integer s. Multiplying by c we have be 2 ac+s(mc), which means that ac E be (mod mc) . Write it 2 2!; + l for some integer h. Then 712 2 (2!: + 1)2 2 £1162 + 4]: + 1 2 4H}: + 1) + 1. Since either It or k + 1 is even, 433(k + 1) is a multiple of 8. Therefore 112 — l is a multiple of 8, so n2 E (mod 8). In each case we need to compute k mod 101 by dividing by 101 and ﬁnding the remainders. This can be
done with a calculator that keeps 13 digits of accuracy internally. Just divide the number by 101. subtract
off the integer part of the answer, and multiply the fraction that remains by 101. The result will be almost
exactly an integer, and that integer is the answer. a) 58 b) 60 c) 52 d) 3 We just calculate using the formula. We are given .130 2 3. Then an 2 (4  3 + 1) mod 7 2 13 mod 7 2 6;
2:3 2 (4  6 +1) mod 7 2 25 mod 7 2 4; 3113 2 (44 + 1) mod 7 217 mod 7 2 3. At this point the sequence
must continue to repeat 3, (i, 4, 3, 6, 4, forever. we assume that the input to this procedure consists of a modulus (in 2 2), a multiplier (11), an increment
(c), a seed (2:0), and the number (n) of pseudorandoni numbers desired. The output will be the sequence
{331‘}
procedure pseudomndam(m, a,c, 330, n : nonnegative integers)
for i :2 1 to n
1', :2 (0.3314 + 0) mod m. We just need to “subtract 3” from each letter. For example, E goes down to B, and [3 goes down to Y.
a) BLUE JEANS b) TEST TODAY (3) EAT DIM SUM We know that 10+23+3'2+41+52+6v3+7Q+80+97+102 E 0 (mod 11). This
simpliﬁes to 127 + 762 E 0 (mod 11). We subtract 127 from both sides and simplify to 762 E 5 (mod 11),
since —127 2 212 ' 11 + 5. It is now a simple matter to use trial and error (or the methods to be introduced
in Section 3.7) to ﬁnd that Q 2 7 (since 49 E 5 (mod 11)). ...
View
Full Document
 Spring '09
 Ming

Click to edit the document details