Professional Documents
Culture Documents
Information Theory: Dr. Eng. Sattar B. Sadkhan MSC - Sarah Abd UL - Rizah
Information Theory: Dr. Eng. Sattar B. Sadkhan MSC - Sarah Abd UL - Rizah
Theory
Bayes Theorem
Perfect Secrecy
Entropy
Huffman Encoding
Spurious Keys and Unicity Distance
Shannon theory
Pr[x] 1
x X
Example
We could consider a “coin toss “ to be a random variable
defined on the set {heads, tails}. The associated
probability distribution would be Elementary Probability
Dr.Eng.Sattar.B.Sadkhan
Supervised by Fadhil
mohammad salman
PHD
Theory
pr[heads] = Pr[tails] = 1/2.
Example
Suppose we consider a random throw of a pair of dice. This can be
modeled by a random variable Z defined on the set
Z = {1,2,3,4,5,6} x {1,2,3,4,5,6},where Pr[(i, j)] = 1/36 for all (i, j ) Z
Example
where Pr[(i, j)] = 1/36 for all (i, j ) Z. Let's consider the sum of the two
dice. Each possible sum defines an event, and the probabilities of
these events can be computed using equation
Dr.Eng.Sattar.B.Sadkhan
Supervised by Fadhil
mohammad salman
PHD
Pr[x E ] Pr[x]
xX
For example, suppose that we want to compute the probability
that the sum is 4. This corresponds to the event
S4={(1,3),(2,2),(3,1)}
and therefore Pr[s4] = 3/36 = 1/12.
DEFINITION
Joint and Conditional probabilities
Suppose X and Y are random variable defined on a finite sets X and Y
, respectively.
Dr.Eng.Sattar.B.Sadkhan
Supervised by Fadhil
mohammad salman
PHD
The Joint probability Pr[x,y] is the probability that X takes on the value
x and Y takes on the value y .
The Conditional probability Pr[x|y] is the probability that X takes on
value x given that Y takes on value y.
We said that X and Y are Independent random variable if it’s satisfy
one of the conditions:
Pr[x,y]=Pr[x]Pr[y]
Pr[x|y]=Pr[x]
Joint probability can be related to conditional probability
by the formula
Dr.Eng.Sattar.B.Sadkhan
Supervised by Fadhil
mohammad salman
PHD
Pr[x,y]=Pr[x|y]Pr[y].
Interchanging x and y we have that
Pr[x,y]=Pr[y|x]Pr[x].
From those two expressions, we immediately obtained
the following result, which is known Bayes’ theorem.
THEOREM
Bayes Theorem
If Pr[y] > 0, then
• COROLLARY
X and Y are independent variables if and only if p(x|y) = p(x) for
all x, y.
It is now possible to compute the conditional probability
Pr[x|y] using Bayes’ Theorem. The following formula is
obtained:
Example :-
Let P={a,b} with Pr[a]=1/4 ,Pr[b]=3/4 .Let
K={k1,k2,k3} with Pr[k1]=1/2, Pr[k2]=1/4 ,
Pr[k3]=1/4.Let C={1,2,3,4}, and suppose the
encryption function are defined to be
Perfect Secrecy
A cryptosystem has perfect secrecy if
Pr[x|y] = Pr[x] for all x P, y C
• We compute as follows:-
Example
consider the Substitution Cipher .In this cryptosystem ,
|K|=26!,|P|=26, If we take RL = 0.75, then we get an estimate for the
unicity distance of n0≈88.4/(0.75*4.7)≈25
This suggests that, given a ciphertext string of length at least 25,a
unique decryption is possible.
The End•