0%

Problem 459


Problem 459


Flipping game

The flipping game is a two player game played on a N by N square board.
Each square contains a disk with one side white and one side black.
The game starts with all disks showing their white side.

A turn consists of flipping all disks in a rectangle with the following properties:

  • the upper right corner of the rectangle contains a white disk
  • the rectangle width is a perfect square (1, 4, 9, 16, …)
  • the rectangle height is a triangular number (1, 3, 6, 10, …)

Players alternate turns. A player wins by turning the grid all black.

Let W(N) be the number of winning moves for the first player on a N by N board with all disks white, assuming perfect play.
W(1) = 1, W(2) = 0, W(5) = 8 and W(102) = 31395.

For N=5, the first player’s eight winning first moves are:

Find W(106).


翻转游戏

翻转游戏需要两名玩家和一块N乘N大小的方格板。
每一个方格上放置着一个一面黑一面白的圆盘。
游戏开始时,所有的圆盘都是白面朝上。

每一轮玩家可以选择满足如下条件的一个长方形,并翻转其中的所有圆盘:

  • 长方形的右上角是一个白色圆盘。
  • 长方形的宽度是一个平方数,如(1, 4, 9, 16, …)。
  • 长方形的高度是一个三角形数 ,如(1, 3, 6, 10, …)。

玩家轮流进行游戏。当玩家将所有的方格都翻转成黑色圆盘时,该玩家获胜。

记W(N)是先手玩家在一个N乘N大小的方格上进行游戏时致胜操作 的数目。
已知W(1) = 1,W(2) = 0,W(5) = 8,以及W(102) = 31395。

当N=5时,先手玩家的8种致胜操作分别是:

求W(106)。