5 Several students take an exam, with a total of 4 multiple-choice questions, each with 3 options. It is known: any 3 students have one question where their answers are all different. Find the maximum number of students. (29th
Problem 1248
Official solution
5. Suppose there are candidates. It is easy to see that each candidate's answer sheet is a sequence of length 4, consisting of the letters , , and . Thus, this problem is equivalent to 3-coloring an grid such that "any three rows have a column with 3 cells of different colors." Let the total number of different-colored pairs in all columns be . On one hand, for any column, suppose there are cells of color , cells of color , and cells of color , then the number of different-colored pairs in this column is . Note that , so the 4 columns have at most different-colored pairs. That is, . On the other hand, any 3 rows have a column with 3 different colors, which form 3 different-colored pairs, thus there are different-colored pairs. However, the same different-colored pair may appear in different 3-row groups, so . Therefore, . However, this inequality always holds, and does not provide a range for . Readers can consider whether this estimate can be improved. From another perspective, consider the negation of "any three rows have a column with 3 cells of different colors": there exist three rows such that all columns of these three rows have only two colors. We use proof by contradiction to find the columns with only two colors. Through trial, we find that . Otherwise, take any 10 rows to form a grid . Consider the first column of , there must be a color that appears at most 3 times. Thus, at least 7 rows have only two colors in the first column. Consider the second column of these 7 rows, there must be a color that appears at most 2 times. Thus, at least 5 rows have only two colors in the first and second columns. Consider the third column of these 5 rows, there must be a color that appears at most 1 time. Thus, at least 4 rows have only two colors in the first, second, and third columns. Consider the last column of these 4 rows, there must be a color that appears at most 1 time, thus at least 3 rows have only two colors in all columns. Let these 3 rows be , , and , then any column of , , and has two cells of the same color, which is a contradiction. When , the answers chosen by 9 people for each question are , , , , , , , , , so is possible, hence the maximum value of is 9.