C__Documents_and_Settings_raghu_Desktop_CS_2800_hw5_hw5-soln

C__Documents_and_Settings_raghu_Desktop_CS_2800_hw5_hw5-soln...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 non-zero 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 non-negative 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.

Page1 / 4

C__Documents_and_Settings_raghu_Desktop_CS_2800_hw5_hw5-soln...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online