视频链接

截图的笔记来源

mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree
主要思路是维护一个有根(无序)树的森林,保证每个操作的分摊复杂度为 O(log(n))O(\log(n)),用平衡树来表示不平衡树。

mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree
mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree

access(v) 是核心操作。笔记中有一个笔误,见图片中的箭头

mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree
有了 access 之后,其他函数都很好写。

mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree
开始对复杂度进行分析,核心是分析 access 的复杂度,首先给出了一个 O(log2n)O(\log^2n) 的界,这个界是通过重链剖分来得到的。

mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree
mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree
根据 splay 的势能分析法可以得到一个更紧的界:O(logn)O(\log{n})

mit 6.851 Advanced Data Structures L19 Dynamic Graphs I : Link-Cut Tree

相关文章:

  • 2022-02-02
  • 2021-06-20
  • 2021-10-17
  • 2021-07-05
  • 2021-08-09
  • 2021-12-19
  • 2021-06-15
  • 2022-01-25
猜你喜欢
  • 2021-05-29
  • 2021-09-13
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2021-04-30
  • 2022-02-15
相关资源
相似解决方案