← 研踪 PaperTrailarXiv:2611.37616 · v1
Nearly-Optimal Dynamic Subtree Mode
首次提交 2026-11-27 23:34
版本更新 2026-11-27 23:34
雷达观测 2026-11-30 15:39
摘要
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 nodes, we propose a linear-space data structure with preprocessing and, for any , query and update times and , respectively. This trade-off is polynomially optimal under the Online Matrix-Vector Multiplication conjecture. For trees of height , query and update times improve to and , 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 time and recolorings and leaf insertions and deletions in 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.
观测到的版本
相邻记录可能跳过中间版本;首次发现 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 nodes, we propose a linear-space data structure with preprocessing and, for any , query and update times and , respectively. This trade-off is polynomially optimal under the Online Matrix-Vector Multiplication conjecture. For trees of height , query and update times improve to and , 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 time and recolorings and leaf insertions and deletions in 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.
查看此版本解读 →查看此版本原文 ↗