TY - GEN
T1 - Partial alphabetic trees
AU - Barkan, Arye
AU - Kaplan, Haim
N1 - Publisher Copyright:
© Springer-Verlag Berlin Heidelberg 2002.
PY - 2002
Y1 - 2002
N2 - In the partial alphabetic tree problem we are given a multiset of nonnegative weights W = {w1,…, wn}, partitioned into k≤n blocks B1,…, Bk. We want to find a binary tree T where the elements of W resides in its leaves such that if we traverse the leaves from left to right then all leaves of B1 precede all leaves of Bj for every iNi=1 wid(wi), where d(wi) is the depth of wi in T. The partial alphabetic tree problem generalizes the problem of finding a Huffman tree over W (there is only one block) and the problem of finding a minimum cost alphabetic tree over W (each block consists of a single item). This fundamental problem arises when we want to find an optimal search tree over a set of items which may have equal keys and when we want to find an optimal binary code for a set of items with known frequencies, such that we have a lexicographic restriction for some of the codewords. Our main result is a pseudo-polynomial time algorithm that finds the optimal tree. Our algorithm runs in (formula presented) time where (formula presented). In particular the running time is polynomial in case the weights are bounded by a polynomial of n. To bound the running time of our algorithwe prove an upper bound of [αlog(Wsum/Wmin)+1] on the depth of the optimal tree. Our algorithm relies on a solution to what we call the layered Huffman forest problem which is of independent interest. In the layered Huffman forest problem we are given an unordered multiset of weights W = {w1,…, wn}, and a multiset of integers D = {d1,…, dm}.We look for a forest F with m trees, T1,…, Tm, where the weights in W correspond to the leaves of F, that minimizes ∑ ni=1 widF(wi) where dF (wi) is the depth of wi in its tree plus di wi € Ti. Our algorithm for this problem runs in O(kn2)time.
AB - In the partial alphabetic tree problem we are given a multiset of nonnegative weights W = {w1,…, wn}, partitioned into k≤n blocks B1,…, Bk. We want to find a binary tree T where the elements of W resides in its leaves such that if we traverse the leaves from left to right then all leaves of B1 precede all leaves of Bj for every iNi=1 wid(wi), where d(wi) is the depth of wi in T. The partial alphabetic tree problem generalizes the problem of finding a Huffman tree over W (there is only one block) and the problem of finding a minimum cost alphabetic tree over W (each block consists of a single item). This fundamental problem arises when we want to find an optimal search tree over a set of items which may have equal keys and when we want to find an optimal binary code for a set of items with known frequencies, such that we have a lexicographic restriction for some of the codewords. Our main result is a pseudo-polynomial time algorithm that finds the optimal tree. Our algorithm runs in (formula presented) time where (formula presented). In particular the running time is polynomial in case the weights are bounded by a polynomial of n. To bound the running time of our algorithwe prove an upper bound of [αlog(Wsum/Wmin)+1] on the depth of the optimal tree. Our algorithm relies on a solution to what we call the layered Huffman forest problem which is of independent interest. In the layered Huffman forest problem we are given an unordered multiset of weights W = {w1,…, wn}, and a multiset of integers D = {d1,…, dm}.We look for a forest F with m trees, T1,…, Tm, where the weights in W correspond to the leaves of F, that minimizes ∑ ni=1 widF(wi) where dF (wi) is the depth of wi in its tree plus di wi € Ti. Our algorithm for this problem runs in O(kn2)time.
UR - http://www.scopus.com/inward/record.url?scp=84938071075&partnerID=8YFLogxK
U2 - 10.1007/3-540-45749-6_14
DO - 10.1007/3-540-45749-6_14
M3 - פרסום בספר כנס
AN - SCOPUS:84938071075
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 114
EP - 125
BT - Algorithms - ESA 2002 - 10th Annual European Symposium, Proceedings
A2 - Möhring, Rolf
A2 - Raman, Rajeev
PB - Springer Verlag
Y2 - 17 September 2002 through 21 September 2002
ER -