en tokens are placed in equal numbers in the "odd/even," "red/black," or "1-12, 13-24, 25-36" fields. The first lesson learnt is that even the least risky gambling options, which have zero gain, most likely come with a small chance of maximal loss. Even in this extreme gambling option, the game definitely remains favorable to the bank! Consider now the odds of winning if one plays the same number 36 times in a row. The probability to lose all games is (1 - 1/38)36 = 38.3%, SO there 9.3 Block codes with entropy defined by H(X) = f(p) = - plog p - (1 - p)l log(1 p p, as described in Chapter 4. Substituting p (win) in this definition yields H(X) = 0.17557 bit/symbol. As we shall see later, we will need such a high accuracy to be able to analyze the code performance. Call the two source events W and L for the outcomes "win" and "lose." A succession of n roulette bets can, thus, be described by the sequence LLLLLWLL which is made of n symbols of the L/W type. As we have learnt SO far in this chapter, it would be a waste to represent such a sequence with an n-bit codeword. Rather, we should seek for a variable-length codeword assignment, which uses the shortest codewords for the most likely sequences, and the longest codewords for the least likely ones. We should expect the mean codeword length to approach the extended source entropy X(") = n H (X) = 0.17557n = n/5.69, which is indeed significantly shorter than n. To find such a code, we may proceed step by step, considering sequences with increasing lengths, and determining a corresponding block code. We will compare the block code efficiency with that of a Huffman code. Consider first a sequence of four games (n = 4). Overlooking the order of the indi- vidual outcomes, there exist five types of possible sequences, in decreasing likelihood: LLLL (complete loss), LLLW (one win), LLWW (two wins), LWWW (three wins), and WWWW (four wins). We must then take into account the exact order of the individual W/L associated to a given sequence type. For instance, the sequence ty