## Parity Tic-Tac-Toe

Two players play Tic-Tac-Toe, one playing "Evens" and the other playing "Odds".  On each turn, a player must place a 0 (zero) or a 1 (one) in any unoccupied space.  When all nine spaces of the the board are filled, each of the eight rows of three spaces is summed (horizontally, vertically, and diagonally.)  The goal for each player is to have the most sums of their parity (most even or odd sums.)

If played randomly, is there an advantage to either player?  Is there an obvious strategy to play?  Is there an advantage to picking a parity or going first?  Can you find final configurations for which the "Odd" player has 8,7,6,5, and 4 sums?

Source: Original. Sorry it doesn't have an obvious "puzzle answer," but I thought I'd share it anyway.

Solutions were received from Kirk Bresniker, Kogh Adamu, Claudio Baiocchi, Joseph DeVincentis, and Philippe Fondanaiche.  A winning solution for "Even" can be made a winning solution for "Odd" simply by replacing all 0s with 1s and 1s with 0s, so there is no advantage to either player if played randomly.  The first player can always win.  The following is my own analysis.

As player 1, if odd, place a 0 in the center; if even, place a 1 in the center.  If player 2 places "k", player 1 places "1-k" in the opposite location, making the 4 sums through the center equal the desired parity, a guaranteed tie.  Player 2 can only tie if all four side sums are the same parity. But two of the sums are "a+b+c" and "3-(a+b+c)". Since those are opposite parity (and similarly for the other two sides), player 2 will lose 6 to 2.

Joe DeVincentis sent these configurations with various numbers of odd rows:

 8 rows 111 111 111 7 rows 100 001 010 6 rows 111 110 111 5 rows 111 111 110 4 rows 111 101 111

Mail to Ken