Ahmed Elmasry - Academia.edu (original) (raw)

Ahmed Elmasry

Uploads

Papers by Ahmed Elmasry

Research paper thumbnail of Distribution-Sensitive Construction of Minimum-Redundancy Prefix Codes

Computing Research Repository, 2005

A new method for constructing minimum-redundancy prefix codes is described. This method does not ... more A new method for constructing minimum-redundancy prefix codes is described. This method does not build a Huffman tree; instead it uses a property of optimal codes to find the codeword length of each weight. The running time of the algorithm is shown to be O(nk), where n is the number of weights and k is the number of different codeword lengths. When the given sequence of weights is already sorted, it is shown that the codes can be constructed using O(log 2k−1 n) comparisons, which is sub-linear if the value of k is small.

Research paper thumbnail of Optimal Prefix Codes with Fewer Distinct Codeword Lengths are Easier to Construct

A new method for constructing minimum-redundancy binary prefix codes is described. Our method doe... more A new method for constructing minimum-redundancy binary prefix codes is described. Our method does not explicitly build a Huffman tree; instead it uses a property of optimal prefix codes to compute the codeword lengths corresponding to the input weights. Let nnn be the number of weights and kkk be the number of distinct codeword lengths. The running time of our algorithm is O(16kcdotn)O(16^k \cdot n)O(16kcdotn), which is asymptotically faster than Huffman's algorithm for sufficiently small kkk. If the given weights were presorted, our algorithm requires O(9kcdotlog2k−1n)O(9^k \cdot \log^{2k-1}{n})O(9kcdotlog2k1n) comparisons, which is sub-linear for sufficiently small kkk.

Research paper thumbnail of Distribution-Sensitive Construction of Minimum-Redundancy Prefix Codes

A new method for constructing minimum-redundancy prefix codes is described. This method does not ... more A new method for constructing minimum-redundancy prefix codes is described. This method does not build a Huffman tree; instead it uses a property of optimal codes to find the codeword length of each weight. The running time of the algorithm is shown to be O(nk), where n is the number of weights and k is the number of different codeword lengths. When the given sequence of weights is already sorted, it is shown that the codes can be constructed using O(log2k− 1n) comparisons, which is sub-linear if the value of k is small.

Research paper thumbnail of Verification of minimum-redundancy prefix codes

IEEE Transactions on Information Theory, 2006

We show that verifying a given prefix code for optimality requires Ω(n log n) time, indicating th... more We show that verifying a given prefix code for optimality requires Ω(n log n) time, indicating that the verification problem is not asymptotically easier than the construction problem. Alternatively, we give linear-time verification algorithms for several special cases that are either typical in practice or theoretically interesting.

Research paper thumbnail of Reaching the Bound in the (2, n) merging Problem

Information Sciences, 1998

INFORMATION SCIENCES nONAL AL ELSEVIER Information Sciences 111 (1998) 261271 Reaching the bound ... more INFORMATION SCIENCES nONAL AL ELSEVIER Information Sciences 111 (1998) 261271 Reaching the bound in the (2,n) merging problem Ahmed A. Belal *, Amr Elmasry Computer Science Department, University of Alexandria, Egypt Received 3 January 1996; received ...

Research paper thumbnail of Distribution-Sensitive Construction of Minimum-Redundancy Prefix Codes

Computing Research Repository, 2005

A new method for constructing minimum-redundancy prefix codes is described. This method does not ... more A new method for constructing minimum-redundancy prefix codes is described. This method does not build a Huffman tree; instead it uses a property of optimal codes to find the codeword length of each weight. The running time of the algorithm is shown to be O(nk), where n is the number of weights and k is the number of different codeword lengths. When the given sequence of weights is already sorted, it is shown that the codes can be constructed using O(log 2k−1 n) comparisons, which is sub-linear if the value of k is small.

Research paper thumbnail of Optimal Prefix Codes with Fewer Distinct Codeword Lengths are Easier to Construct

A new method for constructing minimum-redundancy binary prefix codes is described. Our method doe... more A new method for constructing minimum-redundancy binary prefix codes is described. Our method does not explicitly build a Huffman tree; instead it uses a property of optimal prefix codes to compute the codeword lengths corresponding to the input weights. Let nnn be the number of weights and kkk be the number of distinct codeword lengths. The running time of our algorithm is O(16kcdotn)O(16^k \cdot n)O(16kcdotn), which is asymptotically faster than Huffman's algorithm for sufficiently small kkk. If the given weights were presorted, our algorithm requires O(9kcdotlog2k−1n)O(9^k \cdot \log^{2k-1}{n})O(9kcdotlog2k1n) comparisons, which is sub-linear for sufficiently small kkk.

Research paper thumbnail of Distribution-Sensitive Construction of Minimum-Redundancy Prefix Codes

A new method for constructing minimum-redundancy prefix codes is described. This method does not ... more A new method for constructing minimum-redundancy prefix codes is described. This method does not build a Huffman tree; instead it uses a property of optimal codes to find the codeword length of each weight. The running time of the algorithm is shown to be O(nk), where n is the number of weights and k is the number of different codeword lengths. When the given sequence of weights is already sorted, it is shown that the codes can be constructed using O(log2k− 1n) comparisons, which is sub-linear if the value of k is small.

Research paper thumbnail of Verification of minimum-redundancy prefix codes

IEEE Transactions on Information Theory, 2006

We show that verifying a given prefix code for optimality requires Ω(n log n) time, indicating th... more We show that verifying a given prefix code for optimality requires Ω(n log n) time, indicating that the verification problem is not asymptotically easier than the construction problem. Alternatively, we give linear-time verification algorithms for several special cases that are either typical in practice or theoretically interesting.

Research paper thumbnail of Reaching the Bound in the (2, n) merging Problem

Information Sciences, 1998

INFORMATION SCIENCES nONAL AL ELSEVIER Information Sciences 111 (1998) 261271 Reaching the bound ... more INFORMATION SCIENCES nONAL AL ELSEVIER Information Sciences 111 (1998) 261271 Reaching the bound in the (2,n) merging problem Ahmed A. Belal *, Amr Elmasry Computer Science Department, University of Alexandria, Egypt Received 3 January 1996; received ...

Log In