Cache Memory

Answer & solution
Official answer: A
Our answer: A requires strict A>k and an initially empty cache
1. Method and setup. LRU evicts a block after A other distinct blocks mapped to its set have been accessed. Therefore a guaranteed hit requires the intervening distinct-block count for that set to be strictly less than A. Counting one compulsory miss per distinct address is valid only after establishing that all subsequent references hit and that first references begin uncached.
2. Work through the result and its assumptions. An LRU hit requires fewer than A distinct intervening blocks mapping to the same set. The stated bound k suffices when A>k, but not at A=k. For example, let a direct-mapped cache have A=k=1 and let distinct x, y map to the same set. The sequence x, y, x, y has N=4, n=2 and one distinct intervening block on each reuse, yet all four accesses miss, giving 1 rather than n/N=1/2. Thus the official cold-miss-only answer A needs a strict inequality (or a reuse-distance definition including the reused block) and an initially empty cache.