algorithm - What is the time complexity of finding the cube of a matrix? -
i know complexity of multiplying 2 matrices directly axb o(n^3). holds when trying find square of matrix, because means axa.
what complexity when trying find cube of matrix?
it o(n3)
why?
- you can calculate cube 2 matrix multiplications.
- doing matrix multiplication of square matrices not change n.
- doing 2 o(n3) operations in series o(n3).
see wikipedia formal definition.
Comments
Post a Comment