Core-Sparse Monge Matrix Multiplication: Improved Algorithm and Applications

Paweł Gawrychowski, Egor Gorbachev, Tomasz Kociumaka
{"title":"Core-Sparse Monge Matrix Multiplication: Improved Algorithm and Applications","authors":"Paweł Gawrychowski, Egor Gorbachev, Tomasz Kociumaka","doi":"arxiv-2408.04613","DOIUrl":null,"url":null,"abstract":"The task of min-plus matrix multiplication often arises in the context of\ndistances in graphs and is known to be fine-grained equivalent to the All-Pairs\nShortest Path problem. The non-crossing property of shortest paths in planar\ngraphs gives rise to Monge matrices; the min-plus product of $n\\times n$ Monge\nmatrices can be computed in $O(n^2)$ time. Grid graphs arising in sequence\nalignment problems, such as longest common subsequence or longest increasing\nsubsequence, are even more structured. Tiskin [SODA'10] modeled their behavior\nusing simple unit-Monge matrices and showed that the min-plus product of such\nmatrices can be computed in $O(n\\log n)$ time. Russo [SPIRE'11] showed that the\nmin-plus product of arbitrary Monge matrices can be computed in time\n$O((n+\\delta)\\log^3 n)$ parameterized by the core size $\\delta$, which is\n$O(n)$ for unit-Monge matrices. In this work, we provide a linear bound on the core size of the product\nmatrix in terms of the core sizes of the input matrices and show how to solve\nthe core-sparse Monge matrix multiplication problem in $O((n+\\delta)\\log n)$\ntime, matching the result of Tiskin for simple unit-Monge matrices. Our\nalgorithm also allows $O(\\log \\delta)$-time witness recovery for any given\nentry of the output matrix. As an application of this functionality, we show\nthat an array of size $n$ can be preprocessed in $O(n\\log^3 n)$ time so that\nthe longest increasing subsequence of any sub-array can be reconstructed in\n$O(l)$ time, where $l$ is the length of the reported subsequence; in\ncomparison, Karthik C. S. and Rahul [arXiv'24] recently achieved\n$O(l+n^{1/2}\\log^3 n)$-time reporting after $O(n^{3/2}\\log^3 n)$-time\npreprocessing. Our faster core-sparse Monge matrix multiplication also enabled\nreducing two logarithmic factors in the running times of the recent algorithms\nfor edit distance with integer weights [Gorbachev & Kociumaka, arXiv'24].","PeriodicalId":501525,"journal":{"name":"arXiv - CS - Data Structures and Algorithms","volume":"171 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Data Structures and Algorithms","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.04613","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The task of min-plus matrix multiplication often arises in the context of distances in graphs and is known to be fine-grained equivalent to the All-Pairs Shortest Path problem. The non-crossing property of shortest paths in planar graphs gives rise to Monge matrices; the min-plus product of $n\times n$ Monge matrices can be computed in $O(n^2)$ time. Grid graphs arising in sequence alignment problems, such as longest common subsequence or longest increasing subsequence, are even more structured. Tiskin [SODA'10] modeled their behavior using simple unit-Monge matrices and showed that the min-plus product of such matrices can be computed in $O(n\log n)$ time. Russo [SPIRE'11] showed that the min-plus product of arbitrary Monge matrices can be computed in time $O((n+\delta)\log^3 n)$ parameterized by the core size $\delta$, which is $O(n)$ for unit-Monge matrices. In this work, we provide 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+\delta)\log n)$ time, matching the result of Tiskin for simple unit-Monge matrices. Our algorithm also allows $O(\log \delta)$-time witness recovery for any given entry of the output matrix. As an application of this functionality, we show that an array of size $n$ can be preprocessed in $O(n\log^3 n)$ time so that the longest increasing subsequence of any sub-array can be reconstructed in $O(l)$ time, where $l$ is the length of the reported subsequence; in comparison, Karthik C. S. and Rahul [arXiv'24] recently achieved $O(l+n^{1/2}\log^3 n)$-time reporting after $O(n^{3/2}\log^3 n)$-time preprocessing. Our faster core-sparse Monge matrix multiplication also enabled reducing two logarithmic factors in the running times of the recent algorithms for edit distance with integer weights [Gorbachev & Kociumaka, arXiv'24].
核心解析 Monge 矩阵乘法:改进算法与应用
最小加矩阵乘法任务经常出现在图中的距离问题中,而且已知它在细粒度上等同于全对最短路径问题。平面图中最短路径的非交叉特性产生了 Monge 矩阵;计算 $n\times n$ Monge 矩阵的最小加乘积只需 $O(n^2)$ 时间。序列对齐问题中出现的网格图,如最长公共子序列或最长递增子序列,结构更加复杂。Tiskin [SODA'10]利用简单的单元-海绵矩阵对它们的行为进行了建模,并证明这种矩阵的最小加积可以在 $O(n\log n)$ 时间内计算。Russo [SPIRE'11]的研究表明,任意 Monge 矩阵的最小加积计算时间为$O((n+\delta)\log^3 n)$,参数为核大小$\delta$,对于单位-Monge 矩阵为$O(n)$。在这项工作中,我们根据输入矩阵的核心大小,为乘积矩阵的核心大小提供了一个线性约束,并展示了如何在 $O((n+\delta)\log n)$时间内解决核心稀疏的 Monge 矩阵乘法问题,这与 Tiskin 针对简单的单元-Monge 矩阵得出的结果相吻合。对于输出矩阵的任何给定项,Ouralgorithm 还能以 $O(\log \delta)$ 的时间恢复见证。作为该功能的一个应用,我们展示了可以在 $O(n\log^3 n)$ 时间内对大小为 $n$ 的数组进行预处理,从而可以在 $O(l)$ 时间内重建任意子数组的最长递增子序列,其中 $l$ 是所报告子序列的长度;与之相比,Karthik C. S. 和 Rahul [ar] [ar] [ar] [ar] [ar] 的预处理时间为 $O(n\log^3 n)$。S. 和 Rahul [arXiv'24] 最近在经过 $O(n^{3/2}\log^3 n)$ 时的预处理后,实现了 $O(l+n^{1/2}\log^3 n)$ 时的报告。我们更快的核心稀疏 Monge 矩阵乘法也使得最近的整数权重编辑距离算法的运行时间减少了两个对数因子[Gorbachev & Kociumaka, arXiv'24]。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信