Is there any method for multiplying matrices having O(n) complexity?

前端 未结 6 1319
礼貌的吻别
礼貌的吻别 2021-02-08 02:45

I want to multiply two matrices but the triple loop has O(n3) complexity. Is there any algorithm in dynamic programming to multiply two matrices with O(n) complexity?

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-08 03:27

    Matrices have O(n2) elements, and every element must be considered at least once for the result, so there is no possible way for a matrix multiplication algorithm to run in less than O(n2) operations.

提交回复
热议问题