MathDB

Problems(2)

Operation with binary strings

Source: All-Russian MO 2023 Final stage 9.2

4/23/2023
Initially, a word of 250250 letters with 125125 letters AA and 125125 letters BB is written on a blackboard. In each operation, we may choose a contiguous string of any length with equal number of letters AA and equal number of letters BB, reverse those letters and then swap each BB with AA and each AA with BB (Example: ABABBAABABBA after the operation becomes BAABABBAABAB). Decide if it possible to choose initial word, so that after some operations, it will become the same as the first word, but in reverse order.
combinatorics
Averages can’t be pairwise distinct

Source: All-Russian MO 2023 10.2, 11.2

4/24/2023
A group of 100100 kids has a deck of 101101 cards numbered by 0,1,2,,1000, 1, 2,\dots, 100. The first kid takes the deck, shuffles it, and then takes the cards one by one; when he takes a card (not the last one in the deck), he computes the average of the numbers on the cards he took up to that moment, and writes down this average on the blackboard. Thus, he writes down 100100 numbers, the first of which is the number on the first taken card. Then he passes the deck to the second kid which shuffles the deck and then performs the same procedure, and so on. This way, each of 100100 kids writes down 100100 numbers. Prove that there are two equal numbers among the 1000010000 numbers on the blackboard.
combinatoricsAverageilostthegame