2011 OIM Problems/Problem 6

Problem

Let $k$ and $n$ be positive integers, with $k \ge 2$. In a straight line there are $kn$ stones of $k$ different colors such that we have $n$ stones of each color. A "step" consists of exchanging positions of two adjacent stones. Find the smallest positive integer $m$ such that it is always possible to achieve, with at most $m$ steps, that the $n$ stones of each color remain followed if:

1. $n$ is even, 2. $n$ is odd and $k = 3$

~translated into English by Tomas Diaz. ~orders@tomasdiaz.com

Solution

This problem needs a solution. If you have a solution for it, please help us out by adding it.

See also

OIM Problems and Solutions