So there is a n x n game board and each location on the board has an integer. Player one picks a number from row 1 and player 2 picks a number from row 2 and they alternate until there are no more rows. Then they add up all the numbers and player 1 wins if the sum is equal to a predetermined sum S, player 2 wins otherwise. A winning strategy for player 1 for a particular board and sum (B, S) is if player 1 can win no matter what player 2 does. I want to show that this problem is PSpace-complete
So first I have to show that it's in PSpace, which I think is pretty easy because the total number of moves is bound by the size of the board, which is n^2.
I am getting stuck on showing that it's PSpace-hard though, I know I have to reduce from QSAT, but I can't figure out how. Can someone help?
EDIT: Well actually I don't know that I have to reduce from QSAT, but after searching around it appears that QSAT is the most likely candidate. Many other two-player games, Geography being the most prominent example, reduces from QSAT, so I figured this one must too. However, feel free to correct me if I am wrong about this.
If you choose a reduction from QSAT, your task starts with a formula.
You need to construct an instance of your game so that the negation of this formula is a tautology exactly if player 1 has a winning strategy. Player 2's role is primarily to fix valuations of universally quantified Boolean variables; player 1 has a similar role with regard to existentially quantified Boolean variables.
You will need to show some ingenuity in populating the table so that player 1 can only force a zero sum in the case of a tautology. Be also sure that the number of table rows that you will need is only linear in the number of quantifier ocurrences within the formula.
[SPOILER 1 starts] Remember we discuss in homework mode. I will now add almost all the detail to the hint but hide three technical flaws in the solution that I expect you to find once you understand the detail. Please try to find as many as you can and propose your own fixes to as many as you can in a comment.
First look at QSAT in game theory terms. Without the loss of generality, assume that a quantified Boolean sentence (formula with no free variables) is written with all quantifiers in the front; first a few existentially quantified variables, then a few universal, then another block of existential and so on. The first player begins playing by assigning (substituting) specific Boolean values to the first few existentially quantified variables (to the whole first block, stopping only when the formula after substitution begins with the leftmost universal quantifier. Then player 2 handles the first block of universal quantification likewise; then player 1 proceeds with what was originally the second block of existential quantification and so on. Player 1 wins if the formula, after all variables have been specified, evaluates to "true"; otherwise player 2 wins.
This QSAT game can also be played numerically if you assume some coding of formulas, so that each formula has unique number based on the syntax (so that one can efficiently determine the number from a formula and also the formula from a number). Instead of exchanging formulas, the players will exchange numbers (formula codes).
Now imagine that we want to convert this QSAT-like game to your board game. Each row will stand for one player's move (for one block of quantifiers of the same type). Each location on the row will represent a possible move of that player from any position on the preceding row; more specifically, the numeric difference made by the move: the code of the formula after the move minus the code of the formula before the move. This way the running total always equals the formula as it stands in a given phase of the game.
As a special exception, modify all locations on the last row by further subtracting the code of formula true
. This way, the sum total of the completed board game will be 0 if player 1 has won, and non-zero otherwise. That is the desired reduction of quantified formula tautologicity to your board game. [SPOILER 1 ends]