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

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -