In each box of a $ 1 \times 2009$ grid, we place either a $ 0$ or a $ 1$, such that the sum of any $ 90$ consecutive boxes is $ 65$. Determine all possible values of the sum of the $ 2009$ boxes in the grid.
Problem
Source:
Tags: combinatorics, consecutive integers, Sum, 1434
rayfish
17.09.2021 00:44
It can easily be shown two boxes $90$ away must have the same number. If we fill the first $90$ boxes with $0$'s and $1$'s so that the sum is $65$, the rest of the boxes are uniquely determined. The sum of the last $1980$ boxes is $1430$, so what matters is the first $29$ boxes. Since at most $25$ of the first $29$ are zeros, the total is in the range $[ 1434, 1459 ]$.
ryanbear
25.06.2024 00:04
For the first $22*90$ boxes, the sum has to be $22*65=1430$ Then, there are $29$ boxes remaining. Note that the sum of the last $90$ consecutive boxes is $65$, which includes the last $29$. If the remaining boxes not in the last $29$ are all $1$s, then there are $4$ 1s in the last $29$. So the minimum value is $\boxed{1434}$ Use similar logic to get the maximum value of $\boxed{1459}$ and any number between those two numbers work