Recursion in Strassen's Algorithm

纵然是瞬间 提交于 2019-12-22 18:37:17

问题


I'm wondering how you would make the recursive calls in Strassen's algorithm, and where exactly they're required.

I understand that the 7 multipliers is more efficient than the 8 we would have otherwise, but I'm confused as to how these multipliers are calculated recursively. In particular, if we are following the divide and conquer paradigm, exactly which part of the matrices are we "dividing" and how are we going about doing that until we get to a base case in which we can conquer the recursive parts separately?

Thank you!


回答1:


We make recursive calls while calculating these 7 multipliers. At first we extend the size of the matrices to the power of 2 and then on each step we divide the each matrix into 4 pieces.




回答2:


We divide A and B evenly into quarters or sixteenths or sixty-fourths etc in order to reduce them to 2x2 matrices. Strassen's method can only be applied to matrices of type 2^n x 2^n.

For matrices not of type 2^n x 2^n you can zero pad until the requirement is met.



来源:https://stackoverflow.com/questions/11838838/recursion-in-strassens-algorithm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!