===================================== Creating Length-Limited Huffman Codes ===================================== #============================================= # n-ary Huffman Template Algorithm # http://sourceforge.net/projects/huffman-ta # Version 2.4 #............................................. # Alex Vinokur # http://up.to/alexvn # alex DOT vinokur AT gmail DOT com #--------------------------------------------- # MINGW # GNU gcc version 3.3.3 #--------------------------------------------- # START # Thu Sep 30 18:28:43 2004 #============================================= ------> YOUR COMMAND LINE : demo.exe ########### showAll (BEGIN) ########### ===== Delta Test-1: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+0 1+0 4+0 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 1 Longest code size = 4 Weights sum = 21+0 Average weight = 4+0 Code-sizes sum = 14 Average code-size = 2.8 Weighted code-sizes sum = 42+0 Ave. weighted code-size = 8+0 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 1 7+0 B 01 4+0 C 001 1+0 D 0000 1+0 E 0001 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+0 D 0000 1+0 E 0001 4+0 C 001 7+0 B 01 8+0 A 1 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 8+0 A 1 7+0 B 01 4+0 C 001 1+0 D 0000 1+0 E 0001 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+0 D 0000 1+0 E 0001 4+0 C 001 7+0 B 01 8+0 A 1 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-2: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+0 1+1 4+0 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 1 Longest code size = 4 Weights sum = 21+1 Average weight = 4+0 Code-sizes sum = 14 Average code-size = 2.8 Weighted code-sizes sum = 42+4 Ave. weighted code-size = 8+0 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 1 7+0 B 01 4+0 C 001 1+1 D 0001 1+0 E 0000 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+0 E 0000 1+1 D 0001 4+0 C 001 7+0 B 01 8+0 A 1 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 8+0 A 1 7+0 B 01 4+0 C 001 1+0 E 0000 1+1 D 0001 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+0 E 0000 1+1 D 0001 4+0 C 001 7+0 B 01 8+0 A 1 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-3: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+1 1+1 4+0 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 1 Longest code size = 4 Weights sum = 21+2 Average weight = 4+0 Code-sizes sum = 14 Average code-size = 2.8 Weighted code-sizes sum = 42+8 Ave. weighted code-size = 8+1 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 1 7+0 B 01 4+0 C 001 1+1 D 0000 1+1 E 0001 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+1 D 0000 1+1 E 0001 4+0 C 001 7+0 B 01 8+0 A 1 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 8+0 A 1 7+0 B 01 4+0 C 001 1+1 D 0000 1+1 E 0001 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+1 D 0000 1+1 E 0001 4+0 C 001 7+0 B 01 8+0 A 1 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-4: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+1 1+2 4+0 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+3 Average weight = 4+0 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+9 Ave. weighted code-size = 8+1 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 10 4+0 C 01 1+2 D 001 1+1 E 000 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+1 E 000 1+2 D 001 4+0 C 01 7+0 B 10 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+0 C 01 7+0 B 10 8+0 A 11 1+1 E 000 1+2 D 001 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+1 E 000 1+2 D 001 4+0 C 01 7+0 B 10 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-5: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+2 1+2 4+0 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+4 Average weight = 4+0 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+12 Ave. weighted code-size = 8+2 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 10 4+0 C 01 1+2 D 000 1+2 E 001 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+2 D 000 1+2 E 001 4+0 C 01 7+0 B 10 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+0 C 01 7+0 B 10 8+0 A 11 1+2 D 000 1+2 E 001 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+2 D 000 1+2 E 001 4+0 C 01 7+0 B 10 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-6: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+2 1+3 4+0 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+5 Average weight = 4+1 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+15 Ave. weighted code-size = 8+3 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 10 4+0 C 01 1+3 D 001 1+2 E 000 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+2 E 000 1+3 D 001 4+0 C 01 7+0 B 10 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+0 C 01 7+0 B 10 8+0 A 11 1+2 E 000 1+3 D 001 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+2 E 000 1+3 D 001 4+0 C 01 7+0 B 10 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-7: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+3 1+3 4+0 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+6 Average weight = 4+1 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+18 Ave. weighted code-size = 8+3 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+0 C 00 1+3 D 100 1+3 E 101 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 4+0 C 00 7+0 B 01 1+3 D 100 1+3 E 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+0 C 00 7+0 B 01 8+0 A 11 1+3 D 100 1+3 E 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+3 D 100 1+3 E 101 4+0 C 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-8: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+3 4+0 1+4 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+7 Average weight = 4+1 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 47+17 Ave. weighted code-size = 9+3 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+0 C 101 1+4 D 00 1+3 E 100 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+4 D 00 7+0 B 01 1+3 E 100 4+0 C 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+4 D 00 7+0 B 01 8+0 A 11 1+3 E 100 4+0 C 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+3 E 100 4+0 C 101 1+4 D 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-9: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 4+0 1+4 1+4 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+8 Average weight = 4+1 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 47+20 Ave. weighted code-size = 9+4 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+0 C 100 1+4 D 101 1+4 E 00 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+4 E 00 7+0 B 01 4+0 C 100 1+4 D 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+4 E 00 7+0 B 01 8+0 A 11 4+0 C 100 1+4 D 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 4+0 C 100 1+4 D 101 1+4 E 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-10: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+4 1+4 4+1 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+9 Average weight = 4+1 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+26 Ave. weighted code-size = 8+5 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+1 C 00 1+4 D 100 1+4 E 101 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 4+1 C 00 7+0 B 01 1+4 D 100 1+4 E 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+1 C 00 7+0 B 01 8+0 A 11 1+4 D 100 1+4 E 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+4 D 100 1+4 E 101 4+1 C 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-11: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+4 4+1 1+5 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+10 Average weight = 4+2 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 47+25 Ave. weighted code-size = 9+5 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+1 C 101 1+5 D 00 1+4 E 100 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+5 D 00 7+0 B 01 1+4 E 100 4+1 C 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+5 D 00 7+0 B 01 8+0 A 11 1+4 E 100 4+1 C 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+4 E 100 4+1 C 101 1+5 D 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-12: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 4+1 1+5 1+5 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+11 Average weight = 4+2 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 47+28 Ave. weighted code-size = 9+5 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+1 C 100 1+5 D 101 1+5 E 00 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+5 E 00 7+0 B 01 4+1 C 100 1+5 D 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+5 E 00 7+0 B 01 8+0 A 11 4+1 C 100 1+5 D 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 4+1 C 100 1+5 D 101 1+5 E 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-13: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+5 1+5 4+2 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+12 Average weight = 4+2 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+34 Ave. weighted code-size = 8+6 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+2 C 00 1+5 D 100 1+5 E 101 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 4+2 C 00 7+0 B 01 1+5 D 100 1+5 E 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+2 C 00 7+0 B 01 8+0 A 11 1+5 D 100 1+5 E 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+5 D 100 1+5 E 101 4+2 C 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-14: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+5 4+2 1+6 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+13 Average weight = 4+2 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 47+33 Ave. weighted code-size = 9+6 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+2 C 101 1+6 D 00 1+5 E 100 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+6 D 00 7+0 B 01 1+5 E 100 4+2 C 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+6 D 00 7+0 B 01 8+0 A 11 1+5 E 100 4+2 C 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+5 E 100 4+2 C 101 1+6 D 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-15: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 4+2 1+6 1+6 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+14 Average weight = 4+2 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 47+36 Ave. weighted code-size = 9+7 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+2 C 100 1+6 D 101 1+6 E 00 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+6 E 00 7+0 B 01 4+2 C 100 1+6 D 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+6 E 00 7+0 B 01 8+0 A 11 4+2 C 100 1+6 D 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 4+2 C 100 1+6 D 101 1+6 E 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-16: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+6 1+6 4+3 7+0 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+15 Average weight = 4+3 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+42 Ave. weighted code-size = 8+8 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 01 4+3 C 00 1+6 D 100 1+6 E 101 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 4+3 C 00 7+0 B 01 1+6 D 100 1+6 E 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+3 C 00 7+0 B 01 8+0 A 11 1+6 D 100 1+6 E 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+6 D 100 1+6 E 101 4+3 C 00 7+0 B 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-17: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+6 4+3 7+0 1+7 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+16 Average weight = 4+3 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 47+41 Ave. weighted code-size = 9+8 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 00 4+3 C 101 1+7 D 01 1+6 E 100 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 7+0 B 00 1+7 D 01 1+6 E 100 4+3 C 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 7+0 B 00 1+7 D 01 8+0 A 11 1+6 E 100 4+3 C 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+6 E 100 4+3 C 101 7+0 B 00 1+7 D 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-18: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 4+3 7+0 1+7 1+7 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+17 Average weight = 4+3 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 53+37 Ave. weighted code-size = 10+7 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 101 4+3 C 100 1+7 D 00 1+7 E 01 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+7 D 00 1+7 E 01 4+3 C 100 7+0 B 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+7 D 00 1+7 E 01 8+0 A 11 4+3 C 100 7+0 B 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 4+3 C 100 7+0 B 101 1+7 D 00 1+7 E 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-19: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 7+0 1+7 1+7 4+4 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+18 Average weight = 4+3 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 50+43 Ave. weighted code-size = 10+8 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+0 B 100 4+4 C 01 1+7 D 101 1+7 E 00 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 1+7 E 00 4+4 C 01 7+0 B 100 1+7 D 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 1+7 E 00 4+4 C 01 8+0 A 11 7+0 B 100 1+7 D 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 7+0 B 100 1+7 D 101 1+7 E 00 4+4 C 01 8+0 A 11 ########### showAll (END) ############# ########### showAll (BEGIN) ########### ===== Delta Test-20: Creating Length-Limited Huffman Codes (Binary Tree) ===== ===== Sorted weights+delta: 1+7 1+7 4+4 7+1 8+0 ===== -> This is Binary Huffman Coding <- Alphabet size = 5 Shortest code size = 2 Longest code size = 3 Weights sum = 21+19 Average weight = 4+3 Code-sizes sum = 12 Average code-size = 2.4 Weighted code-sizes sum = 44+52 Ave. weighted code-size = 8+10 ======================= Symbols and their codes -> Sorted by Symbol ======================= Weight Symbol Code ------ ------ ---- 8+0 A 11 7+1 B 01 4+4 C 00 1+7 D 100 1+7 E 101 ========================= Codes and their symbols -> Lexico-Sorted by Code ========================= Weight Symbol Code ------ ------ ---- 4+4 C 00 7+1 B 01 1+7 D 100 1+7 E 101 8+0 A 11 ======================= Codes and their symbols -> Sorted by Code Size ======================= Weight Symbol Code ------ ------ ---- 4+4 C 00 7+1 B 01 8+0 A 11 1+7 D 100 1+7 E 101 ======================= Codes and their symbols -> Sorted by Weight ======================= Weight Symbol Code ------ ------ ---- 1+7 D 100 1+7 E 101 4+4 C 00 7+1 B 01 8+0 A 11 ########### showAll (END) ############# #============================================= # n-ary Huffman Template Algorithm # http://sourceforge.net/projects/huffman-ta # Version 2.4 #............................................. # Alex Vinokur # http://up.to/alexvn # alex DOT vinokur AT gmail DOT com #--------------------------------------------- # MINGW # GNU gcc version 3.3.3 #--------------------------------------------- # FINISH # Thu Sep 30 18:28:43 2004 #=============================================

0 |

9/30/2004 4:35:11 PM

"Alex Vinokur" <alexvn@big-foot.com> wrote in message news:2s2qujF1avvmvU1@uni-berlin.de... > ===================================== > Creating Length-Limited Huffman Codes > ===================================== > [snip] Sorry. I meant to post the original message to news:misc.test. -- Alex Vinokur http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn

0 |

9/30/2004 4:53:27 PM

A quantum analog of Huffman coding has been proposed by Samuel L. Braunstein, Christopher A. Fuchs, Daniel Gottesman, Hoi-Kwong Lo (http://arxiv.org/abs/quant-ph/9805080). Is "A quantum analog of Huffman coding" a Huffman coding? -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn ...

I've been searching the net for any good example or explanation on how to u= se the Package-Merge algorithm to create huffman codes limiting their maxim= um length. I understand the Package-Merge algorithm when it's explained with coins of = denominational value and "collector's" value. That much is simple and makes= sense to me. I don't quite yet see the jump from coins to huffman codes. Explanations su= ggest creating X coins for each symbol, where each coin has 2^(-x) denomina= tional value and F (frequency) "collector's" value. OK, but w...

Does anyone know who I can add a file to the Other Files section of a browse procedure with in my template code? ...

/* The first datastep generaste the table __KODETABELL which contains metadata information to create three other tables. In the next three datasteps I create these tables by hardcoding them. In the data _null_ step I try to create code that can create the three data steps. The %INCLUDE is intended to execute that code and create them. But the result of the data _null_ step is not what I expected. I guess there must be something logically wrong with the code, but can't see what it is. */ data __kodetabell; attrib Feltnamn length = $30 Feltverdi length = $5 ...

Rune, The following is still probably NOT doing what you want, but should be close enough for you to correct. You left off a "by" statement and had some necessary spaces missing. Art data __kodetabell; attrib Feltnamn length = $30 Feltverdi length = $5 Forklaring length = $80 ; infile datalines truncover; input @01 Feltnamn $30. @40 Feltverdi $5. @50 Forklaring $80. ; datalines; AKSJETYPE 03 A AKSJETYPE 04 B KLAGEINSTANS_AN...

As to > 884 put @7 compress(feltnamn) @30 > 'length = $5' ; > - > 79 > ERROR 79-322: Expecting a (. > > I don't understand what the SAS log is trying to tell > me. If someone can tell me, I will be the first to change > programming style for this technique. > > Regards, Rune > > Give the following sample a try data _null_; length feltnamn $30 ; feltnamn = 'field_name' ; put @5 'The field name is&...

Hi guys, I have a technical question. I want to create a cobol program which accept a File (FB, of any record length [from 1 to 2000) and create a output file with the same format as the input one All the record in the file have the same length, so i don't want to deal with VB file. I just want to know if somebody know how i'm suppose to declare the FD statement. And in the JCL how i'm suppose to the declare the input and output file. Thanks for your help guys From the uses of the terms "FB" and "VB" my guess is that this is an IBM mainframe question. If ...

I am told to compress a file using the huffman algorithm...the file may consist of something like "Hello World".. how can one go about compressing that using the huffman algorithm GujuBoy wrote: ) I am told to compress a file using the huffman algorithm...the file may ) consist of something like "Hello World".. ) ) how can one go about compressing that using the huffman algorithm Count the number of occurrences of each symbol, build a huffman tree from the frequency counts, use the huffman tree to encode the symbols. SaSW, Willem -- Disclaimer: I am in no way respons...

Hi, What is the best way to write huffman file header (Version, Frequency Table...)? thanks, <BramiYair@gmail.com> schreef in bericht news:1139241468.555242.54590@g44g2000cwa.googlegroups.com... > Hi, > > What is the best way to write huffman file header (Version, Frequency > Table...)? > > thanks, > It seems to me that the method used in JPEG is rather efficient, however there are very different ways to save the data in a file, so in my oppinion you should try some of them out. Arne Demmers <BramiYair@gmail.com> wrote in message news:1139241468...

pLEASE SEND ME THE SOURCE CODE FOR THE HUFFMAN ALGORITHM, I NEED TO IMPLEMENT THE COMPRESSION ALGORITHM FOR THE INPUTS SUCH AS TEXT AND SOME INTEGERS. I WILL GREATLY APPRECIATE YOUR HELP. THANKS LATHA "LATHA" <VLATHA_007@YAHOO.COM> wrote in message news:z64en3oeteyh@legacy... > pLEASE SEND ME THE SOURCE CODE FOR THE HUFFMAN ALGORITHM, I NEED TO > IMPLEMENT THE COMPRESSION ALGORITHM FOR THE INPUTS SUCH AS TEXT AND > SOME INTEGERS. I WILL GREATLY APPRECIATE YOUR HELP. > > THANKS > LATHA > 1. This is such a fun alogrithm to code! Recursive function ...

I am told to compress a file using the huffman algorithm...the file may consist of something like "Hello World".. how can one go about compressing that using the huffman algorithm GujuBoy wrote: ) I am told to compress a file using the huffman algorithm...the file may ) consist of something like "Hello World".. ) ) how can one go about compressing that using the huffman algorithm If you want to post a message in multiple newsgroups, then do so by putting all the newsgroups in the 'Newsgroups:' header. Don't post the same message several times to different n...

Hi, I would like to request your attention for this very specific issue: I have several classes in Python, and now I want simply re-use it, in other language. The closest to solution I think I came was with this site: http://www.py2exe.org/index.cgi/Py2exeAndCtypesComExeServer?highlight=%28%28Py2exeAndCtypesComDllServer%29%29 but I not able to solve questions related with TLB files and __init__.py files. So, could anyone give a tip about HOW TO CREAT a dll file from Python? thank in advance AMMS macedo.silva@gmail.com wrote: > Hi, > > I would like to request your attention ...

im looking for image compression code using huffman code.could anyone please help me thanking in advance ...

Hi, Complete newbie here :-| I have managed to create a few scripts which are started from crontab. However I would like a verification that they actually have been executed. How do I include in my bash script code to append a line like "MyScript was run at <current date / time>" to the text file 'cronjobs.log' (and that cronjobs.log is created if it doesn't exist)... Sorry if this is too much to ask, but I learn a lot from examples Thanks anyway geir On Thu, 30 Mar 2006 23:10:39 +0200, Geir Holmavatn wrote: > Hi, > > Complete newbie here :-| ...

Run length limited or RLL coding is a line coding technique that is used to send arbitrary data over a communications channel with bandwidth ...

Run length limited or RLL coding is a line coding technique that is used to send arbitrary data over a communications channel with bandwidth ...

Resources last updated: 1/30/2016 7:55:09 PM