C2. Charlotte writes a test consisting of 100 questions, where the answer to each question is either TRUE or FALSE. Charlotte's teacher announces that for every five consecutive questions on the test, the answers to exactly three of them are TRUE. Just before the test starts, the teacher whispers to Charlotte that the answers to the first and last questions are both FALSE.
(a) Determine the number of questions for which the correct answer is TRUE.
(b) What is the correct answer to the sixth question on the test?
(c) Explain how Charlotte can correctly answer all 100 questions on the test.
Solution
(a) The answer is 60 .
Split the 100 problems into groups of 5 , namely $1-5,6-10,11-15, \ldots, 91-95,96-100$. Since there are 100 problems and five problems per group and every set of five consecutive problems contain exactly three problems whose answer is TRUE, each group contains three problems whose answers are TRUE. Since there are 20 groups, there are $20 \times 3=60$ problems whose answers are TRUE on the test.
(b) Consider the problems $1,2,3,4,5,6$. Among problems $1-5$, there are exactly three problems whose answer is TRUE. Since the answer to the first problem is FALSE, among problems $2-5$, exactly three of these problems have answer TRUE. Now consider problem 6. Since problems $2-6$ contains exactly three problems whose answers are TRUE and problems $2-5$ already contain 3 such problems, the answer to problem 6 is FALSE.
(c) Solution 1: We claim that the answer to problem $n$ has the same answer as problem $n+5$. Consider the problems $n, n+1, n+2, n+3, n+4, n+5$. Note that problems $n, n+1, n+2, n+3, n+4$ contain three problems whose answers are TRUE and problems $n+1, n+2, n+3, n+4, n+5$ contain three problems whose answers are TRUE. Note that problems $n+1, n+2, n+3, n+4$ contain either 2 or 3 problems whose answers are TRUE. In the former case, the answers to both problem $n$ and problem $n+5$ are TRUE. In the latter case, the answers to both problem $n$ and problem $n+5$ are FALSE. In either case, problems $n$ and $n+5$ have the same answer.
By this claim, problems $\{1,6,11,16, \ldots, 91,96\}$ have the same answers. So do $\{2,7,12$, $17, \ldots, 92,97\},\{3,8,13,18, \ldots, 93,98\},\{4,9,14,19, \ldots, 94,99\}$ and $\{5,10,15,20, \ldots, 95$, $100\}$. For each of these five groups of problems, if we can determine the answer to one problem in the group, we can determine the answers to every problem in the group. Since the answer to problem 1 is FALSE, the answers to problems $\{1,6,11,16, \ldots, 91,96\}$ are all FALSE. Since problem 100 is FALSE, then the answers to problems $\{5,10,15$, $20, \ldots, 95,100\}$ are also FALSE. Since problems 1 and 5 have answers FALSE, and
exactly three of problems $1,2,3,4,5$ have answer TRUE, problems $2,3,4$ have answer TRUE. Therefore, the answers to the remaining problems $\{2,7,12,17, \ldots, 92,97\},\{3,8$, $13,18, \ldots, 93,98\},\{4,9,14,19, \ldots, 94,99\}$ are all TRUE. Having determined the correct answer to each question, Charlotte achieves a perfect score by answering FALSE, TRUE, TRUE, TRUE, FALSE to the first five questions, and repeating this pattern for each block of five consecutive questions.
Solution 2: As in Solution 1, problems $\{1,6,11, \ldots, 96\}$ and $\{5,10,15, \ldots, 100\}$ have answers FALSE. There are 40 such problems. By part (a), 60 of the 100 problems have answer TRUE. Therefore, the remaining 60 problems, mainly, $\{2,7, \ldots, 97\},\{3,8, \ldots, 98\}$ and $\{4,9, \ldots, 99\}$, have answer FALSE.

Comment: An analogue solution to this solution is to define a variable $x_{i}$ for Problem $i$, with $x_{i}=1$ if the answer to Problem $i$ is TRUE and $x_{i}=0$ if the answer to Problem $i$ is FALSE. Then based on the information given we have the following system of equations:
$$
x_{j}+x_{j+1}+x_{j+2}+x_{j+3}+x_{j+4}=3, \quad \forall 1 \leq j \leq 96
$$
and $x_{1}=0$ and $x_{100}=0$. Charlotte needs to determine all $x_{i}$ where $1 \leq i \leq 100$. Since $x_{j} \in\{0,1\}$, solving this system of the equations yield
$$
\begin{array}{r}
x_{1}=x_{6}=x_{11}=x_{16}=\ldots=x_{91}=x_{96}=0 \\
x_{2}=x_{7}=x_{12}=x_{17}=\ldots=x_{92}=x_{97}=1 \\
x_{3}=x_{8}=x_{13}=x_{18}=\ldots=x_{93}=x_{98}=1 \\
x_{4}=x_{9}=x_{14}=x_{19}=\ldots=x_{94}=x_{99}=1 \\
x_{5}=x_{10}=x_{15}=x_{20}=\ldots=x_{95}=x_{100}=0
\end{array}
$$