Abstract
As proposed by Karppa and Kaski (in: Proceedings 30th ACM-SIAM Symposium on Discrete Algorithms (SODA), 2019) a novel “broken" or "opportunistic" matrix multiplication algorithm, based on a variant of Strassen’s algorithm, and used this to develop new algorithms for Boolean matrix multiplication, among other tasks. Their algorithm can compute Boolean matrix multiplication in \(O(n^{2.778})\) time. While asymptotically faster matrix multiplication algorithms exist, most such algorithms are infeasible for practical problems. We describe an alternative way to use the broken multiplication algorithm to approximately compute matrix multiplication, either for real-valued or Boolean matrices. In brief, instead of running multiple iterations of the broken algorithm on the original input matrix, we form a new larger matrix by sampling and run a single iteration of the broken algorithm on it. Asymptotically, our algorithm has runtime \(O(n^{2.763})\), a slight improvement over the Karppa–Kaski algorithm. Since the goal is to obtain new practical matrix-multiplication algorithms, we also estimate the concrete runtime for our algorithm for some large-scale sample problems. It appears that for these parameters, further optimizations are still needed to make our algorithm competitive.
Similar content being viewed by others
Notes
[12] includes an additional step, where the entries of the matrices are randomly permuted at each level. We omit this, since we will later include more extensive randomization in the overall algorithm.
References
Albrecht, M., Bond, G., Hart, W.: Algorithm 898: efficient multiplication of dense matrices over \(\text{ GF }(2)\). AMS Trans. Math. Softw. 37(1), 1–14 (2010)
Arlazarov, V., Dinic, E., Kronrod, M., Faradžev, I.: On economical construction of the transitive closure of a directed graph. Doklady Akademii Nauk 194(3), Russian Academy of Sciences, pp. 487-88 (1970)
Ballard, G., Demmel, J., Holtz, O., Lipshitz, B., Schwartz, O.: Communication-optimal parallel algorithm for Strassen’s matrix multiplication. Proc. 24th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 193-204 (2012)
Benson, A., Ballard, G.: A framework for practical parallel fast matrix multiplication. ACM SIGPLAN Notices 50(8), 42–53 (2015)
Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progressions. J. Symb. Comput. 9(3), 251–280 (1990)
Karstadt, E., Schwartz, O.: Matrix multiplication, a little faster. J. ACM 67(1), 1–31 (2020)
Le Gall, F.: Faster algorithms for rectangular matrix multiplication. In: Proc. 53rd IEEE Symposium on Foundations of Computer Science (FOCS), pp. 514-523 (2012)
Le Gall, F., Urrutia, F.: Improved rectangular matrix multiplication using powers of the Coppersmith-Winograd tensor. In: Proc. 29th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 1029-1046 (2018)
Le Gall, F.: Faster rectangular matrix multiplication by combination loss analysis. In: Proc. 35th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 3765-3791 (2024)
Huang, J., Smith, T., Henry, G., Van De Geijn, R.: Strassen’s algorithm reloaded. In: Proc. International Conference for High Performance Computing, Networking, Storage and Analysis (SC), pp. 690-701 (2016)
Janson, S., Luczak, T., Rucínski, A.: An exponential bound for the probability of a specified subgraph in a random graph. IMA Preprint Series #393 (1988)
Karppa, M., Kaski, P.: Probabilistic tensors and opportunistic Boolean matrix multiplication. In: Proc. 30th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 496-515 (2019)
Karppa, M.: Techniques for similarity search and Boolean matrix multiplication. PhD Thesis (2020)
Pan, V.: Fast feasible and unfeasible matrix multiplication. ar**v:1804.04102 (2018)
Vassilevska Williams, V., Xu, Y., Xu, Z., Zhou, R.: New bounds for matrix multiplication: from alpha to omega. In: Proc. 35th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 3792-3835 (2024)
Yu, H.: An improved combinatorial algorithm for Boolean matrix multiplication. Inf. Comput. 261, 240–247 (2018)
Acknowledgements
Thanks for Richard Stong for suggesting the proof of Lemma 12. Thanks to conference and journal reviewers for helpful corrections and suggestions.
Author information
Authors and Affiliations
Contributions
There is only a single author.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This is an extended version of a paper appearing in the European Symposium on Algorithm (ESA) 2023.
Rights and permissions
About this article
Cite this article
Harris, D.G. Algorithms for Matrix Multiplication via Sampling and Opportunistic Matrix Multiplication. Algorithmica (2024). https://doi.org/10.1007/s00453-024-01247-y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00453-024-01247-y