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: CS 2800 – Fall 2008 Homework #5 Solution Section 3.4 Problem 6 [4pts] By definition of the  operator, we have c = as and d = bt , for nonzero integers s, t . Multiplying these equations together, we have cd = ab ( st ), or ab  cd as desired. Problem 16 [4pts] Note that by definition, a mod b is a positive integer. This is of particular importance when computing the modulo of a negative number — it means that the quotient will often be one greater in magnitude than if we were simply dividing the number. (a) 17 = 2 · ( 9) + 1. Hence, 17 mod 2 = 1. (b) 144 = 7 · 20 + 4. Hence, 144 mod 7 = 4. (c) 101 = 13 · ( 8) + 3. Hence, 101 mod 13 = 3. (d) 199 = 19 · 10 + 9. Hence, 199 mod 19 = 9. Problem 22 [4pts] From a ≡ b (mod m ), we have a = mt + b for some integer t ≥ 0. Multiplying throughout by c (since c > 0), we have ac = mtc + bc = mc ( t ) + bc i.e. ac ≡ bc (mod mc ) as desired. Problem 24 [5pts] Since n is a positive odd integer, it can be written as 2 k +1 where k is a nonnegative integer. Then, we have n 2 = (2 k + 1) 2 = 4 k 2 + 4 k + 1 = 4 k ( k + 1) + 1. Since either k or k + 1 is even, 4 k ( k + 1) is divisible by 8 and therefore, 4 k ( k + 1) + 1 = n 2 ≡ 1 (mod 8). Section 3.5 Problem 14 [6pts] (a) 6 is perfect since 6 = 1 + 2 + 3. 28 is perfect since 28 = 1 + 2 + 4 + 7 + 14. 1 (b) Firstly, we observe that the factors of 2 p 1 (2 p 1) are of the form 2 k (2 p 1) a where a ∈ { , 1 } and 0 ≤ k ≤ p 1. Based on the value of a , we can view these factors as forming two different geometric series: • a = 0 : In this case, we get the factors 2 , 2 1 , . . . , 2 p 1 . The sum of these factors is 2 p 1....
View
Full
Document
This note was uploaded on 12/04/2008 for the course CS 2800 taught by Professor Selman during the Fall '07 term at Cornell.
 Fall '07
 SELMAN

Click to edit the document details