复杂度和更新效率可协调的树枚举算法
Enumeration on Trees with Tractable Combined Complexity and Efficient Updates
摘要:
我们给出了一个算法来枚举树的一元二阶(MSO)查询表示的不确定树自动机的结果。在线性时间预处理(在输入树中)之后,我们可以枚举具有线性延迟的答案(在每个答案中)。我们允许在树上的更新在任何时候发生,然后我们可以在树中的对数时间之后重新开始枚举。此外,我们所有的组合复杂度在自动机中是多项式的。我们的结果遵循我们以前的基于电路的枚举算法的基础上确定性树自动机,也受到我们以前的结果的启发,在文档speries的上下文中的单词和非确定性顺序扩展变量集自动机。我们扩展这些结果,并将它们与最近的树平衡计划Niewerth,使我们的枚举结构支持更新的基础树在对数时间(叶插入,叶删除,和节点重新标记)。我们的结果意味着,对于MSO查询与自由的一阶变量,我们可以枚举的结果与线性预处理和常数延迟和更新的基础树在对数时间,这改善了几个已知的结果的话和树。从数据结构的研究下界的基础上,我们还无条件地表明,我们的算法的更新时间的双对数因子是最佳的。因此,与其他设置不同,不可能存在具有恒定更新时间的算法。
英文摘要:
We give an algorithm to enumerate the results on trees of monadic second-order (MSO) queries represented by nondeterministic tree automata. After linear time preprocessing (in the input tree), we can enumerate answers with linear delay (in each answer). We allow updates on the tree to take place at any time, and we can then restart the enumeration after logarithmic time in the tree. Further, all our combined complexities are polynomial in the automaton. Our result follows our previous circuit-based enumeration algorithms based on deterministic tree automata, and is also inspired by our earlier result on words and nondeterministic sequential extended variable-set automata in the context of document spanners. We extend these results and combine them with a recent tree balancing scheme by Niewerth, so that our enumeration structure supports updates to the underlying tree in logarithmic time (with leaf insertions, leaf deletions, and node relabelings). Our result implies that, for MSO queries with free first-order variables, we can enumerate the results with linear preprocessing and constant-delay and update the underlying tree in logarithmic time, which improves on several known results for words and trees. Building on lower bounds from data structure research, we also show unconditionally that up to a doubly logarithmic factor the update time of our algorithm is optimal. Thus, unlike other settings, there can be no algorithm with constant update time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。