Asymptotic Analysis & Recurrences


Answer & solution
Answer: D under a unit-cost RAM model (no official key was published)
1. Changing row-major to column-major storage changes the address formula, not the number of arithmetic operations or constant-time element accesses. Thus asymptotic running time for a fixed multiplication algorithm is independent of the layout, D.
2. For the usual i,j,k loop order, A-row-major/B-column-major can improve locality and elapsed time, but that is a cache-performance distinction rather than an asymptotic RAM-operation count.
3. Teaching check: For an r×c row-major array, address(i,j) uses ic+j; column-major uses jr+i. Both formulas take constant time under a unit-cost RAM model. Cache misses may differ dramatically, but that does not by itself alter a fixed algorithm’s asymptotic arithmetic/access count.