Difference between revisions of "Strassen algorithm"

From MWiki
Jump to: navigation, search
m (Strassen algorithm)
m (Strassen algorithm)
Line 19: Line 19:
 
For a square [[w:Matrix (mathematics)|<span class="wikipedia">matrix</span>]] <math>A \in \mathbb{C}^{n \times n}</math> where <math>n \in \mathbb{N}^*</math>, the runtime <math>T_q(n)</math> of the Strassen algorithm for the matrix product <math>A^TA</math> is about <math>4/7</math> that of the original algorithm in  <math>\mathcal{O}(n^{(_2 7)})</math>.
 
For a square [[w:Matrix (mathematics)|<span class="wikipedia">matrix</span>]] <math>A \in \mathbb{C}^{n \times n}</math> where <math>n \in \mathbb{N}^*</math>, the runtime <math>T_q(n)</math> of the Strassen algorithm for the matrix product <math>A^TA</math> is about <math>4/7</math> that of the original algorithm in  <math>\mathcal{O}(n^{(_2 7)})</math>.
  
'''Proof:''' Mit <math>A :=  
+
'''Proof:''' For <math>A :=  
 
   \begin{pmatrix}
 
   \begin{pmatrix}
 
   A_{11} & A_{12} \\
 
   A_{11} & A_{12} \\
 
   A_{21} & A_{22}
 
   A_{21} & A_{22}
   \end{pmatrix}</math> gilt <math>A^TA =
+
   \end{pmatrix}</math>, it holds that <math>A^TA =
 
   \begin{pmatrix}
 
   \begin{pmatrix}
 
   A_{11}^TA_{11}+A_{21}^TA_{21} & A_{11}^TA_{12}+A_{21}^TA_{22} \\
 
   A_{11}^TA_{11}+A_{21}^TA_{21} & A_{11}^TA_{12}+A_{21}^TA_{22} \\

Revision as of 02:23, 21 March 2022

Strassen algorithm for a symmetric matrix:

For a symmetric matrix [math]\displaystyle{ A \in \mathbb{C}^{n \times n} }[/math] where [math]\displaystyle{ n \in \mathbb{N}^* }[/math], the runtime [math]\displaystyle{ T_s(n) }[/math] of the Strassen algorithm for the matrix product [math]\displaystyle{ A^TA }[/math] is about half that of the original algorithm in [math]\displaystyle{ \mathcal{O}(n^{(_2 7)}) }[/math].

Proof: For [math]\displaystyle{ A := \begin{pmatrix} A_{11} & A_{12} \\ A_{12} & A_{22} \end{pmatrix} }[/math], it holds that [math]\displaystyle{ A^TA = \begin{pmatrix} A_{11}^TA_{11}+A_{12}^TA_{12} & A_{11}^TA_{12}+A_{12}^TA_{22} \\ A_{12}^TA_{11}+A_{22}^TA_{12} & A_{12}^TA_{12}+A_{22}^TA_{22} \end{pmatrix} }[/math] and [math]\displaystyle{ T_s(2n) = 3T_s(n) + 2n^{(_2 7)} }[/math]. Thus [math]\displaystyle{ T_s(n) = 3T_s(n/2) + 2(n/2)^{(_2 7)} }[/math] and [math]\displaystyle{ T_s(n/2) = 3T_s(n/4) + 2(n/4)^{(_2 7)} }[/math]. The geometric series yields because of [math]\displaystyle{ T_s(1) = 1 }[/math]:

[math]\displaystyle{ T_s(n) = 27T_s(n/8) + 2/7n^{(_2 7)}(1+3/7 + (3/7)^2 + ...) = 3^{(_2n)} + 2/7n^{(_2 7)} (1-(3/7)^{(_2n)})/(1-3/7) = n^{(_2 3)} + \hat{2}(n^{(_2 7)}-n^{(_2 3)}) = \hat{2} (n^{(_2 3)} + n^{(_2 7)}) }[/math].[math]\displaystyle{ \square }[/math]

Strassen algorithm for a square matrix:

For a square matrix [math]\displaystyle{ A \in \mathbb{C}^{n \times n} }[/math] where [math]\displaystyle{ n \in \mathbb{N}^* }[/math], the runtime [math]\displaystyle{ T_q(n) }[/math] of the Strassen algorithm for the matrix product [math]\displaystyle{ A^TA }[/math] is about [math]\displaystyle{ 4/7 }[/math] that of the original algorithm in [math]\displaystyle{ \mathcal{O}(n^{(_2 7)}) }[/math].

Proof: For [math]\displaystyle{ A := \begin{pmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{pmatrix} }[/math], it holds that [math]\displaystyle{ A^TA = \begin{pmatrix} A_{11}^TA_{11}+A_{21}^TA_{21} & A_{11}^TA_{12}+A_{21}^TA_{22} \\ A_{12}^TA_{11}+A_{22}^TA_{21} & A_{12}^TA_{12}+A_{22}^TA_{22} \end{pmatrix} }[/math] and [math]\displaystyle{ T_q(2n) = 4T_s(n) + 2n^{(_2 7)} }[/math] bzw. [math]\displaystyle{ T_q(n) = 4T_s(n/2) + 2/7n^{(_2 7)} = 2/3n^{(_2 3)} + 4/7n^{(_2 7)} }[/math].[math]\displaystyle{ \square }[/math]

See also

List of mathematical symbols