MathDB
Sunny and Ming playing with strings

Source: 2022 IMOC C6

September 6, 2022
combinatoricsIMOC

Problem Statement

Let k4k\geq4 be an integer. Sunny and Ming play a game with strings. A string is a sequence that every element of it is an integer between 11 and kk, inclusive. At first, Sunny chooses two positive integers N,L2N,L\geq2 and write down NN strings, each having length LL. Then Ming mark at most N2\frac{N}{2} strings. Then Sunny chooses an unmarked string ss and calculate the biggest integer nn such that there exists another string satisfying its first nn element is the same as the first nn element of ss. Then Sunny burn down all strings which first nn element if different from the first nn element of ss, leaving only the ones which have the same first nn element of ss. Finally, Ming chooses an integer dd between 11 and kk, inclusive, and remove all strings which (n+1)(n+1)th element is dd. Sunny's score would be the number of strings left. Find the maximum score that Sunny can guarantee to get.
Proposed by USJL