跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2611.37616 · v1

Nearly-Optimal Dynamic Subtree Mode

首次提交 2026-11-27 23:34
版本更新 2026-11-27 23:34
雷达观测 2026-11-30 15:39
arXiv ↗PDF ↗

摘要

Computing the mode (i.e., the most frequent element) in a range of an array, or in a path of a colored tree, has been studied extensively in both the static and dynamic setting. However, the problem of computing the mode in a subtree of a leaf-colored tree, referred to as the Subtree Mode (SM), has only been studied in the static setting, despite its applications in domains ranging from file systems, to e-commerce, and bioinformatics. Here, we study the SM problem as the tree undergoes changes. We define Dynamic Subtree Mode (DSM), which asks for a data structure supporting leaf recolorings in a fixed tree, and Fully Dynamic Subtree Mode (FDSM), which additionally supports leaf insertions and deletions and subtree moves. For DSM on a tree of nn nodes, we propose a linear-space data structure with O(n)O(n) preprocessing and, for any α∈[0,1]α\in [0,1], query and update times O~(nα)\tilde{O}(n^α) and O~(n1−α)\tilde{O}(n^{1-α}), respectively. This trade-off is polynomially optimal under the Online Matrix-Vector Multiplication conjecture. For trees of height hh, query and update times improve to O~(1)\tilde{O}(1) and O~(h)\tilde{O}(h), respectively. For FDSM, a logarithmic-overhead reduction from Dynamic Range Mode gives a conditional lower bound. For a color set ΔΔ, we obtain a linear-space data structure supporting queries and subtree moves in O~(∣Δ∣)\tilde{O}(|Δ|) time and recolorings and leaf insertions and deletions in O~(1)\tilde{O}(1) time. Thus, while DSM exploits the tree structure to achieve query-update trade-offs that are conditionally impossible for Dynamic Range Mode, FDSM inherits its conditional hardness but admits efficient solutions when ∣Δ∣|Δ| is small. Experiments on datasets from different domains, as well as case studies using workloads from e-commerce and file systems, show speedups of orders of magnitude over natural baselines.

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只收录了一个版本。收录下一版后,可以对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v1 · 2026-11-27 23:34 · 最新观测版本

Nearly-Optimal Dynamic Subtree Mode

Computing the mode (i.e., the most frequent element) in a range of an array, or in a path of a colored tree, has been studied extensively in both the static and dynamic setting. However, the problem of computing the mode in a subtree of a leaf-colored tree, referred to as the Subtree Mode (SM), has only been studied in the static setting, despite its applications in domains ranging from file systems, to e-commerce, and bioinformatics. Here, we study the SM problem as the tree undergoes changes. We define Dynamic Subtree Mode (DSM), which asks for a data structure supporting leaf recolorings in a fixed tree, and Fully Dynamic Subtree Mode (FDSM), which additionally supports leaf insertions and deletions and subtree moves. For DSM on a tree of nn nodes, we propose a linear-space data structure with O(n)O(n) preprocessing and, for any α∈[0,1]α\in [0,1], query and update times O~(nα)\tilde{O}(n^α) and O~(n1−α)\tilde{O}(n^{1-α}), respectively. This trade-off is polynomially optimal under the Online Matrix-Vector Multiplication conjecture. For trees of height hh, query and update times improve to O~(1)\tilde{O}(1) and O~(h)\tilde{O}(h), respectively. For FDSM, a logarithmic-overhead reduction from Dynamic Range Mode gives a conditional lower bound. For a color set ΔΔ, we obtain a linear-space data structure supporting queries and subtree moves in O~(∣Δ∣)\tilde{O}(|Δ|) time and recolorings and leaf insertions and deletions in O~(1)\tilde{O}(1) time. Thus, while DSM exploits the tree structure to achieve query-update trade-offs that are conditionally impossible for Dynamic Range Mode, FDSM inherits its conditional hardness but admits efficient solutions when ∣Δ∣|Δ| is small. Experiments on datasets from different domains, as well as case studies using workloads from e-commerce and file systems, show speedups of orders of magnitude over natural baselines.

查看此版本解读 →查看此版本原文 ↗