English

$\{-1,0,1\}$-APSP and (min,max)-Product Problems

Data Structures and Algorithms 2019-11-15 v1

Abstract

In the {1,0,1}\{-1,0,1\}-APSP problem the goal is to compute all-pairs shortest paths (APSP) on a directed graph whose edge weights are all from {1,0,1}\{-1,0,1\}. In the (min,max)-product problem the input is two n×nn\times n matrices AA and BB, and the goal is to output the (min,max)-product of AA and BB. This paper provides a new algorithm for the {1,0,1}\{-1,0,1\}-APSP problem via a simple reduction to the target-(min,max)-product problem where the input is three n×nn\times n matrices A,BA,B, and TT, and the goal is to output a Boolean n×nn\times n matrix CC such that the (i,j)(i,j) entry of CC is 1 if and only if the (i,j)(i,j) entry of the (min,max)-product of AA and BB is exactly the (i,j)(i,j) entry of the target matrix TT. If (min,max)-product can be solved in TMM(n)=Ω(n2)T_{MM}(n) = \Omega(n^2) time then it is straightforward to solve target-(min,max)-product in O(TMM(n))O(T_{MM}(n)) time. Thus, given the recent result of Bringmann, K\"unnemann, and Wegrzycki [STOC 2019], the {1,0,1}\{-1,0,1\}-APSP problem can be solved in the same time needed for solving approximate APSP on graphs with positive weights. Moreover, we design a simple algorithm for target-(min,max)-product when the inputs are restricted to the family of inputs generated by our reduction. Using fast rectangular matrix multiplication, the new algorithm is faster than the current best known algorithm for (min,max)-product.

Keywords

Cite

@article{arxiv.1911.06132,
  title  = {$\{-1,0,1\}$-APSP and (min,max)-Product Problems},
  author = {Hodaya Barr and Tsvi Kopelowitz and Ely Porat and Liam Roditty},
  journal= {arXiv preprint arXiv:1911.06132},
  year   = {2019}
}
R2 v1 2026-06-23T12:15:54.708Z