计算机科学 > 数据结构与算法
[提交于 2024年10月10日]
标题:Packed Acyclic Deterministic Finite Automata
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:An acyclic deterministic finite automaton (ADFA) is a data structure that represents a set of strings (i.e., a dictionary) and facilitates a pattern searching problem of determining whether a given pattern string is present in the dictionary. We introduce the packed ADFA (PADFA), a compact variant of ADFA, which is designed to achieve more efficient pattern searching by encoding specific paths as packed strings stored in contiguous memory. We theoretically demonstrate that pattern searching in PADFA is near time-optimal with a small additional overhead and becomes fully time-optimal for sufficiently long patterns. Moreover, we prove that a PADFA requires fewer bits than a trie when the dictionary size is relatively smaller than the number of states in the PADFA. Lastly, we empirically show that PADFAs improve both the space and time efficiency of pattern searching on real-world datasets.
提交历史
来自:Hiroki Shiata[v1] 2024年10月10日 星期四 04:21:16 UTC