# Midterm2 - books remain to be put on the last shelf. On the...

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

CS 182 – Fall 2009 Name: Prof. Ananth Grama MIDTERM #2 This is an open book, open notes exam. However, you are not allowed to share any material with anyone else during the exam. Any evidence of academic dishonesty will be dealt with strictly in accordance with existing rules at Purdue University. The exam consists of 7 questions on the following 7 pages. Each question is worth 10 points. Problem Maximum Score 1 10 2 10 3 10 4 10 5 10 6 10 7 10 Total 70

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

View Full Document
PROBLEM 1 A pseudorandom numbers generator is using the following linear congruence ° ° +1 = 29 ° ° mod 13 . a. (6 pts) If the ﬁrst generated number is ° 1 = 4, what is the seed ° 0 ? b. (4 pts) Determine the sequence of pseudorandom numbers generated up to ° 5 . 2
PROBLEM 2 Express the gcd(116,164) as a linear combination of 116 and 164. Does the inverse of 164 mod 116 exist? 3

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

View Full Document
PROBLEM 3 Find all solutions of the congruence equation 31 ° 3 mod 17. 4
PROBLEM 4 You want to organize your books on shelves. When you put 5 books on each shelf, only 2

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

View Full Document

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.

Unformatted text preview: books remain to be put on the last shelf. On the other hand, the last shelf will only contain 1 book if you put 6 or 7 books on each of the other shelves with all shelves containing the same number of books. How many books do you have? 5 PROBLEM 5 a. (4 pts) Convert (23 . 875) 10 to binary. Show your work. b. (6 pts) Carry out the following operations in binary number system: i. (3 pts) 110001 . 01 − 1011 . 11. ii. (3 pts) 1111 × 10101. 6 PROBLEM 6 Using less than 8 divisions determine whether the number 293 is prime. Show your work. 7 PROBLEM 7 a. (5 pts) Use Fermat’s Little Theorem to ﬁnd 7 62 mod 13. b. (5 pts) Show that 1 ° + 2 ° + 3 ° + ⋅⋅⋅ + ( ° − 1) ° ≡ 0 mod ° for any prime ° > 2. ( Hint : ∑ ± ² =1 ± = ² ( ² + 1) / 2) 8...
View Full Document

## This note was uploaded on 03/26/2012 for the course STAT 350 taught by Professor Staff during the Spring '08 term at Purdue University.

### Page1 / 8

Midterm2 - books remain to be put on the last shelf. On the...

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

View Full Document
Ask a homework question - tutors are online