Game

Report a typo

Wow! This problem is kind of tricky. If you're ready to put your thinking cap on, brace yourself and good luck! Otherwise, you can postpone it for now and return any time later

Let's play a game. Here is a field with numbers:

102003456\begin{matrix} 1 & 0 & 2\\ 0 & 0 & 3\\ 4 & 5 & 6\\ \end{matrix}

The field can be modified according to the following rules:

  • you can rotate the rows to the left or right by one element. For example, like this:

123456789312456789\begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9\\ \end{matrix} \longrightarrow \begin{matrix} 3 & 1 & 2\\ 4 & 5 & 6\\ 7 & 8 & 9\\ \end{matrix}

123456789123564789\begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9\\ \end{matrix} \longrightarrow \begin{matrix} 1 & 2 & 3\\ 5 & 6 & 4\\ 7 & 8 & 9\\ \end{matrix}

  • you can rotate the columns up or down as well. For example, like this:

123456789183426759\begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9\\ \end{matrix} \longrightarrow \begin{matrix} 1 & 8 & 3\\ 4 & 2 & 6\\ 7 & 5 & 9\\ \end{matrix}

123456789126459783\begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9\\ \end{matrix} \longrightarrow \begin{matrix} 1 & 2 & 6\\ 4 & 5 & 9\\ 7 & 8 & 3\\ \end{matrix}

Your task is to specify in what minimum number of the above operations it is possible to bring the field to the form of an upper triangular matrix.

Enter a number
___

Create a free account to access the full topic