We consider composition orderings for linear functions of one variable. Given $n$ linear functions $f_1,\dots,f_n$ and a constant $c$, the objective is to find a permutation $\sigma$ that minimizes/maximizes $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(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 $n$ matrices $M_1,\dots,M_n\in\mathbb{R}^{m\times m}$ and two vectors $w,y\in\mathbb{R}^m$, where $m$ denotes a positive integer, the objective is to find a permutation $\sigma$ that minimizes/maximizes $w^\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\times 2$ matrices is solvable in $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=2$, 2) when $m\geq 3$, and 3) the target version of the problem.
翻译:本文研究单变量线性函数的复合排序问题。给定$n$个线性函数$f_1,\dots,f_n$及常数$c$,目标为寻找排列$\sigma$使得$f_{\sigma(n)}\circ\dots\circ f_{\sigma(1)}(c)$最小化/最大化。该问题最早在时间依赖调度领域被研究,已知当所有函数非递减时可在$O(n\log n)$时间内求解。本文通过将线性函数视为二维向量,给出此情形下最优复合排序的完整刻画,并揭示最优复合排序的若干有趣性质,例如局部最优性与全局最优性的等价性。进一步,利用上述刻画,针对一般线性函数的复合排序问题,提出关于递减线性函数数量的固定参数可解(FPT)算法。随后将线性函数复合推广至矩阵乘法排序问题:给定$n$个矩阵$M_1,\dots,M_n\in\mathbb{R}^{m\times m}$及两个向量$w,y\in\mathbb{R}^m$($m$为正整数),目标为寻找排列$\sigma$使$w^\top M_{\sigma(n)}\dots M_{\sigma(1)} y$最小化/最大化。该问题亦可视为流水车间调度问题在极限意义下的推广。基于此扩展,证明当所有$2\times 2$矩阵可同时三角化且行列式非负时,乘法排序问题可在$O(n\log n)$时间内求解;若所有矩阵可同时三角化,则关于具有负行列式矩阵数量的FPT可解性成立。最后从反面证明三种自然推广均为NP难问题:1) $m=2$情形,2) $m\geq 3$情形,3) 问题的目标版本。