English

Efficient and Compact Representations of Some Non-Canonical Prefix-Free Codes

Data Structures and Algorithms 2021-04-02 v3

Abstract

For many kinds of prefix-free codes there are efficient and compact alternatives to the traditional tree-based representation. Since these put the codes into canonical form, however, they can only be used when we can choose the order in which codewords are assigned to symbols. In this paper we first show how, given a probability distribution over an alphabet of σ\sigma symbols, we can store an optimal alphabetic prefix-free code in \OhσlogL\Oh{\sigma \log L} bits such that we can encode and decode any codeword of length \ell in \Ohmin(,logL)\Oh{\min (\ell, \log L)} time, where LL is the maximum codeword length. With \Oh2Lϵ\Oh{2^{L^\epsilon}} further bits, for any constant ϵ>0\epsilon>0, we can encode and decode \Ohlog\Oh{\log \ell} time. We then show how to store a nearly optimal alphabetic prefix-free code in o(σ)o (\sigma) bits such that we can encode and decode in constant time. We also consider a kind of optimal prefix-free code introduced recently where the codewords' lengths are non-decreasing if arranged in lexicographic order of their reverses. We reduce their storage space to \OhσlogL\Oh{\sigma \log L} while maintaining encoding and decoding times in \Oh\Oh{\ell}. We also show how, with \Oh2ϵL\Oh{2^{\epsilon L}} further bits, we can encode and decode in constant time. All of our results hold in the word-RAM model.

Keywords

Cite

@article{arxiv.1605.06615,
  title  = {Efficient and Compact Representations of Some Non-Canonical Prefix-Free Codes},
  author = {Antonio Fariña and Travis Gagie and Szymon Grabowski and Giovanni Manzini and Gonzalo Navarro and Alberto Ordóñez},
  journal= {arXiv preprint arXiv:1605.06615},
  year   = {2021}
}

Comments

This research has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie Actions H2020-MSCA-RISE-2015 BIRDS GA No. 690941. A preliminary version was presented at the 23rd International Symposium on String Processing and Information Retrieval (SPIRE '16)