Skip to main content
QUICK REVIEW

[Paper Review] Strassen's Matrix Multiplication Algorithm for Matrices of Arbitrary Order

Ivo Hedtke|arXiv (Cornell University)|Jul 13, 2010
Matrix Theory and AlgorithmsComputer Science11 references7 citations
TL;DR

This paper analyzes Strassen's matrix multiplication algorithm for arbitrary $n \times n$ matrices by examining the impact of parameter choices on computational overhead. It shows that Strassen's original parameters lead to approximately 20% more floating-point operations in the worst case compared to optimal parameters, highlighting a significant inefficiency that motivates improved parameter selection for practical performance.

ABSTRACT

The well known algorithm of Volker Strassen for matrix multiplication can only be used for $(m2^k imes m2^k)$ matrices. For arbitrary $(n imes n)$ matrices one has to add zero rows and columns to the given matrices to use Strassen's algorithm. Strassen gave a strategy of how to set $m$ and $k$ for arbitrary $n$ to ensure $n\leq m2^k$. In this paper we study the number $d$ of additional zero rows and columns and the influence on the number of flops used by the algorithm in the worst case ($d=n/16$), best case ($d=1$) and in the average case ($d\approx n/48$). The aim of this work is to give a detailed analysis of the number of additional zero rows and columns and the additional work caused by Strassen's bad parameters. Strassen used the parameters $m$ and $k$ to show that his matrix multiplication algorithm needs less than $4.7n^{\log_2 7}$ flops. We can show in this paper, that these parameters cause an additional work of approx. 20 % in the worst case in comparison to the optimal strategy for the worst case. This is the main reason for the search for better parameters.

Motivation & Objective

  • To analyze the computational overhead introduced by Strassen's original parameter choices ($m$, $k$) when applying his algorithm to arbitrary $n \times n$ matrices.
  • To quantify the additional work (in terms of floating-point operations) caused by these parameters in worst, best, and average cases.
  • To compare Strassen's parameter strategy with optimal alternatives, demonstrating the performance gap in the worst case.
  • To provide a detailed analysis of the number of zero rows/columns ($d$) added to pad matrices to $m2^k$ size, and its impact on algorithmic efficiency.

Proposed method

  • The paper models Strassen's algorithm as a recursive divide-and-conquer method requiring $7^k m^2(2m+5) - 4^k 6m^2$ flops for matrices of size $m2^k \times m2^k$, and compares this to the naive $n^3$ algorithm.
  • It defines $\tilde{n} = m2^k$ as the padded matrix size, with $d = \tilde{n} - n$ as the number of zero rows/columns added.
  • The analysis uses worst-case ($d = n/16$), best-case ($d = 1$), and average-case ($d \approx n/48$) scenarios to evaluate parameter impact.
  • It derives the expected value $\mathbb{E}[\tilde{n}/n] = 49/48 \approx 1.0208$, showing average padding is about 2.08% of $n$.
  • The paper compares Strassen’s original parameters ($m=32$, $k=p-5$ for $n=2^p-1$) with optimal parameters ($m=8$, $k=p-3$) via ratio functions $r(p) = F(p)/\tilde{F}(p)$.
  • It uses asymptotic limits and monotonicity analysis to show that Strassen’s parameters are about 8% worse in the best case and up to 20% worse in the worst case compared to optimal choices.

Experimental results

Research questions

  • RQ1What is the impact of Strassen’s original parameter selection on the number of floating-point operations when applied to arbitrary $n \times n$ matrices?
  • RQ2How does the number of padded zero rows and columns ($d$) vary across worst, best, and average cases?
  • RQ3What is the performance gap between Strassen’s original parameters and optimal parameters in terms of additional computational work?
  • RQ4Can the expected padding size $\mathbb{E}[\tilde{n}/n]$ be analytically derived for random $n$?
  • RQ5Why does Strassen’s original parameter choice lead to a 20% increase in work in the worst case, and what are the implications for practical implementations?

Key findings

  • In the worst case, Strassen’s original parameters cause approximately 20% more floating-point operations than the optimal parameter choice, due to excessive padding ($d = n/16$).
  • In the best case, where only one zero row and column are added ($d = 1$), Strassen’s parameters still result in about 8% more work than optimal parameters.
  • On average, the expected padding ratio is $\mathbb{E}[\tilde{n}/n] = 49/48 \approx 1.0208$, meaning an average of about 2.08% more matrix size due to padding.
  • The ratio $r(p) = F(p)/\tilde{F}(p)$, comparing Strassen’s original parameters to optimal ones, decreases monotonically from ~1.080 at $p=5$ to ~1.0729 as $p \to \infty$, confirming consistent inefficiency.
  • The analysis confirms that Strassen’s original parameter choice ($m=32$, $k=p-5$) is suboptimal and leads to significant computational overhead, motivating the search for better parameter sets.
  • The paper demonstrates that the worst-case performance gap of ~20% is the primary reason for seeking improved parameter strategies in practical implementations of Strassen’s algorithm.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.