Problem

Source: 7th European Mathematical Cup , Junior Category, Q4

Tags: combinatorics, Game Theory



Let n be a positive integer. Ana and Banana are playing the following game: First, Ana arranges 2n cups in a row on a table, each facing upside-down. She then places a ball under a cup and makes a hole in the table under some other cup. Banana then gives a finite sequence of commands to Ana, where each command consists of swapping two adjacent cups in the row. Her goal is to achieve that the ball has fallen into the hole during the game. Assuming Banana has no information about the position of the hole and the position of the ball at any point, what is the smallest number of commands she has to give in order to achieve her goal?