Problem

Source: Kyiv mathematical festival 2016

Tags: Kyiv mathematical festival, combinatorics



On the board all the 20-digit numbers which have 10 ones and 10 twos in their decimal form are written. It is allowed to choose two different digits in any number and to reverse the order of digits in the interval between them. What is the maximal quantity of equal numbers which is possible to get on the board using such operations?