The Essential Algorithms for the Matrix Chain

03/30/2023
by   Francisco Lopez, et al.
0

For a given product of n matrices, the matrix chain multiplication problem asks for a parenthesisation that minimises the number of arithmetic operations. In 1973, Godbole presented a now classical dynamic programming formulation with cubic time complexity on the length of the chain. The best known algorithms run in linearithmic time, and the best known approximation algorithms run in linear time with an approximation factor smaller than two. All solutions have in common that they select an optimal parenthesisation from a set of C_n-1 (Catalan number n - 1) distinct parenthesisations. We studied the set of parenthesisations and discovered (a) that all of the exponentially many parenthesisations are useful in the sense that they are optimal in an infinite subset of the input space, (b) that only n + 1 parenthesisations are essential in the sense that they are arbitrarily better than the second best on an infinite subset of the input space, and (c) that the best essential parenthesisation is never more than twice as costly as the best non-essential parenthesisation. Through random sampling of the input space, we further discovered that the set of essential parenthesisations includes an optimal parenthesisation in the vast majority of inputs, and that the best essential parenthesisation is on average much closer to optimal than the worst-case bound. The results have direct consequences for the development of compilers for linear algebra expressions where the matrix sizes are unknown at compile-time.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/19/2020

Fast Multi-Subset Transform and Weighted Sums Over Acyclic Digraphs

The zeta and Moebius transforms over the subset lattice of n elements an...
research
10/27/2021

Average-Case Subset Balancing Problems

Given a set of n input integers, the Equal Subset Sum problem asks us to...
research
08/28/2018

A Quantum Interior Point Method for LPs and SDPs

We present a quantum interior point method with worst case running time ...
research
04/10/2018

The Generalized Matrix Chain Algorithm

In this paper, we present a generalized version of the matrix chain algo...
research
04/29/2020

Quantum and approximation algorithms for maximum witnesses of Boolean matrix products

The problem of finding maximum (or minimum) witnesses of the Boolean pro...
research
04/09/2018

Counting Triangles under Updates in Worst-Case Optimal Time

We consider the problem of incrementally maintaining the triangle count ...
research
03/12/2020

Optimization of Generalized Jacobian Chain Products without Memory Constraints

The efficient computation of Jacobians represents a fundamental challeng...

Please sign up or login with your details

Forgot password? Click here to reset