AllRounder.ai
Chapters in this course

Enrol to start learning

Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.

Enrol free

7.5.3. Modular Exponentiation

  • This section

    Practice test

    12 questions on this section. Wrong answers show you what to read again.

    Sign up to take it
  • Whole chapter

    Revision test

    Mixed questions from across the chapter. Your answers get marked.

    Sign up to take it
  • Quick

    Flashcard drill

    2 cards from this lesson. Good the night before a test.

Try these first

  1. 1.

    What is 7 mod 3?

    Hint

    Think about how many times 3 fits into 7.

  2. 2.

    Is 10 ≡ 4 mod 6 true or false?

    Hint

    Calculate both `10 mod 6` and `4 mod 6`.

  3. 3.

    What is the result of 9 mod 4?

    • 1
    • 2
    • 3
    Hint

    Consider how many times 4 fits into 9.

  4. 4.

    Is the operation a / b well-defined in modular arithmetic?

    • True
    • False
    Hint

    Recall our discussion on modular operations!

  5. 5.

    Given a = 3, b = 20, and N = 5, compute 3^20 mod 5 using the square and multiply method.

    Hint

    Break down your steps and check accumulated powers.

  6. 6.

    Design an algorithm to compute mod 2^n efficiently given an n-bit integer.

    Hint

    Focus on which bits are `1` in your binary number.

Exercises

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

4 more questions available

Enrol free

Quiz

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

2 more questions available

Enrol free

Challenge Problems

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting