Questions: External Memory Algorithms

4 questions to test your understanding

Score: 0 / 4
Question 1 Multiple Choice

External memory merge sort creates sorted runs of size M (filling RAM), then merges M/B runs at a time. Why is the number of merge passes Theta(log_{M/B}(N/M)), yielding total I/O cost Theta((N/B) * log_{M/B}(N/B))?

AEach merge pass reads all N/B blocks and writes N/B blocks, so costs 2N/B I/Os. With M/B-way merging, the number of runs decreases by factor M/B each pass. Starting from N/M runs, log_{M/B}(N/M) passes suffice. Since log_{M/B}(N/M) = log_{M/B}(N/B) - 1 + log_{M/B}(B/M) ≈ log_{M/B}(N/B), total I/O is Theta((N/B) * log_{M/B}(N/B))
BEach pass halves the number of runs, giving O(log_2 N) passes
CThe I/O cost is N * log N / B because each comparison costs one I/O
DExternal sort always requires N^2/B I/Os
Question 2 True / False

In the external memory model, scanning N consecutive elements costs N/B I/Os while accessing N random elements costs N I/Os. This N/B vs N gap is the fundamental reason external memory algorithms differ from RAM algorithms.

TTrue
FFalse
Question 3 Short Answer

Explain why the external memory sorting lower bound Omega((N/B) * log_{M/B}(N/B)) cannot be achieved by comparison-based RAM sorting algorithms without explicit I/O optimization.

Think about your answer, then reveal below.
Question 4 True / False

The external memory model requires algorithms to explicitly manage block transfers between memory levels. The cache-oblivious model removes this requirement.

TTrue
FFalse