
11.1 METHOD OF TYPES 349
Example 11.1.1 Let X ={1, 2, 3}, a ternary alphabet. Let x = 11321.
Then the type P
x
is
P
x
(1) =
3
5
,P
x
(2) =
1
5
,P
x
(3) =
1
5
. (11.3)
The type class of P
x
is the set of all sequences of length 5 with three 1’s,
one 2, and one 3. There are 20 such sequences, and
T(P
x
) ={11123, 11132, 11213,...,32111}. (11.4)
The number of elements in T(P) is
|T(P)|=
5
3, 1, 1
=
5!
3! 1! 1!
= 20. (11.5)
The essential power of the method of types arises from the following
theorem, which shows that the number of types is at most polynomial
in n.
Theorem 11.1.1
|
P
n
|≤(n + 1)
|X |
. (11.6)
Proof: There are |
X| components in the vector that specifies P
x
.The
numerator in each component can take on only n + 1 values. So there are
at most (n + 1)
|X |
choices for the type vector. Of course, these choices
are not independent (e.g., the last choice is fixed by the others). But this
is a sufficiently good upper bound for our needs.
The crucial point here is that there are only a polynomial number of
types of length n. Since the number of sequences is exponential in n,it
follows that at least one type has exponentially many sequences in its
type class. In fact, the largest type class has essentially the same number
of elements as the entire set of sequences, to first order in the exponent.
Now, we assume that the sequence X
1
,X
2
,...,X
n
is drawn i.i.d.
according to a distribution Q(x). All sequences with the same type have
the same probability, as shown in the following theorem. Let Q
n
(x
n
) =
n
i=1
Q(x
i
) denote the product distribution associated with Q.
Theorem 11.1.2 If X
1
,X
2
,...,X
n
are drawn i.i.d. according to Q(x),
the probability of x depends only on its type and is given by
Q
n
(x) = 2
−n(H (P
x
)+D(P
x
||Q))
. (11.7)