跳到主要内容
求证数学Reasoncraft Mathematics
/
搜索我的学习台
  1. BMO
  2. 2025
BMO2025
BMO/BMO

2025 British Mathematical Olympiad

10 道题目

British Mathematical OlympiadRound 1Round 2

选择题目

点击题号切换,正文区一次只显示一道题

9 / 10
2025/BMO/Round 2/Q3chessboard colouringscombinatoricspermutations竞赛
An $n\times n$ chessboard consists of $n^2$ cells which are unit squares. Each cell is coloured black or white so that cells with a common edge are different colours. Isaac muddles up the colouring by repeatedly swapping either two complete columns or two complete rows. Elijah wants to restore the original colouring by repeatedly swapping either two complete columns or two complete rows.

In terms of $n$, what is the largest number of swaps that Elijah might need?
考场第一眼 / First look
先分清题目要恢复什么:Elijah 只需让每个格子的颜色恢复,并不需要让原来的第几行、第几列回到原标签位置。因此把每一行压缩成“它原来是奇数编号行还是偶数编号行”,把每一列也作同样压缩,问题就变成两个二元序列的换位问题。

设位置的标准奇偶模板为 $p_i=i\pmod2$,当前各位置承载的原行、原列奇偶型分别为 $r_i,c_j$。原棋盘颜色可写成一个固定常数与 $p_i\oplus p_j$ 的异或,打乱后则是同一常数与 $r_i\oplus c_j$ 的异或。因此颜色完全复原当且仅当存在同一个 $t\in\{0,1\}$,使 \[ r_i=p_i\oplus t,\qquad c_j=p_j\oplus t. \] 也就是说,行型和列型必须同时回到原模板,或同时变成补模板;一边补、一边不补会把整张棋盘的颜色颠倒。

把一个二元序列换到目标序列时,若一侧错位数为 $a$,最少恰需 $a$ 次任意两位置交换。于是只剩奇偶分类。若 $n=2m+1$,原模板两种类型数量为 $m+1,m$,补模板数量相反,故补模式不可行;行列成本最多各为 $m$,最坏共 $2m=n-1$。若 $n=2m$,设行列相对原模板的一侧错位数为 $a,b$,回原模式成本是 $a+b$,同步补模式成本是 $(m-a)+(m-b)=2m-a-b$。最小成本为 \[ \min(a+b,2m-a-b)\le m, \] 而取 $a=m,b=0$ 可达到 $m$。所以答案为:奇数 $n$ 时 $n-1$,偶数 $n$ 时 $n/2$;特别地 $n=1$ 时答案为 $0$。
练习