8. Little Boole has drawn a strip of 8 cells, in each of which a 0 or a 1 can be written. Initially, each cell contains a 0. With each move, Boole performs one of the following operations:

(a) replaces every 0 with a 1 and every 1 with a 0;

(b) chooses three consecutive cells and only in these replaces every 0 with a 1 and vice versa.

How many different combinations of 0s and 1s can Boole obtain?
(A) $2^{5}$
(B) $2^{6}$
(C) $2^{7}$
(D) $2^{8}-2$
(E) $2^{8}$
8. The answer is (C). Let $T$ be the first operation and $B_{1}, \ldots, B_{6}$ the other six such that $B_{i}$ acts on the numbers in positions $i, i+1, i+2$.

Observe that all operations commute with each other, and applying an operation twice is the same as not applying it. Therefore, we can associate each operation with an ON/OFF button (which corresponds to having performed or not performed the operation) and each sequence of operations with one and only one state of the buttons.

The obtainable combinations are then at most as many as all possible states of the buttons, which are $2^{7}$.

Suppose now, for the sake of contradiction, that there are two different states that result in the 8 cells containing the same numbers. This means that there exists a button state (not all OFF) whose result is to transform the combination 00000000 into itself.

Suppose that the operation $T$ has been performed. Then necessarily $B_{1}$ and $B_{6}$ must also have been performed (to have the first and last cell at 0). This means that $B_{2}$ and $B_{5}$ are OFF, otherwise the second and second-to-last cell would have a 1; for the same reason, $B_{3}$ and $B_{4}$ are also OFF, but this would mean that cells 4 and 5 contain a 1, which is impossible.

Therefore, the operation $T$ has not been performed, so neither have $B_{1}$ and $B_{6}$, otherwise the outer cells would have a 1. But then $B_{2}$ and $B_{5}$ are also OFF; similarly, $B_{3}$ and $B_{4}$ must not have been performed either, which is absurd because we assumed that at least one operation was performed.

Thus, each button state corresponds to a different combination, so the reachable combinations are exactly $2^{7}$.