Let $r$ and $b$ be positive integers. The game of [i]Monis[/i], a variant of Tetris, consists of a single column of red and blue blocks.  If two blocks of the same color ever touch each other, they both vanish immediately.  A red block falls onto the top of the column exactly once every $r$ years, while a blue block falls exactly once every $b$ years.

(a) Suppose that $r$ and $b$ are odd, and moreover the cycles are offset in such a way that no two blocks ever fall at exactly the same time.  Consider a period of $rb$ years in which the column is initially empty.  Determine, in terms of $r$ and $b$, the number of blocks in the column at the end.

(b) Now suppose $r$ and $b$ are relatively prime and $r+b$ is odd.  At time $t=0$, the column is initially empty.  Suppose a red block falls at times $t = r, 2r, \dots, (b-1)r$ years, while a blue block falls at times $t = b, 2b, \dots, (r-1)b$ years.  Prove that at time $t=rb$, the number of blocks in the column is $\left\lvert 1+2(r-1)(b+r)-8S \right\rvert$, where \[ S = \left\lfloor \frac{2r}{r+b} \right\rfloor
     + \left\lfloor \frac{4r}{r+b} \right\rfloor
     + ...
     + \left\lfloor \frac{(r+b-1)r}{r+b} \right\rfloor
     . \]
[i]Proposed by Sammy Luo[/i]
### Part (a)

1. **Initial Setup and Definitions**:
   - Let \( r \) and \( b \) be odd positive integers.
   - A red block falls every \( r \) years, and a blue block falls every \( b \) years.
   - The cycles are offset so that no two blocks fall at the same time.
   - We consider a period of \( rb \) years, starting with an empty column.

2. **Sequence Formation**:
   - Over \( rb \) years, \( \frac{rb}{r} = b \) red blocks and \( \frac{rb}{b} = r \) blue blocks fall.
   - The sequence of blocks will alternate between red and blue due to the offset and the fact that \( r \) and \( b \) are odd.

3. **Vanishing Blocks**:
   - Since no two blocks of the same color fall at the same time, the sequence will be \( RBRBRB \cdots \) (alternating red and blue).
   - Each red block will be followed by a blue block and vice versa.

4. **Final Count**:
   - Since each red block is immediately followed by a blue block and they vanish, the final number of blocks in the column will be zero.

Thus, the number of blocks in the column at the end of \( rb \) years is \( \boxed{0} \).

### Part (b)

1. **Initial Setup and Definitions**:
   - Let \( r \) and \( b \) be relatively prime positive integers, and \( r + b \) is odd.
   - Red blocks fall at times \( t = r, 2r, \ldots, (b-1)r \).
   - Blue blocks fall at times \( t = b, 2b, \ldots, (r-1)b \).

2. **Sequence Formation**:
   - Over \( rb \) years, there will be \( b \) red blocks and \( r \) blue blocks.
   - The sequence of blocks will be interleaved due to the relative primeness and the fact that \( r + b \) is odd.

3. **Vanishing Blocks**:
   - Blocks of the same color vanish when they touch.
   - We need to determine the number of blocks left after all possible vanishings.

4. **Expression for the Number of Blocks**:
   - The number of blocks at time \( t = rb \) is given by:
     \[
     \left\lvert 1 + 2(r-1)(b+r) - 8S \right\rvert
     \]
     where
     \[
     S = \left\lfloor \frac{2r}{r+b} \right\rfloor + \left\lfloor \frac{4r}{r+b} \right\rfloor + \cdots + \left\lfloor \frac{(r+b-1)r}{r+b} \right\rfloor
     \]

5. **Proof**:
   - We need to show that the number of blocks at time \( t = rb \) is indeed given by the above expression.
   - Consider the sequence of blocks falling and the vanishings that occur.
   - The sum \( S \) accounts for the number of vanishings that occur due to the interleaving of red and blue blocks.
   - The expression \( 1 + 2(r-1)(b+r) \) accounts for the initial number of blocks before vanishings.
   - Subtracting \( 8S \) adjusts for the vanishings, and taking the absolute value ensures a non-negative count.

Thus, the number of blocks in the column at time \( t = rb \) is \( \left\lvert 1 + 2(r-1)(b+r) - 8S \right\rvert \).

\(\blacksquare\)