{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
PROBLEM 1 A pseudorandom numbers generator is using the following linear congruence 𝑥 𝑛 +1 = 29 𝑥 𝑛 mod 13 . a. (6 pts) If the first generated number is 𝑥 1 = 4, what is the seed 𝑥 0 ? b. (4 pts) Determine the sequence of pseudorandom numbers generated up to 𝑥 5 . 2
Image of page 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
Image of page 3

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

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

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

View Full Document Right Arrow Icon
Image of page 6
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
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 find 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern