Professional Documents
Culture Documents
1
20-02-2023
2
20-02-2023
3
20-02-2023
Algorithm
32 11
11
21 10
f 9
10 7 11 8
5 5 6
5 4
c d 5 e 6
3
2 3
a b
1 2
Note that node numbering corresponds to the order in which the
nodes are combined by Huffman’s algorithm, first nodes 1 and 2,
then nodes 3 and 4 ...
DCE//SEM VI//Extc//Dr. Vishakha Kelkar
Algorithm
4
20-02-2023
Algorithm
Algorithm
5
20-02-2023
Algorithm
Algorithm
The basis for algorithm FGK is the Sibling
Property (Gallager 1978)
A binary code tree with nonnegative weights has the
sibling property if each node (except the root) has a
sibling and if the nodes can be numbered in order of
increasing weight with each node adjacent to its
sibling. Moreover the parent of a node is higher in
the numbering
6
20-02-2023
Algorithm(update procedure)
Algorithm(update procedure)
7
20-02-2023
Algorithm FGK
Algorithm(update procedure)
32 11
33 b
Suppose next
11
21 10
symbol is “b”
f 9 22
if we update the
11
10 7 11 8 weigths...
... sibling
5 5 6
c
65
4 d 5 e 6 property is
3 violated!!
2 43 This is no more a
a b
1 2 Huffman tree
no more ordered by
nondecreasing weight
Algorithm FGK
Algorithm(update procedure)
33 11
32 b
12
11
21 10
f 9
6 10 7 11 8
4 5 5 6
5 4
c d 5 e 6
3
2 3
a b
1 2
8
20-02-2023
Algorithm
Algorithm
9
20-02-2023
Algorithm
Algorithm
10
20-02-2023
Algorithm
Algorithm
11
20-02-2023
Algorithm FGK
Algorithm adaptive huffman coding
compares favourably with static
Huffman code, if we consider also
overhead costs (it is used in the Unix utility
compact)
Exercise
Construct the static Huffman tree and the FGK tree
(adaptive huffman tree)for the message .Also
generate th ecode and decode the data.
e eae deedba
12
20-02-2023
References:
Data compression: Khalid Sayood.
Animations
www.csie.mcu.edu.tw/~yklee/Courses/Compre
ssion/DC-CH03.pdf
13