Our interest is in paths between pairs of vertices that go through at least one of a subset of the vertices known as beer vertices. Such a path is called a beer path, and the beer distance between two vertices is the length of the shortest beer path. We show that we can represent unweighted interval graphs using $2n \log n + O(n) + O(|B|\log n)$ bits where $|B|$ is the number of beer vertices. This data structure answers beer distance queries in $O(\log^\varepsilon n)$ time for any constant $\varepsilon > 0$ and shortest beer path queries in $O(\log^\varepsilon n + d)$ time, where $d$ is the beer distance between the two nodes. We also show that proper interval graphs may be represented using $3n + o(n)$ bits to support beer distance queries in $O(f(n)\log n)$ time for any $f(n) \in \omega(1)$ and shortest beer path queries in $O(d)$ time. All of these results also have time-space trade-offs. Lastly we show that the information theoretic lower bound for beer proper interval graphs is very close to the space of our structure, namely $\log(4+2\sqrt{3})n - o(n)$ (or about $ 2.9 n$) bits.
翻译:我们的兴趣在于通过至少一个称为啤酒脊椎的脊椎子之一的两对头顶之间的路径。 这种路径被称为啤酒路径, 两个脊椎之间的啤酒距离是最短的啤酒路径的长度。 我们显示, 我们可以用 $\ log n + O( n) + O( ⁇ B) + O( ⁇ B) 表示未加权的间隔图, 其中, $ +B $ 是啤酒脊椎的数量 。 这个数据结构以 $( log ⁇ varepsilon n) 来回答啤酒远程查询 。 对于任何恒定 $( log) > 0$ 和最短的啤酒路径查询, $( log\ varepsilon n + d) 时间, 美元是两个节点之间的啤酒距离。 我们还显示 3n + o( n) o( n) 美元 美元 支持啤酒远程查询 。