Sunday, February 22, 2009

Arranging Numbers By Rules -- A Game Also A Puzzle

This seems like it would be a fun game.

This game is for 2 players. Start by drawing an n-by-n grid on a piece of paper, where n is at least 4 or 5 (but not too massive). I suggest that n be even (to make this game fair for both players).

First the players take turns placing the integers 1 through n^2 into the grid's squares so that there ends up being exactly one integer in each square of the grid.
Player 1 places the odd integers in the grid's squares, and player 2 places the even integers.

Then the players take turns making up rules or classifications, one rule per each integer from 1 to n^2, where each rule defines a class of integers which includes all the integers immediately adjacent (in the directions of above, below, left of, and right of) to the integer which matches the number of the rule.
(The rule need not match the number of the rule itself.)
In other words, say that we are concerned with the rule defining the neighbors of the integer 3 in the grid. Left of the 3 happens to be, in this example, a 5. Above the 3 happens to be a 9. Below the 3 is a 2. And right of the 3 is a 17.
So, the neighbors of the 3 are 5, 9, 2, 17. There are of course an infinite number of classes that these number fall into. But one of the classes is (2^k + 1), since all 4 of the integers are 1 more than a power of 2. So rule #3 could be "Numbers of the form (2^k +1), k >= 0".

So, player 1 makes up the rules for the neighbors of the odd integers. And player 2 makes up the rules for the neighbors of the even integers.

I encourage players to be creative when coming up with rules. Yes, a rule could look like: "One of these integers: 2,6,5,9", or on the other extreme: "Any integer at all". But making a rule too broad or too narrow affects both players equally.

Next, after the rules are constructed, each player draws an empty n-by-n grid for themselves. Each player then places into any square of their opponent's grid any integer from 1 to n^2.

Then, each player tries to fill in the remaining squares of his/her own grid so that, given the integer her/his opponent already placed in her/his grid, each integer's immediate neighbors (in the direction of above, below, right of, left of)
follows the corresponding rule for that integer. The original grid of numbers is hidden while the players each try to solve the puzzle.

Remember that if two integers, j and k, are adjacent, then not only does j have to follow rule #k, but k has to follow rule #j as well.

A player's score is the number of squares he/she fills in successfully. If a player makes a mistake (a number doesn't follow the rule for the number it is adjacent to, or a specific number appears more than once in a player's grid, or a number in the player's grid is not an integer >= 1 and <= n^2), then the player forfeits.

*****
Update:
I also should make an addition to how the game is played.
Rules such as rule 7 below, where other squares' values have something to do with the rule, can be problematic if not all the relevant squares are filled in.
So, if rule #m says that the values of the neighbors of the m must depend on other square's values in some way (the other squares which rule #m depends upon we call S), then the squares of S must all be filled with numbers, IF any of the neighbors of square m are filled, or else the player forfeits.

In my example, all the numbers in the same row as the 7 must be filled, if any of the numbers adjacent to the 7 are filled, or else I would automatically lose to my opponent (unless we both forfeited for any reason).

*****

Here is a sample 4-by-4 grid with rules.

01 04 09 16
02 03 08 15
05 06 07 14
10 11 12 13

1: Power of 2.
2: Prime power.
3: Even.
4: Power of 3.
5: Squarefree.
6: Prime.
7: Not coprime with the sum of the integers (including the 7) in the same row as the 7.
8: Odd.
9: Power of 2.
10: One less or one more than a triangular number.
11: Prime - 1.
12: Prime.
13: Between 10 and 15 (inclusive).
14: Divides 14 or is coprime to it.
15: Squarefree integer + 1.
16: Multiple of 3.

Let us say, without me trying to actually solve the puzzle, that the player's opponent puts a 3 in the lower left square of an empty 4-by-4 grid. How many integers can be put in this grid correctly under the rules?

Note: Any integer (from 1 to n^2, not occurring anywhere else in a player's grid) can occur anywhere in a player's grid where there would be no integers in the neighboring squares immediately above, below, right of, or left of it, of course. (No rules are violated here.)

Thanks,
Leroy Quet

1 comment:

Amorphous Trapezoid said...

Okay, I took up my own challenge of trying to find a 4-by-4 grid which follows the 16 rules above and has a 3 in the lower left square.
I didn't try very hard, so the best I could do was a 14-point solution.
(** = empty square.)
02 07 10 11
01 08 ** 12
04 09 ** 13
03 16 15 14
Is 14 points optimal, given the specific 16 rules in the quoted text and a 3 in the lower left square?

Leroy