Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. Algorithme de Strassen — Wikipédia
Algorithme de Strassen — Wikipédia 👆 Click Here! Read More..
Un article de Wikipédia, l'encyclopédie libre.
Algorithme de Strassen où sont représentées les matrices Ci,j ainsi que les 7 nouvelles matrices Mi

En mathématiques, plus précisément en algèbre linéaire, l’algorithme de Strassen est un algorithme calculant le produit de deux matrices carrées de taille n, proposé par Volker Strassen en 1969[1]. La complexité de l'algorithme est en O ( n 2 , 807 ) {\displaystyle O(n^{2,807})} {\displaystyle O(n^{2,807})}, avec pour la première fois un exposant inférieur à celui de la multiplication naïve qui est en O ( n 3 ) {\displaystyle O(n^{3})} {\displaystyle O(n^{3})}. Par contre, il a l'inconvénient de ne pas être stable numériquement[2].

Histoire

[modifier | modifier le code]

L'algorithme de Strassen est le premier algorithme de multiplication de matrices n × n {\displaystyle n\times n} {\displaystyle n\times n} demandant asymptotiquement un nombre d'opérations arithmétiques (additions et multiplications) inférieur à O ( n 3 ) {\displaystyle O(n^{3})} {\displaystyle O(n^{3})}. Ce n'est cependant pas le premier algorithme « plus rapide » que l'algorithme naïf : Shmuel Winograd avait donné en 1967[réf. nécessaire] un algorithme demandant environ n 3 / 2 {\displaystyle n^{3}/2} {\displaystyle n^{3}/2} multiplications dans le cas de matrices à coefficients dans un anneau commutatif, contre n 3 {\displaystyle n^{3}} {\displaystyle n^{3}} environ pour l'algorithme naïf ; mais on ignorait s'il était possible de multiplier des matrices en complexité sous-cubique.

De surcroît, l'article de Strassen montre comment utiliser l'algorithme rapide de multiplication pour calculer l'inverse d'une matrice avec la même borne de complexité. Il prouve ainsi que l'algorithme usuel du pivot de Gauss n'est pas optimal.

Le travail de Strassen a ouvert un champ de recherche important en informatique théorique. La question centrale dans ce domaine est de savoir s'il est possible de multiplier deux matrices n × n {\displaystyle n\times n} {\displaystyle n\times n} en O ( n ω ) {\displaystyle O(n^{\omega })} {\displaystyle O(n^{\omega })} opérations pour ω {\displaystyle \omega } {\displaystyle \omega } arbitrairement proche de  2 {\displaystyle 2} {\displaystyle 2}. Parmi les résultats importants qui suivront, on peut citer notamment l'algorithme de Coppersmith-Winograd (1987), dont la complexité O ( n 2 , 376 ) {\displaystyle O(n^{2,376})} {\displaystyle O(n^{2,376})} est longtemps restée la meilleure connue.

Description de l'algorithme

[modifier | modifier le code]
Article détaillé : Complexité de la multiplication de matrices.

Soit R un anneau unitaire et soient A et B des matrices carrées de taille n dont les coefficients sont éléments de l'ensemble sous-jacent à R. Pour des raisons de simplicité, on traite le cas où n est une puissance de 2. On peut toujours se ramener à ce cas en rajoutant éventuellement des colonnes et des lignes de zéros. L'algorithme de Strassen permet de calculer la matrice produit C.

Les trois matrices A, B et C sont divisées en matrices par blocs de taille égale :

A = [ A 1 , 1 A 1 , 2 A 2 , 1 A 2 , 2 ]  ,  B = [ B 1 , 1 B 1 , 2 B 2 , 1 B 2 , 2 ]  ,  C = [ C 1 , 1 C 1 , 2 C 2 , 1 C 2 , 2 ] {\displaystyle \mathbf {A} ={\begin{bmatrix}\mathbf {A} _{1,1}&\mathbf {A} _{1,2}\\\mathbf {A} _{2,1}&\mathbf {A} _{2,2}\end{bmatrix}}{\mbox{ , }}\mathbf {B} ={\begin{bmatrix}\mathbf {B} _{1,1}&\mathbf {B} _{1,2}\\\mathbf {B} _{2,1}&\mathbf {B} _{2,2}\end{bmatrix}}{\mbox{ , }}\mathbf {C} ={\begin{bmatrix}\mathbf {C} _{1,1}&\mathbf {C} _{1,2}\\\mathbf {C} _{2,1}&\mathbf {C} _{2,2}\end{bmatrix}}} {\displaystyle \mathbf {A} ={\begin{bmatrix}\mathbf {A} _{1,1}&\mathbf {A} _{1,2}\\\mathbf {A} _{2,1}&\mathbf {A} _{2,2}\end{bmatrix}}{\mbox{ , }}\mathbf {B} ={\begin{bmatrix}\mathbf {B} _{1,1}&\mathbf {B} _{1,2}\\\mathbf {B} _{2,1}&\mathbf {B} _{2,2}\end{bmatrix}}{\mbox{ , }}\mathbf {C} ={\begin{bmatrix}\mathbf {C} _{1,1}&\mathbf {C} _{1,2}\\\mathbf {C} _{2,1}&\mathbf {C} _{2,2}\end{bmatrix}}}

où

A i , j , B i , j , C i , j ∈ R n / 2 × R n / 2 . {\displaystyle \mathbf {A} _{i,j},\mathbf {B} _{i,j},\mathbf {C} _{i,j}\in R^{n/2}\times R^{n/2}.} {\displaystyle \mathbf {A} _{i,j},\mathbf {B} _{i,j},\mathbf {C} _{i,j}\in R^{n/2}\times R^{n/2}.}

On a alors

C 1 , 1 = A 1 , 1 B 1 , 1 + A 1 , 2 B 2 , 1 {\displaystyle \mathbf {C} _{1,1}=\mathbf {A} _{1,1}\mathbf {B} _{1,1}+\mathbf {A} _{1,2}\mathbf {B} _{2,1}} {\displaystyle \mathbf {C} _{1,1}=\mathbf {A} _{1,1}\mathbf {B} _{1,1}+\mathbf {A} _{1,2}\mathbf {B} _{2,1}}
C 1 , 2 = A 1 , 1 B 1 , 2 + A 1 , 2 B 2 , 2 {\displaystyle \mathbf {C} _{1,2}=\mathbf {A} _{1,1}\mathbf {B} _{1,2}+\mathbf {A} _{1,2}\mathbf {B} _{2,2}} {\displaystyle \mathbf {C} _{1,2}=\mathbf {A} _{1,1}\mathbf {B} _{1,2}+\mathbf {A} _{1,2}\mathbf {B} _{2,2}}
C 2 , 1 = A 2 , 1 B 1 , 1 + A 2 , 2 B 2 , 1 {\displaystyle \mathbf {C} _{2,1}=\mathbf {A} _{2,1}\mathbf {B} _{1,1}+\mathbf {A} _{2,2}\mathbf {B} _{2,1}} {\displaystyle \mathbf {C} _{2,1}=\mathbf {A} _{2,1}\mathbf {B} _{1,1}+\mathbf {A} _{2,2}\mathbf {B} _{2,1}}
C 2 , 2 = A 2 , 1 B 1 , 2 + A 2 , 2 B 2 , 2 {\displaystyle \mathbf {C} _{2,2}=\mathbf {A} _{2,1}\mathbf {B} _{1,2}+\mathbf {A} _{2,2}\mathbf {B} _{2,2}} {\displaystyle \mathbf {C} _{2,2}=\mathbf {A} _{2,1}\mathbf {B} _{1,2}+\mathbf {A} _{2,2}\mathbf {B} _{2,2}}

Cette méthode nécessite 8 multiplications de matrices pour calculer les Ci,j, comme dans le produit classique.

La force de l'algorithme de Strassen réside dans un ensemble de sept nouvelles matrices Mi qui vont servir à exprimer les Ci,j avec seulement 7 multiplications au lieu de 8 :

M 1 := ( A 1 , 1 + A 2 , 2 ) ( B 1 , 1 + B 2 , 2 ) {\displaystyle \mathbf {M} _{1}:=(\mathbf {A} _{1,1}+\mathbf {A} _{2,2})(\mathbf {B} _{1,1}+\mathbf {B} _{2,2})} {\displaystyle \mathbf {M} _{1}:=(\mathbf {A} _{1,1}+\mathbf {A} _{2,2})(\mathbf {B} _{1,1}+\mathbf {B} _{2,2})}
M 2 := ( A 2 , 1 + A 2 , 2 ) B 1 , 1 {\displaystyle \mathbf {M} _{2}:=(\mathbf {A} _{2,1}+\mathbf {A} _{2,2})\mathbf {B} _{1,1}} {\displaystyle \mathbf {M} _{2}:=(\mathbf {A} _{2,1}+\mathbf {A} _{2,2})\mathbf {B} _{1,1}}
M 3 := A 1 , 1 ( B 1 , 2 − B 2 , 2 ) {\displaystyle \mathbf {M} _{3}:=\mathbf {A} _{1,1}(\mathbf {B} _{1,2}-\mathbf {B} _{2,2})} {\displaystyle \mathbf {M} _{3}:=\mathbf {A} _{1,1}(\mathbf {B} _{1,2}-\mathbf {B} _{2,2})}
M 4 := A 2 , 2 ( B 2 , 1 − B 1 , 1 ) {\displaystyle \mathbf {M} _{4}:=\mathbf {A} _{2,2}(\mathbf {B} _{2,1}-\mathbf {B} _{1,1})} {\displaystyle \mathbf {M} _{4}:=\mathbf {A} _{2,2}(\mathbf {B} _{2,1}-\mathbf {B} _{1,1})}
M 5 := ( A 1 , 1 + A 1 , 2 ) B 2 , 2 {\displaystyle \mathbf {M} _{5}:=(\mathbf {A} _{1,1}+\mathbf {A} _{1,2})\mathbf {B} _{2,2}} {\displaystyle \mathbf {M} _{5}:=(\mathbf {A} _{1,1}+\mathbf {A} _{1,2})\mathbf {B} _{2,2}}
M 6 := ( A 2 , 1 − A 1 , 1 ) ( B 1 , 1 + B 1 , 2 ) {\displaystyle \mathbf {M} _{6}:=(\mathbf {A} _{2,1}-\mathbf {A} _{1,1})(\mathbf {B} _{1,1}+\mathbf {B} _{1,2})} {\displaystyle \mathbf {M} _{6}:=(\mathbf {A} _{2,1}-\mathbf {A} _{1,1})(\mathbf {B} _{1,1}+\mathbf {B} _{1,2})}
M 7 := ( A 1 , 2 − A 2 , 2 ) ( B 2 , 1 + B 2 , 2 ) {\displaystyle \mathbf {M} _{7}:=(\mathbf {A} _{1,2}-\mathbf {A} _{2,2})(\mathbf {B} _{2,1}+\mathbf {B} _{2,2})} {\displaystyle \mathbf {M} _{7}:=(\mathbf {A} _{1,2}-\mathbf {A} _{2,2})(\mathbf {B} _{2,1}+\mathbf {B} _{2,2})}

Les Ci,j sont alors exprimées comme

C 1 , 1 = M 1 + M 4 − M 5 + M 7 {\displaystyle \mathbf {C} _{1,1}=\mathbf {M} _{1}+\mathbf {M} _{4}-\mathbf {M} _{5}+\mathbf {M} _{7}} {\displaystyle \mathbf {C} _{1,1}=\mathbf {M} _{1}+\mathbf {M} _{4}-\mathbf {M} _{5}+\mathbf {M} _{7}}
C 1 , 2 = M 3 + M 5 {\displaystyle \mathbf {C} _{1,2}=\mathbf {M} _{3}+\mathbf {M} _{5}} {\displaystyle \mathbf {C} _{1,2}=\mathbf {M} _{3}+\mathbf {M} _{5}}
C 2 , 1 = M 2 + M 4 {\displaystyle \mathbf {C} _{2,1}=\mathbf {M} _{2}+\mathbf {M} _{4}} {\displaystyle \mathbf {C} _{2,1}=\mathbf {M} _{2}+\mathbf {M} _{4}}
C 2 , 2 = M 1 − M 2 + M 3 + M 6 {\displaystyle \mathbf {C} _{2,2}=\mathbf {M} _{1}-\mathbf {M} _{2}+\mathbf {M} _{3}+\mathbf {M} _{6}} {\displaystyle \mathbf {C} _{2,2}=\mathbf {M} _{1}-\mathbf {M} _{2}+\mathbf {M} _{3}+\mathbf {M} _{6}}

Le procédé est reproduit récursivement jusqu'à ce que les matrices A et B soient « de petite taille ».

Il n'est pas nécessaire d'itérer le procédé jusqu'à une taille 1. En pratique, l'algorithme de Strassen est utilisé pour les matrices de grande taille. Il divise la taille jusqu'aux dizaines ou centaines et un autre algorithme de multiplication prend ensuite le relais pour calculer le produit des « petites matrices » obtenues.

Dans l'algorithme original de Strassen, chaque niveau de récursion effectue 18 additions et soustractions de blocs en plus des 7 multiplications. En 1970, Shmuel Winograd propose des formules alternatives qui nécessitent le même nombre de multiplications mais seulement 15 additions. En 2010, Marco Bodrato donne une nouvelle variante avec, pour un produit quelconque, toujours 7 multiplications et 15 additions comme dans l'algorithme de Winograd, mais avec moins d'opérations dans le cas particulier du calcul du carré d'une matrice.

Analyse de la complexité

[modifier | modifier le code]
Article connexe : Analyse de la complexité des algorithmes.

La multiplication matricielle « naïve » utilise

n 3 = n log 2 ⁡ 8 {\displaystyle n^{3}=n^{\log _{2}8}} {\displaystyle n^{3}=n^{\log _{2}8}}

multiplications des éléments de l'anneau R. Les additions sont généralement ignorées dans le calcul de la complexité car elles sont beaucoup plus rapides que la multiplication, en particulier si la taille des entrées est supérieure à la taille du mot machine.

Avec l'algorithme de Strassen, le nombre de multiplications T(n) est réduit à

n log 2 ⁡ ( 7 ) ≈ n 2,807 . {\displaystyle n^{\log _{2}(7)}\approx n^{2{,}807}.} {\displaystyle n^{\log _{2}(7)}\approx n^{2{,}807}.}

Cet exposant est obtenu comme la solution, par le Master theorem, de l'équation par récurrence

T ( n ) = 7 T ( n / 2 ) + Θ ( n 2 ) . {\displaystyle T(n)=7\,T(n/2)+\Theta (n^{2}).} {\displaystyle T(n)=7\,T(n/2)+\Theta (n^{2}).}

La constante dans la complexité est de l'ordre de 21, ce qui fait que l'algorithme de Strassen n'est efficace que pour des matrices de grandes tailles. Pour les matrices avec peu de coefficients non nuls (matrices creuses), l'algorithme de Strassen n'est pas algorithmiquement efficace non plus.

Notes et références

[modifier | modifier le code]
(en) Cet article est partiellement ou en totalité issu de l’article de Wikipédia en anglais intitulé « Strassen algorithm » (voir la liste des auteurs).

Notes

[modifier | modifier le code]

Références

[modifier | modifier le code]
  1. ↑ (de) Volker Strassen, « Gaussian Elimination is not Optimal », Numerische Mathematik, vol. 13,‎ 1969, p. 354-356.
  2. ↑ (en) Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest et Clifford Stein, Introduction to Algorithms, MIT Press, 2009, 3e éd. [détail de l’édition], notes du chap. 4, p. 112.

Bibliographie

[modifier | modifier le code]

(en) Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest et Clifford Stein, Introduction to Algorithms, MIT Press et McGraw-Hill, 2001, 2e éd. [détail de l’édition], chap. 31, section 31.2 (« Strassen's algorithm for matrix multiplication »), p. 739-745.

Liens externes

[modifier | modifier le code]
  • (en) Eric W. Weisstein, « Strassen Formulas », sur MathWorld
  • (en) Analyse de l'algorithme de Strassen à l'aide de Maple
  • Gérard Sookahet, Algorithme de V. Strassen pour la multiplication rapide de matrices
v · m
Multiplication
  • Facteur
    • Multiplicande
    • Multiplicateur
  • Produit
  • Croix de multiplication
  • Table de multiplication
Propriétés
  • Distributivité
  • Associativité
  • Commutativité
Exemples
  • Produit scalaire
  • Produit vectoriel
  • Multiplication par un scalaire
  • Produit matriciel
Algorithmes de multiplication
Multiplication d'entiers
  • Égypte antique
  • Russe
  • Chine antique
  • Par glissement
  • Par jalousies
  • Méthode Trachtenberg
  • Algorithme de multiplication de Booth
  • Karatsuba
  • Toom-Cook
  • Schönhage-Strassen
  • Fürer
Multiplication de matrices
  • Hadamard
  • Kronecker
  • Strassen
  • Coppersmith-Winograd
  • Algorithme de multiplication de matrices enchaînées
Algorithmes de vérification
Multiplication d'entiers
  • Preuve par neuf
Multiplication de matrices
  • Algorithme de vérification de Freivalds
  • icône décorative Portail de l’algèbre
  • icône décorative Portail de l'informatique théorique
Ce document provient de « https://fr.teknopedia.teknokrat.ac.id/w/index.php?title=Algorithme_de_Strassen&oldid=231697546 ».
Catégories :
  • Algorithme numérique
  • Matrice
  • Multiplication
Catégories cachées :
  • Article à référence nécessaire
  • Portail:Algèbre/Articles liés
  • Portail:Sciences/Articles liés
  • Portail:Mathématiques/Articles liés
  • Portail:Informatique théorique/Articles liés
  • Portail:Informatique/Articles liés

  • indonesia
  • Polski
  • الرية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصر
  • Nederlands
  • 本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українска
  • Tiếng Việt
  • Winaray
  • 中文
  • Русски
Sunting pranala
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id