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.
12.1.6. Primality Testing Algorithms
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
3 cards from this lesson. Good the night before a test.
Try these first
- 1.
What does Fermat's Little Theorem state for prime
p?Hint
Think about the relationship between primes and modular arithmetic.
- 2.
Provide an example of a Carmichael number.
Hint
Carmichael numbers are always composite.
- 3.
According to Fermat's Little Theorem, if
pis prime andais coprime top, what is true?- `a^p ≡ 0 mod p`
- `a^(p-1) ≡ 1 mod p`
- `p^a ≡ a mod p`
Hint
Recall the main statement of the theorem.
- 4.
Are Carmichael numbers always prime?
- True
- False
Hint
Think of their definition and characteristics.
- 5.
Prove that
341is a Carmichael number using Fermat's test for a random base.Hint
Pick bases carefully that are less than `341`.
- 6.
Create a detailed algorithm that efficiently uses Fermat's theorem to compute
a^b mod p, explaining each step.Hint
Think about employing the divide-and-conquer strategy!
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 freeQuiz
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
1 more question available
Enrol freeChallenge 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