(Probability measures on sequence space.) As in lecture, fix $d \in \mathbb{N}$, let $S = \{1, \dots, d\}$, and consider the set $X = S^{\mathbb{N}}$ of infinite sequences over S. Given $n \in \mathbb{N}$ and $w \in S^n$, we write $|w| = n$ for the length of the word n, and consider the cylinder
$[w] := \{x \in X : x_i = w_i \text{ for all } 1 \le i \le n\}$.
Let $S^* := \bigcup_{n=1}^{\infty} S^n$ be the set of all finite words over S, and suppose $P: S^* \to [0, 1]$ has the property that $\sum_{a=1}^d P(a) = 1$ and $\sum_{a=1}^d P(wa) = P(w)$ for all $w \in S^*$.
(a)
Prove that given any $v, w \in S^*$, the cylinders $[v]$ and $[w]$ are either nested or disjoint. Use this to prove that if $W \subset S^*$ is any set of words, then there is $W' \subset W$ such that $\bigcup_{w \in W'} [w] = \bigcup_{w \in W} [w]$ and the cylinders corresponding to words in $W'$ are pairwise disjoint.