Tuesday, April 26, 2011

Palindromes/Antipalindromes In Sequence

Game for 2 players.

Make a row of m squares drawn on paper, where m is decided by both players.
(I suggest that m be >= 16 for beginners.)

Players take turns. On a turn, a player places either a 0 or a 1 into any empty square.

After a total of m moves, and when each square has one digit in it, play is over.

Player 1 gets the sum of the lengths of all (not necessarily distinct but possibly overlapping*) palindromes
(a(1),a(2),a(3)...a(3),a(2),a(1))
of EVEN length (in the row of 0's and 1's) as her/his score.
Player 1's score =
sum{k=1 to [m/2]} 2k*(# of palindromes of length 2k).

Player 2 gets the sum of the lengths of all (not necessarily distinct but possibly overlapping*) antipalindromes
(a(1),a(2),a(3)...1-a(3),1-a(2),1-a(1))
(of even length) (in the row of 0's and 1's) as her/his score.
Player 2's score =
sum{k=1 to [m/2]} 2k*(# of antipalindromes of length 2k).

*(By "not necessarily distinct", I mean the patterns of 0's and 1's in different palindomes/antipalindromes may match. I of course don't mean the SAME palindrome/antipalindrome {in the same position and of the same length} can count more than once.)

The player with the largest score is the winner.

For example, let us say we have the following row (m=16):
1001001101000100

We have the following palindromes of even length:
00, 00, 11, 00, 00, 00
1001, 1001, 0110

So player 1 gets (2*6 + 4*3 =) 24 points.

We have the following antipalindromes:
10, 01, 10, 01, 10, 01, 10, 01, 10
0011, 1010
100110, 110100
01001101

So player 2 gets (2*9 + 4*2 + 6*2 + 1*8=) 46 points.

Player 2 wins.

(Did I make a mistake counting up the palindromes and antipalindromes in my example?)

I suggest, if this game isn't played on a computer, that players count their own (anti)palindromes, and confirm them with their opponent. (If a player misses any that would contribute to his/her own score, it would be his/her own fault.)

Thanks,
Leroy Quet

Friday, April 22, 2011

Divisors/Multiples Sequence Game

Here is a game for any plural number of players.

r is a positive integer agreed upon by all players before the start of the game.
I suggest that r be congruent to 1 mod {the number of players}.

The game starts with a(1) = 1 and b(1) = 1. m and n both equal 1.

Players alternate moves.

(*)n=n+1.
(**)m=m+1.
A player on his move picks an integer a(m) that is either a divisor or a multiple of a(m-1).
a(m) must be <= r.
The player gets max(a(m),a(m-1))/min(a(m),a(m-1)) added to his score if a(m) is not among (b(1),b(2),...b(n-1)).
But the player gets
2*max(a(m),a(m-1))/min(a(m),a(m-1))
added to his score if a(m) is among (b(1),b(2),...b(n-1)).
The player continues his turn as far as he wants, but until a(m) is not amongst (b(1),b(2),...b(n-1)).
If the player is to continue his move, he goes to (**).
If a(m) is not among (b(1),b(2),...b(n-1)) and the player wants to end his move, then b(n) = a(m), and switch whose turn it is, go to (*) if n is < r.

Play until n = r, and (b(1),b(2),...b(n)) is a permutation of the integers 1 through r.
The winner is then the player with the LOWEST score.

Thanks,
Leroy Quet

Saturday, April 9, 2011

Sums Equal 1,2,3,...m In Small Grid

This can be considered both a puzzle and a solitaire game.

Make an n-by-n grid on paper. (I suggest that n = 3 for beginners.)

Fill the grid with UNIQUE positive integers, one integer per square of the grid. The numbers need not be consecutively valued necessarily.

Your score is the largest integer m such that integers 1 through m all occur as sums within the grid (without missing any positive integers <=m).

A "sum" is of any number of addends (possibly just 1) that are all *consecutively placed* within a row of the grid or a column of the grid. (No diagonals in this variation.)

So, for example, if we have the following 3-by-3 grid:

2 9 8
3 1 10
7 6 15

...the sums 1 through 19 all occur in this grid. So, I get a score of 19.
(Notice that some values of sums occur more than once.)

I bet it is easy to do better than I did with a 3-by-3 grid, since my grid is inefficient, and I didn't try too hard to find it.

(Note: There are 27 possible sums in a 3-by-3 grid of 1, 2, or 3 consecutively placed addends. I don't know what the largest possible score is for a 3-by-3 grid, though.)

You can "play" someone else by both of you trying to score as well as you can on same-sized grids. Just try to outscore your opponent.

Update: The largest score I personally received on the 3-by-3 grid is 20. But someone using a computer, I think, found a 3-by-3 grid with a score of 25.
Update2: Someone else found a 3-by-3 grid with a score of 26.

Thanks,
Leroy Quet

Friday, April 1, 2011

Multiples/Divisors Blob Game

This game is for 2 players.

Start with an n-by-n grid drawn on paper. (n should be at least 8, I suggest.)

The first player fills in any one of the grid's squares to start.

Thereafter, players continue to take turns each filling in one empty square each turn.
After the first move, each square that is filled in must be immediately next to (in the direction of above, below, left of, or right of) at least one square that is already filled in.

After both players have each filled in floor(n^2/4) squares (for 2*floor(n^2/4) squares filled in total), the game is over.

Player 1 gets as a score the number of ROWS of the grid meeting this condition: Every run-length (of runs each of either all filled in squares or all empty squares) in that particular row is either a multiple or divisor of every other run length in that row.

Player 2 gets as a score the number of COLUMNS of the grid meeting this condition: Every run-length (of runs each of either all filled in squares or all empty squares) in that particular column is either a multiple or divisor of every other run length in that column.

The player with the largest score wins.

Example: (n=12)

o o * o o o o o o o o o
o o * * o o * * o o o o
o o o * * o * * o * * *
o o o o * * * * * * o *
o o o * * * * o o * * *
o o o * o o * o * * * o
o * * * * * * * o o * o
o * o o * * o * * o * *
* * o o * * * * o o * *
* o o o * o o * * o * o
* * o * * * o o o * * *
o o o o o * * o * * * o

Run-lengths of rows:
(2,1,9)
(2,2,2,2,4) Point!
(3,2,1,2,1,3)
(4,6,1,1)
(3,4,2,3)
(3,1,2,1,1,3,1)
(1,7,2,1,1)
(1,1,2,2,1,2,1,2) Point!
(2,2,4,2,2) Point!
(1,3,1,2,2,1,1,1)
(2,1,3,3,3)
(5,2,1,3,1)

Run-lengths of columns:
(8,3,1)
(6,3,1,1,1) Point!
(2,4,1,5)
(1,2,1,3,3,1,1)
(2,3,1,5,1)
(3,2,1,3,1,2)
(1,6,1,1,2,1) Point!
(1,3,2,4,2)
(3,1,1,1,1,1,1,1,1,1) Point!
(2,4,4,2) Point!
(2,1,1,8) Point!
(2,3,2,2,1,1,1)

Player 2 wins, 5 to 3.

Thanks,
Leroy Quet