Processing math: 100%

Exercise 4.2-4

What is the largest k such that if you can multiply 3×3 matrices using k multiplications (not assuming commutativity of multiplication), then you can multiply n×n matrices in time o(nlg7)? What would the running time of this algorithm be?

This question is describing a form of the SQUARE-MATRIX-MULTIPLY-RECURSIVE algorithm that divides its input matrices into n/3×n/3 submatrices. This new algorithm is represented by the following recurrence:

T(n)=Θ(1)+27T(n/3)+Θ(n2)=27T(n/3)+Θ(n2)

Supposing we can use a strategy similar to Strassen’s wherein we perform k multiplications instead of 27, we would instead be looking at the recurrence:

T(n)=kT(n/3)+Θ(n2)

Which we can solve using the 1st case of the master theorem. Let a=k, b=3 and f(n)=n2. Then f(n)=O(nlog3kϵ) holds for 0<ϵlog3k2 where log3k>2. Therefore T(n)=Θ(nlog3k).

Via trial and error with graphing, the largest k such that log3k<log7 is 21.