MathDB
Apples and Pears

Source: 2019 USAJMO #1

April 17, 2019
USA(J)MOUSAJMO

Problem Statement

There are a+ba+b bowls arranged in a row, numbered 11 through a+ba+b, where aa and bb are given positive integers. Initially, each of the first aa bowls contains an apple, and each of the last bb bowls contains a pear. A legal move consists of moving an apple from bowl ii to bowl i+1i+1 and a pear from bowl jj to bowl j1j-1, provided that the difference iji-j is even. We permit multiple fruits in the same bowl at the same time. The goal is to end up with the first bb bowls each containing a pear and the last aa bowls each containing an apple. Show that this is possible if and only if the product abab is even.