- Strassen algorithm
In the mathematical discipline of
linear algebra , the Strassen algorithm, named afterVolker Strassen , is analgorithm used formatrix multiplication . It is asymptotically faster than the standard matrix multiplication algorithm, but slower than the fastest known algorithm, and is useful in practice for large matrices.History
Volker Strassen published the Strassen algorithm in 1969. Although his algorithm is only slightly faster than the standard algorithm for matrix multiplication, he was the first to point out that
Gaussian elimination is not optimal. His paper started the search for even faster algorithms such as theCoppersmith–Winograd algorithm ofShmuel Winograd in 1980Dubious|Which Winograd algorithm? (which uses 7 binary multiplications, but 15 binary additions instead of 18 with the Strassen algorithm), and the more complexCoppersmith–Winograd algorithm published in 1987.Algorithm
Let "A", "B" be two square matrices over a ring "R". We want to calculate the matrix product "C" as
:
If the matrices "A", "B" are not of type 2n x 2n we fill the missing rows and columns with zeros.
We partition "A", "B" and "C" into equally sized block matrices:
with
:
then
::::
With this construction we have not reduced the number of multiplications. We still need 8 multiplications to calculate the "Ci,j" matrices, the same number of multiplications we need when using standard matrix multiplication.
Now comes the important part. We define new matrices
:::::::
which are then used to express the "C"i,j in terms of "M"k. Because of our definition of the "M"k we can eliminate one matrix multiplication and reduce the number of multiplications to 7 (one multiplication for each "M"k) and express the "C"i,j as
::::
We iterate this division process "n"-times until the
submatrices degenerate into numbers (group elements).Practical implementations of Strassen's algorithm switch to standard methods of matrix multiplication for small enough submatrices, for which they are more efficient. The particular crossover point for which Strassen's algorithm is more efficient depends on the specific implementation and hardware. It has been estimated that Strassen's algorithm is faster for matrices with widths from 32 to 128 for optimized implementations, [ [http://www2.toki.or.id/book/AlgDesignManual/BOOK/BOOK3/NODE138.HTM Matrix Multiplication notes] ] and 60,000 or more for basic implementations. [ [http://www.stanford.edu/~boyko/pubs/MatrixMult_SURJ_2004.pdf Ultra-Fast Matrix Multiplication] ]
Numerical analysis
The standard matrix multiplications takes :multiplications of the elements in the ring "R". We ignore the additions needed because, depending on "R", they can be much faster than the multiplications in computer implementations, especially if the sizes of the matrix entries exceed the
word size of the machine.With the Strassen algorithm we can reduce the number of multiplications to:.
The reduction in the number of multiplications however comes at the price of a somewhat reduced
numerical stability .See also
* Z-order matrix representation
References
* Strassen, Volker, "Gaussian Elimination is not Optimal", Numer. Math. 13, p. 354-356, 1969
*Thomas H. Cormen ,Charles E. Leiserson ,Ronald L. Rivest , andClifford Stein . "Introduction to Algorithms ", Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Chapter 28: Section 28.2: Strassen's algorithm for matrix multiplication, pp.735–741.External links
*MathWorld|urlname=StrassenFormulas|title=Strassen's Formulas (also includes formulas for fast
matrix inversion )
Wikimedia Foundation. 2010.