English

Shortest Beer Path Queries in Outerplanar Graphs

Data Structures and Algorithms 2021-11-01 v1

Abstract

A \emph{beer graph} is an undirected graph GG, in which each edge has a positive weight and some vertices have a beer store. A \emph{beer path} between two vertices uu and vv in GG is any path in GG between uu and vv that visits at least one beer store. We show that any outerplanar beer graph GG with nn vertices can be preprocessed in O(n)O(n) time into a data structure of size O(n)O(n), such that for any two query vertices uu and vv, (i) the weight of the shortest beer path between uu and vv can be reported in O(α(n))O(\alpha(n)) time (where α(n)\alpha(n) is the inverse Ackermann function), and (ii) the shortest beer path between uu and vv can be reported in O(L)O(L) time, where LL is the number of vertices on this path. Both results are optimal, even when GG is a beer tree (i.e., a beer graph whose underlying graph is a tree).

Keywords

Cite

@article{arxiv.2110.15693,
  title  = {Shortest Beer Path Queries in Outerplanar Graphs},
  author = {Joyce Bacic and Saeed Mehrabi and Michiel Smid},
  journal= {arXiv preprint arXiv:2110.15693},
  year   = {2021}
}

Comments

ISAAC 2021

R2 v1 2026-06-24T07:17:33.031Z