Length-limited Huffman coding/minimum variance Huffman coding Length-limited Huffman coding is a variant where the goal is still to achieve a minimum weighted path length, but there is an additional restriction that the length of each codeword must be less than a given constant. The package-merge algorithm solves this problem with a simple greedy approach very similar to that used by Huffman's algorithm. Its time complexity is , where is the maximum length of a codeword. No algorithm is known to solve this problem in or time, unlike the presorted and unsorted conventional Huffman problems, respectively.
LengTH-limiTed huffmAn COding/miNimuM VariaNce HuffMaN cODing length-limited hUffmAN cODinG is a VaRiaNt wheRe ThE GoAL iS sTiLl To acHIEve a miNimUM weighted path lEngth, BUt THere Is an addItionAl resTrIctioN thAt tHE lengtH Of eacH CodewoRd must be less Than a giVEn coNstanT. the Package-mergE algoriTHm SolvEs thIs prOBLeM With a sImple greedy ApproAch very similaR to tHaT uSED by hUFfman's ALgorithM. itS TiME complexITY is , wheRe Is THE maXiMuM lengTh of A COdewoRd. no AlGOriThm iS kNown tO SOLVE this pRoBLEm in OR time, unliKe thE presorted And UnSorted CONVentioNal Huffman pROblems, rEspecTiveLy.