hw9 - b p = a p b p modulo p Problem 3 At some point long...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science 340 Reasoning about Computation Homework 9 Due at the beginning of class on Wednesday, November 28, 2007 Problem 1 Consider the following computational problem: Given N, a, b, x, y , where N 1 is prime, a, b, x, y are integers between 1 and N - 1, compute a x b y (mod N ). 1. Describe an algorithm that takes at most 4 k + C multiplications, where k = log N and C is a positive constant. 2. Design an algorithm that uses at most 2 k + C multiplications, for some constant C . Problem 2 A common form of Fermat’s theorem is: a p = a (mod p ), for any prime p and integer a . Prove this by induction on a . (Hint: prove that (
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b ) p = a p + b p modulo p ). Problem 3 At some point, long ago, people seeking prime numbers had hoped that many integers of the form 2 n-1 (so-called Mersenne numbers) would be prime. It’s true for n = 2 , 3 but not n = 4. Prove that if n > 2 is not a prime number then 2 n-1 is not a prime either. Problem 4 Consider the Fibonacci numbers: F = 0, F 1 = 1, F n = F n-1 + F n-2 , for n > 1. Show how to compute F n using only O (log n ) additions and multiplications. (Hint: express the recurrence as a two-by-two matrix.)...
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