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 σ symbols, we can store an optimal alphabetic prefix-free code in O(σlg⁡L) bits such that we can encode and decode any codeword of length ℓ in O(min⁡(ℓ,lg⁡L)) time, where L is the maximum codeword length. With O(2Ljavax.xml.bind.JAXBElement@792bb21e) further bits, for any constant ϵ>0, we can encode and decode O(lg⁡ℓ) time. We then show how to store a nearly optimal alphabetic prefix-free code in o(σ) 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 O(σlg⁡L) while maintaining encoding and decoding times in O(ℓ). We also show how, with O(2ϵL) further bits, we can encode and decode in constant time. All of our results hold in the word-RAM model.

Efficient and compact representations of some non-canonical prefix-free codes

Manzini G.;
2022-01-01

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 σ symbols, we can store an optimal alphabetic prefix-free code in O(σlg⁡L) bits such that we can encode and decode any codeword of length ℓ in O(min⁡(ℓ,lg⁡L)) time, where L is the maximum codeword length. With O(2Ljavax.xml.bind.JAXBElement@792bb21e) further bits, for any constant ϵ>0, we can encode and decode O(lg⁡ℓ) time. We then show how to store a nearly optimal alphabetic prefix-free code in o(σ) 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 O(σlg⁡L) while maintaining encoding and decoding times in O(ℓ). We also show how, with O(2ϵL) further bits, we can encode and decode in constant time. All of our results hold in the word-RAM model.
2022
Farina, A.; Gagie, T.; Grabowski, S.; Manzini, G.; Navarro, G.; Ordonez, A.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11568/1133509
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
social impact