arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.03690cs.DS
收藏

存储具有紧致可预测空间的Trie

Storing a Trie with Compact and Predictable Space

Yuxuan Dong

摘要:

本文提出了一种Trie结构的存储方法,称为坐标哈希Trie。其基本思想是使用一个全局哈希表和一个特殊的哈希函数来存储trie的所有边。对于具有$n$节点和大小为$m$的字母表的trie,查找、插入和删除子节点的执行时间对于平均情况为$O(1)$,对于最坏情况为$O(m)$。这种方法使用的空间是$O(n)$,与$m$无关。空间消耗的常数是可预测的,不需要重新分配或重新分配。此外,这种方法非常容易实现。

英文摘要:

This paper proposed a storing approach for trie structures, called coordinate hash trie. The basic idea is using a global hash table with a special hash function to store all edges of a trie. For a trie with $n$ nodes and an alphabet with size $m$, the execution time of finding, inserting and deleting a child node, is $O(1)$ for the average case, $O(m)$ for the worst case. The space used by this approach is $O(n)$, unrelated to $m$. The constant of space consumption is predictable, with no need for reallocation or resizing. In addition, this approach is very easy to implement.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑