MathDB
Problem 6, Iberoamerican Olympiad 2011

Source:

October 2, 2011
floor functioncombinatorics proposedcombinatorics

Problem Statement

Let kk and nn be positive integers, with k2k \geq 2. In a straight line there are knkn stones of kk colours, such that there are nn stones of each colour. A step consists of exchanging the position of two adjacent stones. Find the smallest positive integer mm such that it is always possible to achieve, with at most mm steps, that the nn stones are together, if: a) nn is even. b) nn is odd and k=3k=3