6 research outputs found

    Minimax Trees in Linear Time with Applications

    Get PDF
    A minimax tree is similar to a Huffman tree except that, instead of minimizing the weighted average of the leaves\u27 depths, it minimizes the maximum of any leaf\u27s weight plus its depth. Golumbic (1976) introduced minimax trees and gave a Huffman-like, O(nlogn)O (n log n)-time algorithm for building them. Drmota and Szpankowski (2002) gave another O(nlogn)O (n log n)-time algorithm, which takes linear time when the weights are already sorted by their fractional parts. In this paper we give the first linear-time algorithm for building minimax trees for unsorted real weights

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

    Get PDF
    The final publication is available at Springer via http://dx.doi.org/10.1007/978-3-319-46049-9_5[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 characters. In this paper we first show how, given a probability distribution over an alphabet of σσ characters, we can store a nearly optimal alphabetic prefix-free code in o(σ)o(σ) bits such that we can encode and decode any character in constant time. We then consider a kind of code introduced recently to reduce the space usage of wavelet matrices (Claude, Navarro, and Ordóñez, Information Systems, 2015). They showed how to build an optimal prefix-free code such that the codewords’ lengths are non-decreasing when they are arranged such that their reverses are in lexicographic order. We show how to store such a code in O(σlogL+2Ï”L)O(σlog⁥L+2Ï”L) bits, where L is the maximum codeword length and ϔϔ is any positive constant, such that we can encode and decode any character in constant time under reasonable assumptions. Otherwise, we can always encode and decode a codeword of ℓℓ bits in time O(ℓ)O(ℓ) using O(σlogL)O(σlog⁥L) bits of space.Ministerio de EconomĂ­a, Industria y Competitividad; TIN2013-47090-C3-3-PMinisterio de EconomĂ­a, Industria y Competitividad; TIN2015-69951-RMinisterio de EconomĂ­a, Industria y Competitividad; ITC-20151305Ministerio de EconomĂ­a, Industria y Competitividad; ITC-20151247Xunta de Galicia; GRC2013/053Chile. NĂșcleo Milenio InformaciĂłn y CoordinaciĂłn en Redes; ICM/FIC.P10-024FCOST. IC1302Academy of Finland; 268324Academy of Finland; 25034

    Restructuring Ordered Binary Trees

    No full text
    We consider the problem of restructuring an ordered binary tree T, preserving the in-order sequence of its nodes, so as to reduce its height to some target value h. Such a restructuring necessarily involves the downward displacement of some of the nodes of T. Our results, focusing both on the maximum displacement over all nodes and on the maximum displacement over leaves only, provide (i) an explicit tradeoff between the worst-case displacement and the height restriction (including a family of trees that exhibit the worst case displacements) and (ii) ecient algorithms to achieve height-restricted restructuring while minimizing the maximum node displacement
    corecore