hw3_solutions - Comp201: Discrete Computational Structures...

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

View Full Document Right Arrow Icon
Comp201: Discrete Computational Structures Fall Term, 2010 Homework 3: Solutions 1 Answers for Section 3.7 3.7.10 We will use proof by contradiction and assume that x is an inverse of a modulo m , i.e., ax 1 (mod m ). Then by definition of modular congruence, ax - 1 = tm for some integer t . If a and m in this equation both have a common divisor greater than 1, then 1 must also have this same common divisor since 1 = ax - tm . This is not possible because the only positive divisor of 1 is 1. Therefore, this is a contradiction and no such x exists. 3.7.12 By only one iteration of Euclidean algorithm, 17 = 8 · 2 + 1, we find gcd(17,2) which is equal to 1. Thus inverse of 2 in modulo 17 exists. In order to find the inverse, reversing the steps of Euclidean algorithm, we have to write 1 as a linear combination of 2 and 17. Easily we get 1 = - 8 · 2 + 1 · 17. Thus -8 is an inverse and so is 9 in modulo 17. To solve the congruence, we use this inverse. Multiplying both sides of the equation by 9, we will get x 9 · 7 (mod 17). 9 · 7 63 12 (mod 17), so the solutions to this congruence are all integers congruent to 12 (mod 17), which are { ..., - 22 , - 5 , 12 , 29 ,... } . 3.7.28 a) By Fermat’s Little Theorem we know that 3 4 1 (mod 5); therefore 3 300 = (3 4 ) 75 1 75 1 (mod 5), and so 3 302 = 3 2 · 3 300 9 · 1 = 9 (mod 5), so 3 302 mod 5 = 4. Similarly, 3 6 1 (mod 7); therefore, 3 300 = (3 6 ) 50 1 (mod 5), and so 3 302 = 3 2 · 3 300 9 (mod 7), so 3 302 mod 7 = 2. Finally, 3 10 1 (mod 11); therefore, 3 300 = (3 10 ) 30 1 (mod 11), and so 3 302 = 3 2 · 3 300 9 (mod 11), so 3 302 mod 11 = 2. b) Since 3 302 is congruent to 9 modulo 5, 7, and 11, it is also congruent to 9 modulo 385 by Chinese Remainder Theorem. 3.7.46 Translating the letters into numbers we have 0019 1900 0210. Thus we need to compute C = M 13 mod(2537) for M 1 = 19, M 2 = 1900 and M 3 = 210. For the calculations, the fast modular exponentiation algorithm and Chinese Remainder Theorem will be used. Fast Modular Exponentiation Algorithm: We have four variables: x is the base, e is the exponent and n is the modular base. The variable y is initially set to 1. For example for C 1 = 19 13 mod(43); x = 19, e = 13 and n = 43. The algorithm is as follows:
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

hw3_solutions - Comp201: Discrete Computational Structures...

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

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