Core-Sparse Monge Matrix Multiplication: Improved Algorithm and Applications

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Gawrychowski, Paweł, Gorbachev, Egor, Kociumaka, Tomasz
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913930193928192
author Gawrychowski, Paweł
Gorbachev, Egor
Kociumaka, Tomasz
author_facet Gawrychowski, Paweł
Gorbachev, Egor
Kociumaka, Tomasz
contents Min-plus matrix multiplication is used in many problems operating on distances in graphs or solvable by dynamic programming. Assuming the APSP hypothesis, there is no subcubic-time algorithm for the min-plus product of two general $n\times n$ matrices, but structured matrices admit faster solutions. Planar graph algorithms often use Monge matrices, which have an $O(n^2)$-time min-plus multiplication procedure. Many results for sequence alignment problems, such as edit distance and longest increasing subsequence, apply simple unit-Monge matrices, whose min-plus product can be computed in $O(n\log n)$ time [Tiskin, SODA'10]. Russo [SPIRE'11] identified the core size $δ$ as the structural parameter behind the underlying matrix representation and showed an $O((n+δ)\log^3 n)$-time min-plus multiplication procedure for arbitrary Monge matrices. In this work, we prove a linear bound on the core size of the product matrix in terms of the core sizes of the input matrices and show how to solve the core-sparse Monge matrix multiplication problem in $O((n+δ)\log n)$ time, matching the complexity for simple unit-Monge matrices, where $δ= O(n)$. As witnessed by the recent work of Gorbachev and Kociumaka [STOC'25] for edit distance with integer weights, our generalization opens up the possibility of speed-ups for weighted sequence alignment problems. Furthermore, our multiplication algorithm can efficiently recover the witness for any entry of the output matrix. This allows us, for example, to preprocess an integer array of size $n$ in $\tilde{O}(n)$ time so that the longest increasing subsequence of any sub-array can be reconstructed in $\tilde{O}(\ell)$ time, where $\ell$ is the length of the reported subsequence. In comparison, Karthik C. S. and Rahul [arXiv, 2024] recently achieved $\tilde{O}(\ell+n^{1/2})$-time reporting after $\tilde{O}(n^{3/2})$-time preprocessing.
format Preprint
id arxiv_https___arxiv_org_abs_2408_04613
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Core-Sparse Monge Matrix Multiplication: Improved Algorithm and Applications
Gawrychowski, Paweł
Gorbachev, Egor
Kociumaka, Tomasz
Data Structures and Algorithms
Min-plus matrix multiplication is used in many problems operating on distances in graphs or solvable by dynamic programming. Assuming the APSP hypothesis, there is no subcubic-time algorithm for the min-plus product of two general $n\times n$ matrices, but structured matrices admit faster solutions. Planar graph algorithms often use Monge matrices, which have an $O(n^2)$-time min-plus multiplication procedure. Many results for sequence alignment problems, such as edit distance and longest increasing subsequence, apply simple unit-Monge matrices, whose min-plus product can be computed in $O(n\log n)$ time [Tiskin, SODA'10]. Russo [SPIRE'11] identified the core size $δ$ as the structural parameter behind the underlying matrix representation and showed an $O((n+δ)\log^3 n)$-time min-plus multiplication procedure for arbitrary Monge matrices. In this work, we prove a linear bound on the core size of the product matrix in terms of the core sizes of the input matrices and show how to solve the core-sparse Monge matrix multiplication problem in $O((n+δ)\log n)$ time, matching the complexity for simple unit-Monge matrices, where $δ= O(n)$. As witnessed by the recent work of Gorbachev and Kociumaka [STOC'25] for edit distance with integer weights, our generalization opens up the possibility of speed-ups for weighted sequence alignment problems. Furthermore, our multiplication algorithm can efficiently recover the witness for any entry of the output matrix. This allows us, for example, to preprocess an integer array of size $n$ in $\tilde{O}(n)$ time so that the longest increasing subsequence of any sub-array can be reconstructed in $\tilde{O}(\ell)$ time, where $\ell$ is the length of the reported subsequence. In comparison, Karthik C. S. and Rahul [arXiv, 2024] recently achieved $\tilde{O}(\ell+n^{1/2})$-time reporting after $\tilde{O}(n^{3/2})$-time preprocessing.
title Core-Sparse Monge Matrix Multiplication: Improved Algorithm and Applications
topic Data Structures and Algorithms
url https://arxiv.org/abs/2408.04613