Questions: Cache-Oblivious Algorithms

4 questions to test your understanding

Score: 0 / 4
Question 1 Multiple Choice

The van Emde Boas (vEB) layout stores a complete binary tree so that a root-to-leaf search touches O(log_B N) cache blocks, matching B-trees. How does it achieve this without knowing B?

AIt stores the tree in BFS order, which naturally groups nearby levels into blocks
BIt recursively splits the tree at height h/2: the top subtree of height h/2 and all bottom subtrees of height h/2 are each stored contiguously. At the recursion level where subtree size ≈ B, each subtree fits in one block, and a root-to-leaf path crosses O(log N / log B) = O(log_B N) such subtrees
CIt randomizes the tree layout so that on average each block contains useful nodes
DIt stores the tree in DFS order, which optimizes for sequential access
Question 2 True / False

Cache-oblivious algorithms assume an ideal (optimal offline) cache replacement policy. In practice, LRU provides a constant-factor simulation of the optimal policy.

TTrue
FFalse
Question 3 Short Answer

Explain why standard (RAM-model) mergesort is NOT cache-oblivious optimal, and how funnelsort achieves cache-oblivious optimality.

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

A cache-oblivious algorithm that is optimal for a two-level memory hierarchy (cache + main memory) is automatically optimal for all levels of a multi-level hierarchy.

TTrue
FFalse