English

Composition Orderings for Linear Functions and Matrix Multiplication Orderings

Data Structures and Algorithms 2024-02-19 v1

Abstract

We consider composition orderings for linear functions of one variable. Given nn linear functions f1,,fnf_1,\dots,f_n and a constant cc, the objective is to find a permutation σ\sigma that minimizes/maximizes fσ(n)fσ(1)(c)f_{\sigma(n)}\circ\dots\circ f_{\sigma(1)}(c). It was first studied in the area of time-dependent scheduling, and known to be solvable in O(nlogn)O(n\log n) time if all functions are nondecreasing. In this paper, we present a complete characterization of optimal composition orderings for this case, by regarding linear functions as two-dimensional vectors. We also show several interesting properties on optimal composition orderings such as the equivalence between local and global optimality. Furthermore, by using the characterization above, we provide a fixed-parameter tractable (FPT) algorithm for the composition ordering problem for general linear functions, with respect to the number of decreasing linear functions. We next deal with matrix multiplication orderings as a generalization of composition of linear functions. Given nn matrices M1,,MnRm×mM_1,\dots,M_n\in\mathbb{R}^{m\times m} and two vectors w,yRmw,y\in\mathbb{R}^m, where mm denotes a positive integer, the objective is to find a permutation σ\sigma that minimizes/maximizes wMσ(n)Mσ(1)yw^\top M_{\sigma(n)}\dots M_{\sigma(1)} y. The problem is also viewed as a generalization of flow shop scheduling through a limit. By this extension, we show that the multiplication ordering problem for 2×22\times 2 matrices is solvable in O(nlogn)O(n\log n) time if all the matrices are simultaneously triangularizable and have nonnegative determinants, and FPT with respect to the number of matrices with negative determinants, if all the matrices are simultaneously triangularizable. As the negative side, we finally prove that three possible natural generalizations are NP-hard: 1) when m=2m=2, 2) when m3m\geq 3, and 3) the target version of the problem.

Keywords

Cite

@article{arxiv.2402.10451,
  title  = {Composition Orderings for Linear Functions and Matrix Multiplication Orderings},
  author = {Susumu Kubo and Kazuhisa Makino and Souta Sakamoto},
  journal= {arXiv preprint arXiv:2402.10451},
  year   = {2024}
}

Comments

38 pages

R2 v1 2026-06-28T14:50:21.490Z