Tunstall Code
Tunstall Code
The lengths of Tunstall Codes are equal but the codes represent
variable length of symbols.
Letters Prob
A 0.7
B 0.2
C 0.1
Code Table
Letters Prob
A 0.7
B 0.2
C 0.1
First Iteration
Letters Prob
B 0.2
C 0.1
AA 0.49
AB 0.14
AC 0.07
Code Table
Letters Prob.
A 0.7
B 0.2
C 0.1
First Iteration Second Iteration
Letters Prob. Letters Prob. Codeword
B 0.2 B 0.2 0 (000)
C 0.1 C 0.1 1 (001)