MIT6_042JS10_lec22_sol

# MIT6_042JS10_lec22_sol - Massachusetts Institute of...

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

6.042J/18.062J, Spring ’10 : Mathematics for Computer Science March 31 Prof. Albert R. Meyer revised March 30, 2010, 1434 minutes Solutions to In-Class Problems Week 8, Wed. Problem 1. (a) Use the Pulverizer to ﬁnd the inverse of 13 modulo 23 in the range { 1 ,..., 22 } . Solution. We ﬁrst use the Pulverizer to ﬁnd s,t such that gcd(23 , 13) = s 23 + t 13 , namely, · · 1 = 4 23 7 13 . · · This implies that 7 is an inverse of 13 modulo 23. Here is the Pulverizer calculation: x y rem( x,y ) = x q y · 23 13 10 = 23 13 13 10 3 = 13 10 = 13 (23 13) = ( 1) 23 + 2 13 · · 10 3 1 = 10 3 3 · = (23 13) 3 (( 1) 23 + 2 13)) · · · = 4 23 7 13 · · 3 1 0 = To get an inverse in the speciﬁed range, simply ﬁnd rem( 7 , 23) , namely 16 . (b) Use Fermat’s theorem to ﬁnd the inverse of 13 modulo 23 in the range { 1 ,..., 22 } . Solution. Since 23 is prime, Fermat’s theorem implies 13 23 2 13 1 (mod 23) and so rem(13 23 2 , 23) · is the inverse of 13 in the range

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 05/27/2011 for the course CS 6.042J taught by Professor Prof.albertr.meyer during the Spring '11 term at MIT.

### Page1 / 4

MIT6_042JS10_lec22_sol - Massachusetts Institute of...

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

View Full Document
Ask a homework question - tutors are online