Shortest Beer Path Queries in Outerplanar Graphs
arXiv:2110.15693
Abstract
A \emph{beer graph} is an undirected graph , in which each edge has a positive weight and some vertices have a beer store. A \emph{beer path} between two vertices and in is any path in between and that visits at least one beer store. We show that any outerplanar beer graph with vertices can be preprocessed in time into a data structure of size , such that for any two query vertices and , (i) the weight of the shortest beer path between and can be reported in time (where is the inverse Ackermann function), and (ii) the shortest beer path between and can be reported in time, where is the number of vertices on this path. Both results are optimal, even when is a beer tree (i.e., a beer graph whose underlying graph is a tree).
ISAAC 2021