Maths Olympiad Prep

Track / Stage 6 / 380 of 400 #1860 of 2444

Problem 1860

National Olympiad, first round
Combinatorics Difficulty 6.9 Prove it Ukrainian National Mathematical Olympiad · Ukraine

Vika chose a 20-letter word that consists only of letters AA and BB. Oleksii wants to know what Vika's word is. He can ask Vika if there are more AA's or BB's among several (possibly one) consecutive letters of her word. If there are as many AA's as there are BB's, Vika's answer may be any of the two letters. What is the least number of questions after which Oleksii can guaranteed determine the word Vika chose?

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

It is clear how Oleksii can determine the word in 20 questions – it suffices to ask about each letter separately.

We want to show that smaller number of questions would not be enough. Suppose Oleksii determined the word in no more than 19 questions. Suppose Vika chose a word that consists of 20 letters AA. Clearly, for every question Oleksii asked, Vika's answer was that there are more letters AA. Since there were less than 20 questions, there is a letter that wasn't asked about separately. Let it be the tt-th letter. Then consider a word that consists of letters AA everywhere, except for the tt-th letter, which is BB. Clearly, for both such words Vika could have had the same answers. Thus, Oleksii couldn't have determined which one of these two words Vika chose.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.