文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > Constructing Huffman Trees in parallel
侵权投诉

Constructing Huffman Trees in parallel

We present a parallel algorithm for the Huffman Coding problem. We reduce the Huffman Coding problem to the Concave Least Weight Subsequence problem and give a parallel algorithm that solves the latter problem in O( p n log n) time with n processors on a C

The inequality (2) is also called the quadrangle inequality 18]. The LWS problem with the restriction that the weight function is concave is called the Concave Least Weight Subsequence (CLWS) problem. Hirschberg and Larmore 7] show that the LWS problem can be solved in O(n ) sequential time, while the CLWS problem can be solved in O(n log n) time. Galil and Giancarlo 5] give an O(n log n) time bound for the Convex Least Weight Subsequence problem (i.e., when the weight function satis es the reverse of the inequality (2) ). Wilber 17] gives an O(n)-time algorithm for the CLWS problem. Linear time algorithms for this problem are also given by Klawe 12], Larmore and Schieber 15], and Galil and Park 6]. The best known sequential algorithm for the convex case is by Klawe and Kleitman 13]. Their algorithm requires O(n (n)) time, where is the inverse of Ackerman function. All of these algorithms actually solve the single source problems. In the parallel setting, the CLWS problem seems to be more di cult than the corresponding convex problem. Lam and Chan 14] present an O(log n log log n)-time, n= log log n-processor CREW PRAM algorithm to solve the convex problem. On the other hand, the best current NC algorithm for the CLWS problem uses concave matrix multiplication techniques 1, 2, 3] and p requires O(log n) time with n= log n processors. In this paper, we present an O( n log n)time n-processor CREW PRAM algorithm to solve the CLWS problem. This paper is organized as follows. In Section 2, we give a parallel algorithm for the CLWS problem. In Section 3, we reduce the Hu man coding problem to the CLWS problem. We conclude with some open questions. 2 2 2 2 2

2 The Parallel Single Source CLWS Algorithm Consider an instance of the concave least weight subsequence problem over 0; n] de ned by a weight function w, and let lws (i; j ) denote the least weight subsequence problem on i; j] de ned by restricting w to pairs within that interval. Let W (i; j ) be the weight of an optimal solution to lws (i; j ). For convenience, we let W (i; i)= 0 for all i. De ne and

f (j )= W (0; j ) 8< unde ned for j= 0 pred (j )=: minfi j i< j; f (j )= f (i)+ w(i; j )g for 0< j n F (j )= (f (j ); pred(j )) 2

Thus f (j ) is equal to the weight of a least weight subsequence for the interval 0; j] and pred (j )

上一页第3页

你可能喜欢

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email