Strassen algoritmasında matris seçiminin arkasındaki daha büyük resim


17

Strassen algoritmada, iki matris çarpımını hesaplamak için ve B , matrisler bir ve B ayrılır 2 × 2 blok matrisler ve algoritma yinelemeli işlem oluşan gelirler 7 naif karşı blok matris-matris ürünleri 8 blok matris matris ürünleri, yani C = A B istiyorsak , burada A = [ A 1 , 1 A 1 , 2 A 2 , 1 A 2 , 2ABAB2x278C=birB o zaman var 1 , 1 = A 1 , 1 B 1 , 1 + A 1

A=[A1,1A1,2A2,1A2,2] , B=[B1,1B1,2B2,1B2,2] , C=[C1,1C1,2C2,1C2,2]
gerektirir8çarpma. Bunun yerine Strassen'de M 1 hesaplıyoruz :=( A 1 , 1 + A 2 , 2 )( B 1 , 1 + B 2 , 2 )
C1,1=A1,1B1,1+A1,2B2,1C1,2=bir1,1B1,2+bir1,2B2,2C2,1=bir2,1B1,1+bir2,2B2,1C2,2=bir2,1B1,2+bir2,2B2,2
8
M1:=(A1,1+A2,2)(B1,1+B2,2)M2:=(A2,1+A2,2)B1,1M3:=A1,1(B1,2B2,2)M4:=A2,2(B2,1B1,1)M5:=(A1,1+A1,2)B2,2M6:=(A2,1A1,1)(B1,1+B1,2)M7:=(A1,2A2,2)(B2,1+B2,2)
and obtain Ci,j's using Mk's as
C1,1=M1+M4M5+M7C1,2=M3+M5C2,1=M2+M4C2,2=M1M2+M3+M6
However, the choice of the matrices Mk's seem arbitrary to me. Is there a bigger picture as to why we choose these specific products of sub-matrices of A and B? Also, I would expect Mk's to involve Ai,j's and Bi,j's in a symmetric fashion, which does not seem to be the case here. For instance, we have M2:=(A2,1+A2,2)B1,1. I would expect its counterpart say A1,1(B1,2+B2,2) also to be computed. However, it is not since it can be obtained from other Mk's.

I would appreciate if someone could throw some light on this.

Yanıtlar:


15

De Groote (On Varieties of Optimal Algorithms for the Computation of Bilinear Mappings. II. Optimal Algorithms for 2x2-Matrix Multiplication. Theor. Comput. Sci. 7: 127-148, 1978) proves that there is only one algorithm to multiply 2×2-matrices with 7 multiplications up to equivalence. This might be a unique feature of 2×2-matrix multiplication. (Note: You will find different variants of Strassen's algorithm in the literature. They are all equivalent with the right notion of equivalence.)

If you now start to prove a lower bound for 2×2-matrix multiplication - see the book by Bürgisser, Clausen, and Shokrollahi how to do that - then Strassen's algorithm or some variant shows up quite naturally. You will find out a lot of identities that determine how the products look like. Then you can finish by some guessing. (De Groote's proof shows that even guessing is not necessary.)

Schönhage once told me that Strassen once told him that he found his algorithm in this way, by trying to prove a lower bound.


11

There is some sort of explanation in the book Algebraic Complexity Theory by Bürgisser, Clausen and Shokrollahi (p. 11-12). The idea is to start with two bases A0,A1,A2,A3 and B0,B1,B2,B3 of the space of 2×2 real matrices which satisfy the following property: AiBj{0,A0,A1,A2,A3,B0,B1,B2,B3}. Furthermore, A0=B0. To multiply two matrices A and B, represent each of them in the corresponding basis, and evaluate the product. Since only seven different non-zero matrices appear in the result (A0=B0,A1,A2,A3,B1,B2,B3), only seven products are needed. The M matrices are just these bases.

I don't know whether Strassen came up with this way of looking at it. Considering other identities underlying fast matrix multiplication algorithms, it's not clear whether there's anything deep going on, under than some formula working out. We've been through that before - Lagrange used the four square identity (which had been known before) to prove the four square theorem. At first it must have been just a curious algebraic identity, but now we know that it states the multiplicativity property of quaternion norm. Given the current state of knowledge, it is hard to tell whether the above interpretation is as productive.


3
Such bases are called an M-pair, see the chapter on algebras of minimal rank in the book by Bürgisser, Clausen, and Shokrollahi. I think it is quite hard to come up with the idea that M-pairs exist without knowing the Alder-Strassen theorem (see again the book above). In particular, 2×2-matrices are the only matrix algebra for which an M-pair exists.
Markus Bläser
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.