This is from Thomas and Cover's textbook, 2nd.
Def. A source code $C$ for a random variable $X$ is a mapping from $\mathcal{X}$, the range of $X$, to $\mathcal{D}^\star$, the set of finite length strings of symbols from a $D$-ary alphabet.
Ok. Then the example immediately following is:
$C(red) = 00$, $C(blue) = 11$ is a source code for $\mathcal{X} = \{red, blue\}$ with alphabet $\mathcal{D} = \{0, 1\}.$
- What is an "alphabet" and a "symbol" in this definition?
- Since the range of random variables are subsets of $\mathbb{R}$, then how can $C$ map from blue and red when these are not element of $\mathbb{R}$?