Professional Documents
Culture Documents
CODING
5th SEM E&C
Average length
𝒒 𝑵
L= 𝒊=𝟏 𝑷𝒊 𝒍𝒊 bits/symbol or L = 𝒊=𝟏 𝑷𝒊 𝒍𝒊 bits/symbol
Source or code efficiency
𝑯(𝑺) 𝑯(𝑺)
𝜼𝑺 = X 𝟏𝟎𝟎% or 𝜼𝑪 = X 𝟏𝟎𝟎%
𝑳 𝑳
Source or code redundancy
𝑯(𝑺) 𝑯(𝑺)
𝑹 𝜼𝑺 = 1- 𝜼𝑺 = (1 - 𝑳
) X 𝟏𝟎𝟎% or 𝑹 𝜼𝑪 = 1- 𝜼𝑪 = (1 - 𝑳
) X 𝟏𝟎𝟎%
Compute the number of stages required for the encoding operation, which is
given by
𝑵−𝒓 𝒒−𝒓
𝒏=
𝒓−𝟏
or = 𝒓−𝟏
The probability of “0”s and “1”s and “2” s in the code are found using the
formulas
𝟏 𝒒
P (0) = 𝑳 𝒊=𝟏[𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 "0" s in the code for 𝑿𝒊 ] [𝒑𝒊 ] or
𝟏 𝑵
P (0) = 𝑳 𝒊=𝟏[𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 "0" s in the code for 𝑿𝒊 ] [𝒑𝒊 ] .
𝟏 𝒒
P (1) = 𝑳 𝒊=𝟏[𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 "1" s in the code for 𝑿𝒊 ] [𝒑𝒊 ] or
𝟏 𝑵
P (1) =
𝑳 𝒊=𝟏[𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 "1" s in the code for 𝑿𝒊 ] [𝒑𝒊 ] .
𝟏 𝒒
P (2) =
𝑳 𝒊=𝟏[𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 "2" s in the code for 𝑿𝒊 ] [𝒑𝒊 ] or
𝟏 𝑵
P (2) = 𝑳 𝒊=𝟏[𝐍𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 "2" s in the code for 𝑿𝒊 ] [𝒑𝒊 ] .
𝑳(𝟒) = 𝑵
𝒊=𝟏 𝑷𝒊 𝒍𝒊 quaternary digits / Msg- symbol
The entropy in ternary units/ message symbol is found by using equation
𝐇(𝐒)
𝐇𝟑 (S) = ternary units/ message symbol or
𝒍𝒐𝒈𝟐 𝟑
𝑵 𝟏
𝐇𝟑 (S) = 𝑲=𝟏 𝑷𝑲 𝐥𝐨𝐠 𝟑 𝟏 ( 𝑷 ) ternary units/ message symbol or
𝑲
𝒒 𝟏
𝐇𝟑 (S) = 𝒊=𝟏 𝑷𝒊 𝐥𝐨𝐠 𝟑 𝟏 ( 𝑷 ) ternary units/ message symbol
𝒊