1
$\begingroup$

Using the same approach as of strassen's only 5 multiplications are sufficient to compute square of a matrix. A[2][2]=[a, b, c, d]. the multiplications are a* a, d* d, b(a+d), c(a+d), b*c.

If we generalise this algorithm for getting the square of a matrix. The complexity reduces to n^log5 with base 2.

I was asked a question to find what is wrong with this algorithm and when it fails?

I am not able to find a case where it fails. please help.

$\endgroup$
0
$\begingroup$

For matrix multiplication, commutative law does not holds anymore. Then you would have $$BA + DB$$ and $$AC + CD$$ instead, which cannot be simplified into two multiplications.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.