有向圖的連通問題 Reachability
有向圖版本的動態資料結構,需要支援的操作有:
- 更新類型的操作:
- Insert(\(u, v\)): 新增一條從 \(u\) 連到 \(v\) 的邊。
- Delete(\(u, v\)): 移除一條已存在的 \((u, v)\) 邊。
- 查詢類型的操作:
- Query(\(u, v\)): 詢問在當前的圖中是否 \(u\) 走得到 \(v\),如果是的話回傳 yes。
Fully Dynamic Reachability
均攤更新時間
演算法文獻 | 均攤更新時間 Amortized Update Time | 最差查詢時間 | ||
---|---|---|---|---|
Demetrescu-Italiano1, Roditty2 | general | 確定性 | \(O(n^2)\) | \(O(1)\) |
Henzinger-King3 | general | 蒙地卡羅 | \(O(m\sqrt{n}\log^2n)\) | \(O(n/\log n)\) |
Roditty-Zwick4 | general | 確定性 | \(O(m\sqrt{n})\) | \(O(\sqrt{n})\) |
Roditty-Zwick4 | general | 蒙地卡羅 | \(O(m^{0.58}n)\) | \(O(m^{0.43})\) |
Demetrescu-Italiano5 | DAGs | 蒙地卡羅 | \(O(n^{1.58})\) | \(O(n^{0.58})\) |
Roditty-Zwick6 | general | 確定性 | \(O(m + n\log n)\) | \(O(n)\) |
最差更新時間
演算法文獻 | 最差更新時間 Worst Case Update Time | 最差查詢時間 | ||
---|---|---|---|---|
Sankowski7 | general | 蒙地卡羅 | \(O(n^2)\) | \(O(1)\) |
Sankowski7 | general | 蒙地卡羅 | \(O(n^{1.58})\) | \(O(n^{0.58})\) |
Sankowski7 | general | 蒙地卡羅 | \(O(n^{1.447})\)8 | \(O(n^{1.447})\)8 |
van den Brand, Nanongkai, Saranurak8 | general | 蒙地卡羅 | \(O(n^{1.407})\) | \(O(n^{1.407})\) |
Incremental Reachability
演算法文獻 | 更新時間 | 最差查詢時間 | ||
---|---|---|---|---|
Italiano9 | general | 確定性 | 均攤 \(O(n)\) | \(O(n)\) |
Decremental Reachability
演算法文獻 | 更新時間 | 最差查詢時間 | ||
---|---|---|---|---|
Frigioni, Miller, Nanni, Zaroliagis10 | general | 確定性 | 全部 \(O(m^2)\) | \(O(1)\) |
Roditty-Zwick4 | general | 拉斯維加斯 | 全部 \(O(mn)\) | \(O(1)\) |
Łącki11 | general | 確定性 | 全部 \(O(mn)\) | \(O(1)\) |
參考資料
Roditty and Zwick, Improved Dynamic Reachability Algorithms for Directed Graphs. SIAM J. Comput 2008.
Roditty and Zwick, A Fully Dynamic Reachability Algorithm for Directed Graphs with an Almost Linear Update Time. SIAM J. Comput 2016.
Sankowski, Dynamic transitive closure via dynamic matrix inverse. FOCS 2004.
van den Brand, Nanongkai, and Saranurak. Dynamic Matrix Inverse: Improved Algorithms and Matching Conditional Lower Bounds. FOCS 2019.
G.F.Italiano, Amortized Efficiency of a Path Retrieval Data Structure. TCS 1986.
Liam Roditty, A Faster and Simpler Fully Dynamic Transitive Closure. SODA 2003. TALG 2008.
C. Demetrescu and G.F. Italiano, Fully Dynamic Transitive Closure: Breaking Through the \(O(n^2)\) Barrier. FOCS 2000.
C. Demetrescu and G.F. Italinao, Trade-offs for Fully Dynamic Transitive Closure on DAGs: Breaking Through the \(O(n^2)\) Barrier. J ACM 2005.
M.R. Henzinger and V. King, Fully Dynamic Biconnectivity and Transtive Closure. FOCS 1995.
J Łącki, Improved Deterministic Algorithms for Decremental Transitive Closure. SODA 2011. TALG 2013.
Frigioni, Miller, Nanni, and Zaroliagis, An Experimental Study of Dynamic Algorithms for Transitive Closure, J of Experimental Algorithms 2001.