Revisiting computation of matrix chain products

Oded Schwartz, Elad Weiss

Research output: Contribution to journalArticlepeer-review

2 Scopus citations


The matrix chain ordering problem aims to reduce the number of arithmetic operations required for evaluating the product of N matrices. Using a dynamic programming algorithm this problem can be solved in O(N3) time. Hu and Shing obtained a sophisticated algorithm that solves the problem in O(N log N) [SIAM J. Comput., 11 (1982), pp. 362-373]. Unfortunately, as we show here, the correctness proof of their algorithm is wrong. This flaw affects another algorithm for the same problem, by Wang, Zhu, and Tian (2013), and algorithms for many other problems that use chain matrix multiplication as a building block. We present an alternative proof for the correctness of the first two algorithms and show that a third algorithm by Nimbark, Gohel, and Doshi (2011) is beyond repair.

Original languageAmerican English
Pages (from-to)1481-1486
Number of pages6
JournalSIAM Journal on Computing
Issue number5
StatePublished - 2019

Bibliographical note

Funding Information:
This project has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (grant agreement 818252). Research is supported by grants 1878/14, and 1901/14 from the Israel Science Foundation (founded by the Israel Academy of Sciences and Humanities) and grant 3-10891 from the Ministry of Science and Technology, Israel. Research is also supported by the Einstein Foundation and the Minerva Foundation. This work was supported by the PetaCloud industry-academia consortium. This research was supported by a grant from the United States-Israel Bi-national Science Foundation (BSF), Jerusalem, Israel. This work was supported by the HUJI Cyber Security Research Center in conjunction with the Israel National Cyber Bureau in the Prime Minister's Office.

Publisher Copyright:
© 2019 Oded Schwartz and Elad Weiss


  • Algorithms
  • Matrix chain product
  • Matrix multiplication


Dive into the research topics of 'Revisiting computation of matrix chain products'. Together they form a unique fingerprint.

Cite this