Tuesday, January 20, 2009

Intersections Of Rectangular Loops

Here is a game for 2 player, each player with a colored pen/pencil of a color different than her/his opponent's pen/pencil. This game is played on an n-by-n grid drawn on paper. (I will call the two players, for convenience, player-yellow and player-purple.)


Players take turns filling in empty squares of the grid, one square filled on each move, such that each player fills in exactly n squares during play (2n squares filled in by both players together) and such that there are exactly 2 squares (no fewer, no more) in each row of the grid and exactly 2 squares in each column.

After the squares are filled in, someone draws a straight horizontal line segment between the centers of each pair of squares in the same row, and draws a vertical line-segment between each pair of squares in the same column. You then should have 1 or more closed curves consisting of straight line-segments and 90-degree turns.

Scoring is as follows:

What matters in this game are the intersections of the line-segments. (Which closed-curves the line-segments of an intersection belong to is unimportant in this game. A closed curve may even intersect itself, of course.)

Call the 4 squares that are in the same row and column as an intersection of 2 perpendicular line-segments the 4 "extremities" of the intersection.
Call the pair of extremities that are both along the vertical line-segment of the intersection, or are both along the horizontal line-segment of the intersection, a pair of "opposing extremities".

Look at each intersection. (I suggest putting a circle in the square with each intersection, just to make the intersections easier to see.)
For every intersection where: {{the horizontal opposing extremities are of the same color} and {the vertical opposing extremities are of the same color}} or {{the horizontal opposing extremities are of differing colors} and {the vertical opposing colors are of differing colors}}, player-yellow gets a point.

On the other hand, for every intersection where one pair of opposing extremities consists of 2 squares of the same color and the other pair of opposing extremities consists of 2 squares of differing color, then player-purple gets a point.

Here is a much simpler way, probably, to figure out who gets a point at any intersection.

Count the number of the intersection's extremities colored by player-yellow or count the number of extremities colored by player-purple. If the number of an intersection's extremities filled by either one player is even, then player-yellow gets a point for that intersection. If the number of an intersection's extremities filled by either one player is odd, then player-purple gets a point for the intersection.

Highest score wins.

Thanks,
Leroy Quet

No comments: