Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem | Binary exponentiation Recall the exponentiation algorithm given in class for evaluating a n (mod m) (a Z, m,n N): 1. Compute the binary

Problem | Binary exponentiation Recall the exponentiation algorithm given in class for evaluating an (mod m) (a image text in transcribed Z, m,n image text in transcribed N):

1. Compute the binary representation of n: n = b0 2k + b1 2k-1 + ... + bk-1 2 + bk , with b0 = 1, i image text in transcribed {0, 1} for 1 image text in transcribed i image text in transcribed k, and k = image text in transcribed 2. Initialize r0 image text in transcribed a (mod m).

3. For 0 image text in transcribed i image text in transcribed k -1 compute image text in transcribed

4. Output rk.

(a) To warm up with a toy example, compute 1711 (mod 77) using the procedure above; answers that don't use the binary exponentiation algorithm will receive no credit, even if they are correct. Show all your work, and write down all your intermediate quanti- ties bi and ri. Your answer should be an integer between 0 and 76.

(b) In this problem, you will formally prove that the binary exponentiation algorithm is correct.

i. Define s0 = 1 and si+1 = 2si + bi+1 for 0 image text in transcribed i image text in transcribed k -1. Use induction on i to prove that image text in transcribed ii. (4 marks) Let ri , 0 image text in transcribed i image text in transcribed k, be defined as in steps 2 and 3 of the exponentiation algorithm. Use induction on i to prove that ri image text in transcribed asi (mod m) for 0 image text in transcribed i image text in transcribed k.

iii. (2 marks) Prove that an image text in transcribed rk (mod m), so the algorithm above does indeed compute an (mod m) as claimed.

Note: Sorry for the confusion. I have updated the questions. Hopefully, you can see them clearly now. Thanks.

Transcribed image text

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions