A king in an n-vertex tournament graph G is a vertex that can reach any other vertex v with a path of length at most two. A kingdom is a data structure that given any vertex v returns such a path from a king to v in O(1) time. In this paper, we show how to maintain a kingdom while the tournament graph G undergoes updates. We consider both edge updates that flip the direction of an edge, and vertex updates that insert/delete vertices by activating/deactivating rows and columns of the graph’s adjacency matrix. For a single edge-flip, we show that after \(O(n^{3/2})\) preprocessing time, we can maintain a kingdom in O(1) time following the edge-flip. With \(\tilde{O}(n^{2})\) preprocessing time, we can support any constant number of edge-flips, vertex insertions, and vertex deletions in \(O(\log n)\) time per operation. For an arbitrary number of edge-flips, we present a randomized algorithm that maintains a kingdom in \(O(\log n)\) expected time following every edge-flip, and another algorithm that supports vertex insertions in \(O(\sqrt{n})\) amortized time per insertion.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Maintaining a Kingdom in a Tournament

  • Oren Weimann,
  • Raphael Yuster

摘要

A king in an n-vertex tournament graph G is a vertex that can reach any other vertex v with a path of length at most two. A kingdom is a data structure that given any vertex v returns such a path from a king to v in O(1) time. In this paper, we show how to maintain a kingdom while the tournament graph G undergoes updates. We consider both edge updates that flip the direction of an edge, and vertex updates that insert/delete vertices by activating/deactivating rows and columns of the graph’s adjacency matrix. For a single edge-flip, we show that after \(O(n^{3/2})\) preprocessing time, we can maintain a kingdom in O(1) time following the edge-flip. With \(\tilde{O}(n^{2})\) preprocessing time, we can support any constant number of edge-flips, vertex insertions, and vertex deletions in \(O(\log n)\) time per operation. For an arbitrary number of edge-flips, we present a randomized algorithm that maintains a kingdom in \(O(\log n)\) expected time following every edge-flip, and another algorithm that supports vertex insertions in \(O(\sqrt{n})\) amortized time per insertion.