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

前端 未结 6 1320
礼貌的吻别
礼貌的吻别 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条回答
  •  梦毁少年i
    2021-02-08 03:12

    Short answer: No

    Long answer: There are ways if you have special kinds of matricies (for instance a diagonal matrix). The better matrix multiplication algorithms out there can pare you down to something like O(n2.4) (http://en.wikipedia.org/wiki/Coppersmith-Winograd_algorithm). The major one I am somewhat familiar with uses a divide and conquer algorithm to split up the workload (not the one I linked to).

    I hope this helps!

提交回复
热议问题