Fully-Online Grammar Compression
Fully-Online Grammar Compression
复制标题
DOI:
10.1007/978-3-319-02432-5_25
复制
发表时间:
2013-10
期刊:
影响因子:
--
通讯作者:
Shirou Maruyama;Yasuo Tabei;H. Sakamoto;K. Sadakane
中科院分区:
文献类型:
--
作者:
Shirou Maruyama;Yasuo Tabei;H. Sakamoto;K. Sadakane
We present a fully-online algorithm for constructing straight-line programs (SLPs). A naive array representation of an SLP withnvariables on an alphabet of sizeσrequiresbits. As already shown in [Tabei et al., CPM’13], in offline setting, this size can be reduced to, which is asymptotically equal to the information-theoretic lower bound. Our algorithm achieves the same size in online setting, i.e., characters of an input string are given one by one to update the current SLP. With an auxiliary position array of sizebits, our representation supports substring extractions inO((m+h)t) time whereNis the length of the input string,mis the length of a substring extracted,is the height of the SLP,t=O(1) in offline case, andin online case. The working space is bounded bybits depending on a constantα∈ (0,1], which is a load factor of hash tables. We compared our algorithm to LZend in experiments using real world repetitive texts.