Recall & Review
beginner
What is the main idea behind the Sieve of Eratosthenes?
It is a method to find all prime numbers up to a certain limit by repeatedly marking the multiples of each prime number starting from 2.
Click to reveal answer
intermediate
Why do we start marking multiples from the square of the current prime in the Sieve of Eratosthenes?
Because all smaller multiples of the prime have already been marked by smaller primes, so starting from the square avoids redundant work.
Click to reveal answer
beginner
In the Sieve of Eratosthenes, what data structure is commonly used to keep track of prime candidates?
A list or array of boolean values where each index represents a number and the value indicates if it is prime (True) or not (False).
Click to reveal answer
intermediate
What is the time complexity of the Sieve of Eratosthenes algorithm?
The time complexity is approximately O(n log log n), which is efficient for finding primes up to large numbers.
Click to reveal answer
beginner
How does the Sieve of Eratosthenes differ from checking primality by trial division?
The sieve finds all primes up to a limit at once by marking multiples, while trial division checks each number individually by dividing by smaller numbers.
Click to reveal answer
What number do you start with when using the Sieve of Eratosthenes to find primes?
✗ Incorrect
The sieve starts from 2, the smallest prime number.
When marking multiples of a prime p, from which number should you start marking?
✗ Incorrect
Start marking from p squared to avoid marking multiples already handled by smaller primes.
What does a True value in the sieve's boolean list represent?
✗ Incorrect
True means the number is still considered prime.
Which of these is NOT a step in the Sieve of Eratosthenes?
✗ Incorrect
The sieve does not check divisibility individually; it marks multiples instead.
What is the main advantage of the Sieve of Eratosthenes over checking each number individually?
✗ Incorrect
The sieve efficiently finds all primes up to a limit by marking multiples.
Explain how the Sieve of Eratosthenes algorithm finds all prime numbers up to a given number.
Think about crossing out multiples step by step.
You got /5 concepts.
Describe why the Sieve of Eratosthenes is more efficient than checking each number's primality by dividing by smaller numbers.
Focus on how the sieve reduces repeated work.
You got /4 concepts.