Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What does modular exponentiation represent?
Think about the operation with base, power, and modulus.
Describe the naive approach briefly.
What is the outcome after all multiplicative steps?
What is the result of 2^3 % 3?
Calculate the power first, then take the modulus.
The naive approach for modular exponentiation is efficient.
Consider the multiplication steps involved.
Compute 5^200 % 7 using both the naive method and the square and multiply method. Analyze the time taken for both methods.
What is the binary representation of `200`?
How many multiplications would you perform in the naive method for a^b % N where a = 12, b = 50, N = 13? Compare that with the tally from the square and multiply method.
Convert `50` to binary to see the trend!
4 more questions in this section. Enroll free to practise them all.
Enroll free