{
  "index": "2022-A-5",
  "type": "COMB",
  "tag": [
    "COMB",
    "ALG"
  ],
  "difficulty": "",
  "question": "Alice and Bob play a game on a board consisting of one row of 2022 consecutive squares. They take turns placing tiles that cover two adjacent squares, with Alice going first. By rule, a tile must not cover a square that is already covered by another tile. The game ends when no tile can be placed according to this rule. Alice's goal is to maximize the number of uncovered squares when the game ends; Bob's goal is to minimize it. What is the greatest number of uncovered squares that Alice can ensure at the end of the game, no matter how Bob plays?",
  "solution": "We show that the number in question equals 290. More generally,\nlet $a(n)$ (resp.\\ $b(n)$) be the optimal final score for Alice (resp.\\ Bob) moving first in a position with $n$ consecutive squares. We show that\n\\begin{align*}\na(n) &= \\left\\lfloor \\frac{n}{7} \\right\\rfloor + a\\left(n - 7\\left\\lfloor \\frac{n}{7} \\right\\rfloor \\right), \\\\\nb(n) &= \\left\\lfloor \\frac{n}{7} \\right\\rfloor + b\\left(n - 7\\left\\lfloor \\frac{n}{7} \\right\\rfloor \\right),\n\\end{align*}\nand that the values for $n \\leq 6$ are as follows:\n\\[\n\\begin{array}{c|cccccccccc}\nn & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\\\\n\\hline\na(n) & 0 & 1 & 0 & 1 & 2 & 1 & 2  \\\\\nb(n) & 0 & 1 & 0 & 1 & 0 & 1 & 0 \n\\end{array}\n\\]\nSince $2022 \\equiv 6 \\pmod{7}$, this will yield\n$a(2022) = 2 + \\lfloor \\frac{2022}{7} \\rfloor = 290$.\n\nWe proceed by induction, starting with the base cases $n \\leq 6$.\nSince the number of odd intervals never decreases, we have $a(n), b(n) \\geq n - 2 \\lfloor \\frac{n}{2} \\rfloor$; by looking at the possible final positions, we see that equality holds for $n=0,1,2,3,5$. For $n=4,6$, Alice moving first can split the original interval into two odd intervals, guaranteeing at least two odd intervals in the final position; whereas Bob can move to leave behind one or two intervals of length 2, guaranteeing no odd intervals in the final position.\n\nWe now proceed to the induction step. Suppose that $n \\geq 7$\nand the claim is known for all $m < n$. In particular, this means that $a(m) \\geq b(m)$; consequently, it does not change the analysis to allow a player to pass their turn after the first move, as both players will still have an optimal strategy which involves never passing.\n\nIt will suffice to check that\n\\[\na(n) = a(n-7) + 1, \\qquad b(n) = b(n-7) + 1.\n\\]\nMoving first, Alice can leave behind two intervals of length 1 and $n-3$. This shows that\n\\[\na(n) \\geq 1 + b(n-3) = a(n-7) + 1.\n\\]\nOn the other hand, if Alice leaves behind intervals of length $i$ and $n-2-i$, Bob can choose to play in either one of these intervals and then follow Alice's lead thereafter (exercising the pass option if Alice makes the last legal move in one of the intervals). \nThis shows that\n\\begin{align*}\na(n) &\\leq \\max\\{\\min\\{a(i) + b(n-2-i), \\\\\n& \\qquad b(i)+a(n-2-i)\\}: i =0,1,\\dots,n-2\\} \\\\\n&= a(n-7)+1.\n\\end{align*}\n\nMoving first, Bob can leave behind two intervals of lengths 2 and $n-4$. This shows that\n\\[\nb(n) \\leq a(n-4) = b(n-7) + 1.\n\\]\nOn the other hand, if Bob leaves behind intervals of length $i$ and $n-2-i$, Alice can choose to play in either one of these intervals and then follow Bob's lead thereafter (again passing as needed). This shows that\n\\begin{align*}\nb(n) &\\geq \\min\\{\\max\\{a(i) + b(n-2-i), \\\\\n& \\qquad b(i)+a(n-2-i)\\}: i =0,1,\\dots,n-2\\} \\\\\n&= b(n-7)+1.\n\\end{align*}\nThis completes the induction.",
  "vars": [
    "a",
    "b",
    "n",
    "m",
    "i"
  ],
  "params": [],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "a": "alicescore",
        "b": "bobscore",
        "n": "boardsize",
        "m": "smaller",
        "i": "intervali"
      },
      "question": "Alice and Bob play a game on a board consisting of one row of 2022 consecutive squares. They take turns placing tiles that cover two adjacent squares, with Alice going first. By rule, a tile must not cover a square that is already covered by another tile. The game ends when no tile can be placed according to this rule. Alice's goal is to maximize the number of uncovered squares when the game ends; Bob's goal is to minimize it. What is the greatest number of uncovered squares that Alice can ensure at the end of the game, no matter how Bob plays?",
      "solution": "We show that the number in question equals 290. More generally,\nlet $alicescore(boardsize)$ (resp.\\ $bobscore(boardsize)$) be the optimal final score for Alice (resp.\\ Bob) moving first in a position with $boardsize$ consecutive squares. We show that\n\\begin{align*}\nalicescore(boardsize) &= \\left\\lfloor \\frac{boardsize}{7} \\right\\rfloor + alicescore\\left(boardsize - 7\\left\\lfloor \\frac{boardsize}{7} \\right\\rfloor \\right), \\\\\nbobscore(boardsize) &= \\left\\lfloor \\frac{boardsize}{7} \\right\\rfloor + bobscore\\left(boardsize - 7\\left\\lfloor \\frac{boardsize}{7} \\right\\rfloor \\right),\n\\end{align*}\nand that the values for $boardsize \\leq 6$ are as follows:\n\\[\n\\begin{array}{c|cccccccccc}\nboardsize & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\\\ \\hline\nalicescore(boardsize) & 0 & 1 & 0 & 1 & 2 & 1 & 2  \\\\\nbobscore(boardsize) & 0 & 1 & 0 & 1 & 0 & 1 & 0 \n\\end{array}\n\\]\nSince $2022 \\equiv 6 \\pmod{7}$, this will yield\n$alicescore(2022) = 2 + \\lfloor \\frac{2022}{7} \\rfloor = 290$.\n\nWe proceed by induction, starting with the base cases $boardsize \\leq 6$.\nSince the number of odd intervals never decreases, we have $alicescore(boardsize), bobscore(boardsize) \\geq boardsize - 2 \\lfloor \\frac{boardsize}{2} \\rfloor$; by looking at the possible final positions, we see that equality holds for $boardsize=0,1,2,3,5$. For $boardsize=4,6$, Alice moving first can split the original interval into two odd intervals, guaranteeing at least two odd intervals in the final position; whereas Bob can move to leave behind one or two intervals of length 2, guaranteeing no odd intervals in the final position.\n\nWe now proceed to the induction step. Suppose that $boardsize \\geq 7$\nand the claim is known for all $smaller < boardsize$. In particular, this means that $alicescore(smaller) \\geq bobscore(smaller)$; consequently, it does not change the analysis to allow a player to pass their turn after the first move, as both players will still have an optimal strategy which involves never passing.\n\nIt will suffice to check that\n\\[\nalicescore(boardsize) = alicescore(boardsize-7) + 1, \\qquad bobscore(boardsize) = bobscore(boardsize-7) + 1.\n\\]\nMoving first, Alice can leave behind two intervals of length 1 and $boardsize-3$. This shows that\n\\[\nalicescore(boardsize) \\geq 1 + bobscore(boardsize-3) = alicescore(boardsize-7) + 1.\n\\]\nOn the other hand, if Alice leaves behind intervals of length $intervali$ and $boardsize-2-intervali$, Bob can choose to play in either one of these intervals and then follow Alice's lead thereafter (exercising the pass option if Alice makes the last legal move in one of the intervals). \nThis shows that\n\\begin{align*}\nalicescore(boardsize) &\\leq \\max\\{\\min\\{alicescore(intervali) + bobscore(boardsize-2-intervali), \\\\\n& \\qquad bobscore(intervali)+alicescore(boardsize-2-intervali)\\}: intervali =0,1,\\dots,boardsize-2\\} \\\\\n&= alicescore(boardsize-7)+1.\n\\end{align*}\n\nMoving first, Bob can leave behind two intervals of lengths 2 and $boardsize-4$. This shows that\n\\[\nbobscore(boardsize) \\leq alicescore(boardsize-4) = bobscore(boardsize-7) + 1.\n\\]\nOn the other hand, if Bob leaves behind intervals of length $intervali$ and $boardsize-2-intervali$, Alice can choose to play in either one of these intervals and then follow Bob's lead thereafter (again passing as needed). This shows that\n\\begin{align*}\nbobscore(boardsize) &\\geq \\min\\{\\max\\{alicescore(intervali) + bobscore(boardsize-2-intervali), \\\\\n& \\qquad bobscore(intervali)+alicescore(boardsize-2-intervali)\\}: intervali =0,1,\\dots,boardsize-2\\} \\\\\n&= bobscore(boardsize-7)+1.\n\\end{align*}\nThis completes the induction."
    },
    "descriptive_long_confusing": {
      "map": {
        "a": "sandcastle",
        "b": "lighthouse",
        "n": "watermelon",
        "m": "screwdriver",
        "i": "blueberry"
      },
      "question": "Alice and Bob play a game on a board consisting of one row of 2022 consecutive squares. They take turns placing tiles that cover two adjacent squares, with Alice going first. By rule, a tile must not cover a square that is already covered by another tile. The game ends when no tile can be placed according to this rule. Alice's goal is to maximize the number of uncovered squares when the game ends; Bob's goal is to minimize it. What is the greatest number of uncovered squares that Alice can ensure at the end of the game, no matter how Bob plays?",
      "solution": "We show that the number in question equals 290. More generally,\nlet $sandcastle(watermelon)$ (resp.\\ $lighthouse(watermelon)$) be the optimal final score for Alice (resp.\\ Bob) moving first in a position with $watermelon$ consecutive squares. We show that\n\\begin{align*}\nsandcastle(watermelon) &= \\left\\lfloor \\frac{watermelon}{7} \\right\\rfloor + sandcastle\\left(watermelon - 7\\left\\lfloor \\frac{watermelon}{7} \\right\\rfloor \\right), \\\\\nlighthouse(watermelon) &= \\left\\lfloor \\frac{watermelon}{7} \\right\\rfloor + lighthouse\\left(watermelon - 7\\left\\lfloor \\frac{watermelon}{7} \\right\\rfloor \\right),\n\\end{align*}\nand that the values for $watermelon \\leq 6$ are as follows:\n\\[\n\\begin{array}{c|cccccccccc}\nwatermelon & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\\\\n\\hline\nsandcastle(watermelon) & 0 & 1 & 0 & 1 & 2 & 1 & 2  \\\\\nlighthouse(watermelon) & 0 & 1 & 0 & 1 & 0 & 1 & 0 \n\\end{array}\n\\]\nSince $2022 \\equiv 6 \\pmod{7}$, this will yield\n$sandcastle(2022) = 2 + \\lfloor \\frac{2022}{7} \\rfloor = 290$.\n\nWe proceed by induction, starting with the base cases $watermelon \\leq 6$.\nSince the number of odd intervals never decreases, we have $sandcastle(watermelon), lighthouse(watermelon) \\geq watermelon - 2 \\lfloor \\frac{watermelon}{2} \\rfloor$; by looking at the possible final positions, we see that equality holds for $watermelon=0,1,2,3,5$. For $watermelon=4,6$, Alice moving first can split the original interval into two odd intervals, guaranteeing at least two odd intervals in the final position; whereas Bob can move to leave behind one or two intervals of length 2, guaranteeing no odd intervals in the final position.\n\nWe now proceed to the induction step. Suppose that $watermelon \\geq 7$\nand the claim is known for all $screwdriver < watermelon$. In particular, this means that $sandcastle(screwdriver) \\geq lighthouse(screwdriver)$; consequently, it does not change the analysis to allow a player to pass their turn after the first move, as both players will still have an optimal strategy which involves never passing.\n\nIt will suffice to check that\n\\[\nsandcastle(watermelon) = sandcastle(watermelon-7) + 1, \\qquad lighthouse(watermelon) = lighthouse(watermelon-7) + 1.\n\\]\nMoving first, Alice can leave behind two intervals of length 1 and $watermelon-3$. This shows that\n\\[\nsandcastle(watermelon) \\geq 1 + lighthouse(watermelon-3) = sandcastle(watermelon-7) + 1.\n\\]\nOn the other hand, if Alice leaves behind intervals of length $blueberry$ and $watermelon-2-blueberry$, Bob can choose to play in either one of these intervals and then follow Alice's lead thereafter (exercising the pass option if Alice makes the last legal move in one of the intervals). \nThis shows that\n\\begin{align*}\nsandcastle(watermelon) &\\leq \\max\\{\\min\\{sandcastle(blueberry) + lighthouse(watermelon-2-blueberry), \\\\\n& \\qquad lighthouse(blueberry)+sandcastle(watermelon-2-blueberry)\\}: blueberry =0,1,\\dots,watermelon-2\\} \\\\\n&= sandcastle(watermelon-7)+1.\n\\end{align*}\n\nMoving first, Bob can leave behind two intervals of lengths 2 and $watermelon-4$. This shows that\n\\[\nlighthouse(watermelon) \\leq sandcastle(watermelon-4) = lighthouse(watermelon-7) + 1.\n\\]\nOn the other hand, if Bob leaves behind intervals of length $blueberry$ and $watermelon-2-blueberry$, Alice can choose to play in either one of these intervals and then follow Bob's lead thereafter (again passing as needed). This shows that\n\\begin{align*}\nlighthouse(watermelon) &\\geq \\min\\{\\max\\{sandcastle(blueberry) + lighthouse(watermelon-2-blueberry), \\\\\n& \\qquad lighthouse(blueberry)+sandcastle(watermelon-2-blueberry)\\}: blueberry =0,1,\\dots,watermelon-2\\} \\\\\n&= lighthouse(watermelon-7)+1.\n\\end{align*}\nThis completes the induction."
    },
    "descriptive_long_misleading": {
      "map": {
        "a": "bobvictory",
        "b": "alicegain",
        "n": "emptiness",
        "m": "wholeness",
        "i": "antiindex"
      },
      "question": "<<<\nAlice and Bob play a game on a board consisting of one row of 2022 consecutive squares. They take turns placing tiles that cover two adjacent squares, with Alice going first. By rule, a tile must not cover a square that is already covered by another tile. The game ends when no tile can be placed according to this rule. Alice's goal is to maximize the number of uncovered squares when the game ends; Bob's goal is to minimize it. What is the greatest number of uncovered squares that Alice can ensure at the end of the game, no matter how Bob plays?\n>>>",
      "solution": "<<<\nWe show that the number in question equals 290. More generally,\nlet $bobvictory(emptiness)$ (resp.\\ $alicegain(emptiness)$) be the optimal final score for Alice (resp.\\ Bob) moving first in a position with $emptiness$ consecutive squares. We show that\n\\begin{align*}\nbobvictory(emptiness) &= \\left\\lfloor \\frac{emptiness}{7} \\right\\rfloor + bobvictory\\left(emptiness - 7\\left\\lfloor \\frac{emptiness}{7} \\right\\rfloor \\right), \\\\\nalicegain(emptiness) &= \\left\\lfloor \\frac{emptiness}{7} \\right\\rfloor + alicegain\\left(emptiness - 7\\left\\lfloor \\frac{emptiness}{7} \\right\\rfloor \\right),\n\\end{align*}\nand that the values for $emptiness \\leq 6$ are as follows:\n\\[\n\\begin{array}{c|cccccccccc}\nemptiness & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\\\\n\\hline\nbobvictory(emptiness) & 0 & 1 & 0 & 1 & 2 & 1 & 2  \\\\\nalicegain(emptiness) & 0 & 1 & 0 & 1 & 0 & 1 & 0 \n\\end{array}\n\\]\nSince $2022 \\equiv 6 \\pmod{7}$, this will yield\n$bobvictory(2022) = 2 + \\lfloor \\frac{2022}{7} \\rfloor = 290$.\n\nWe proceed by induction, starting with the base cases $emptiness \\leq 6$.\nSince the number of odd intervals never decreases, we have $bobvictory(emptiness), alicegain(emptiness) \\geq emptiness - 2 \\lfloor \\frac{emptiness}{2} \\rfloor$; by looking at the possible final positions, we see that equality holds for $emptiness=0,1,2,3,5$. For $emptiness=4,6$, Alice moving first can split the original interval into two odd intervals, guaranteeing at least two odd intervals in the final position; whereas Bob can move to leave behind one or two intervals of length 2, guaranteeing no odd intervals in the final position.\n\nWe now proceed to the induction step. Suppose that $emptiness \\geq 7$\nand the claim is known for all $wholeness < emptiness$. In particular, this means that $bobvictory(wholeness) \\geq alicegain(wholeness)$; consequently, it does not change the analysis to allow a player to pass their turn after the first move, as both players will still have an optimal strategy which involves never passing.\n\nIt will suffice to check that\n\\[\nbobvictory(emptiness) = bobvictory(emptiness-7) + 1, \\qquad alicegain(emptiness) = alicegain(emptiness-7) + 1.\n\\]\nMoving first, Alice can leave behind two intervals of length 1 and $emptiness-3$. This shows that\n\\[\nbobvictory(emptiness) \\geq 1 + alicegain(emptiness-3) = bobvictory(emptiness-7) + 1.\n\\]\nOn the other hand, if Alice leaves behind intervals of length $antiindex$ and $emptiness-2-antiindex$, Bob can choose to play in either one of these intervals and then follow Alice's lead thereafter (exercising the pass option if Alice makes the last legal move in one of the intervals). \nThis shows that\n\\begin{align*}\nbobvictory(emptiness) &\\leq \\max\\{\\min\\{bobvictory(antiindex) + alicegain(emptiness-2-antiindex), \\\\\n& \\qquad alicegain(antiindex)+bobvictory(emptiness-2-antiindex)\\}: antiindex =0,1,\\dots,emptiness-2\\} \\\\\n&= bobvictory(emptiness-7)+1.\n\\end{align*}\n\nMoving first, Bob can leave behind two intervals of lengths 2 and $emptiness-4$. This shows that\n\\[\nalicegain(emptiness) \\leq bobvictory(emptiness-4) = alicegain(emptiness-7) + 1.\n\\]\nOn the other hand, if Bob leaves behind intervals of length $antiindex$ and $emptiness-2-antiindex$, Alice can choose to play in either one of these intervals and then follow Bob's lead thereafter (again passing as needed). This shows that\n\\begin{align*}\nalicegain(emptiness) &\\geq \\min\\{\\max\\{bobvictory(antiindex) + alicegain(emptiness-2-antiindex), \\\\\n& \\qquad alicegain(antiindex)+bobvictory(emptiness-2-antiindex)\\}: antiindex =0,1,\\dots,emptiness-2\\} \\\\\n&= alicegain(emptiness-7)+1.\n\\end{align*}\nThis completes the induction.\n>>>"
    },
    "garbled_string": {
      "map": {
        "a": "zqtyblfne",
        "b": "pflschrmo",
        "n": "wkjdrtgae",
        "m": "hqslpnxzi",
        "i": "rvncbodqw"
      },
      "question": "Alice and Bob play a game on a board consisting of one row of 2022 consecutive squares. They take turns placing tiles that cover two adjacent squares, with Alice going first. By rule, a tile must not cover a square that is already covered by another tile. The game ends when no tile can be placed according to this rule. Alice's goal is to maximize the number of uncovered squares when the game ends; Bob's goal is to minimize it. What is the greatest number of uncovered squares that Alice can ensure at the end of the game, no matter how Bob plays?",
      "solution": "We show that the number in question equals 290. More generally,\nlet $zqtyblfne(wkjdrtgae)$ (resp.\\ $pflschrmo(wkjdrtgae)$) be the optimal final score for Alice (resp.\\ Bob) moving first in a position with $wkjdrtgae$ consecutive squares. We show that\n\\begin{align*}\nzqtyblfne(wkjdrtgae) &= \\left\\lfloor \\frac{wkjdrtgae}{7} \\right\\rfloor + zqtyblfne\\left(wkjdrtgae - 7\\left\\lfloor \\frac{wkjdrtgae}{7} \\right\\rfloor \\right), \\\\\npflschrmo(wkjdrtgae) &= \\left\\lfloor \\frac{wkjdrtgae}{7} \\right\\rfloor + pflschrmo\\left(wkjdrtgae - 7\\left\\lfloor \\frac{wkjdrtgae}{7} \\right\\rfloor \\right),\n\\end{align*}\nand that the values for $wkjdrtgae \\leq 6$ are as follows:\n\\[\n\\begin{array}{c|cccccccccc}\nwkjdrtgae & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\\\\n\\hline\nzqtyblfne(wkjdrtgae) & 0 & 1 & 0 & 1 & 2 & 1 & 2 \\\\\npflschrmo(wkjdrtgae) & 0 & 1 & 0 & 1 & 0 & 1 & 0\n\\end{array}\n\\]\nSince $2022 \\equiv 6 \\pmod{7}$, this will yield\n$zqtyblfne(2022) = 2 + \\lfloor \\frac{2022}{7} \\rfloor = 290$.\n\nWe proceed by induction, starting with the base cases $wkjdrtgae \\leq 6$.\nSince the number of odd intervals never decreases, we have $zqtyblfne(wkjdrtgae), pflschrmo(wkjdrtgae) \\geq wkjdrtgae - 2 \\lfloor \\frac{wkjdrtgae}{2} \\rfloor$; by looking at the possible final positions, we see that equality holds for $wkjdrtgae=0,1,2,3,5$. For $wkjdrtgae=4,6$, Alice moving first can split the original interval into two odd intervals, guaranteeing at least two odd intervals in the final position; whereas Bob can move to leave behind one or two intervals of length 2, guaranteeing no odd intervals in the final position.\n\nWe now proceed to the induction step. Suppose that $wkjdrtgae \\geq 7$ and the claim is known for all $hqslpnxzi < wkjdrtgae$. In particular, this means that $zqtyblfne(hqslpnxzi) \\geq pflschrmo(hqslpnxzi)$; consequently, it does not change the analysis to allow a player to pass their turn after the first move, as both players will still have an optimal strategy which involves never passing.\n\nIt will suffice to check that\n\\[\nzqtyblfne(wkjdrtgae) = zqtyblfne(wkjdrtgae-7) + 1, \\qquad pflschrmo(wkjdrtgae) = pflschrmo(wkjdrtgae-7) + 1.\n\\]\nMoving first, Alice can leave behind two intervals of length 1 and $wkjdrtgae-3$. This shows that\n\\[\nzqtyblfne(wkjdrtgae) \\geq 1 + pflschrmo(wkjdrtgae-3) = zqtyblfne(wkjdrtgae-7) + 1.\n\\]\nOn the other hand, if Alice leaves behind intervals of length $rvncbodqw$ and $wkjdrtgae-2-rvncbodqw$, Bob can choose to play in either one of these intervals and then follow Alice's lead thereafter (exercising the pass option if Alice makes the last legal move in one of the intervals). This shows that\n\\begin{align*}\nzqtyblfne(wkjdrtgae) &\\leq \\max\\{\\min\\{zqtyblfne(rvncbodqw) + pflschrmo(wkjdrtgae-2-rvncbodqw), \\\\\n& \\qquad pflschrmo(rvncbodqw)+zqtyblfne(wkjdrtgae-2-rvncbodqw)\\}: rvncbodqw =0,1,\\dots,wkjdrtgae-2\\} \\\\\n&= zqtyblfne(wkjdrtgae-7)+1.\n\\end{align*}\n\nMoving first, Bob can leave behind two intervals of lengths 2 and $wkjdrtgae-4$. This shows that\n\\[\npflschrmo(wkjdrtgae) \\leq zqtyblfne(wkjdrtgae-4) = pflschrmo(wkjdrtgae-7) + 1.\n\\]\nOn the other hand, if Bob leaves behind intervals of length $rvncbodqw$ and $wkjdrtgae-2-rvncbodqw$, Alice can choose to play in either one of these intervals and then follow Bob's lead thereafter (again passing as needed). This shows that\n\\begin{align*}\npflschrmo(wkjdrtgae) &\\geq \\min\\{\\max\\{zqtyblfne(rvncbodqw) + pflschrmo(wkjdrtgae-2-rvncbodqw), \\\\\n& \\qquad pflschrmo(rvncbodqw)+zqtyblfne(wkjdrtgae-2-rvncbodqw)\\}: rvncbodqw =0,1,\\dots,wkjdrtgae-2\\} \\\\\n&= pflschrmo(wkjdrtgae-7)+1.\n\\end{align*}\nThis completes the induction."
    },
    "kernel_variant": {
      "question": "Kira and Liam play a game on a board that consists of a single row of 2031 consecutive unit squares. The players take turns (with Kira moving first) placing a domino that covers two adjacent squares. A domino may not cover a square that is already occupied. The game ends when no further domino can be legally placed. Kira wishes to maximize, while Liam wishes to minimize, the number of squares that remain uncovered when play terminates. What is the greatest number of uncovered squares that Kira can guarantee, no matter how Liam responds?",
      "solution": "Write a(n) (resp. b(n)) for the optimal final number of uncovered squares when the first player is Kira (resp. Liam) on one contiguous interval of n empty squares. We will show by induction that for all n≥0\n\na(n)=⌊n/7⌋+a(n mod 7),\nb(n)=⌊n/7⌋+b(n mod 7),\n\nwith the base–case values for n≤6 given by\n\nn:     0 1 2 3 4 5 6\na(n):  0 1 0 1 2 1 2\nb(n):  0 1 0 1 0 1 0\n\n(These can be checked by hand in all small cases.)\n\nInductive step (n≥7). First we show a(n)=a(n−7)+1.\n\n1. Lower bound: Kira’s first move places a domino on squares 2 and 3, splitting the row into two intervals of lengths 1 and n−3. From then on she always replies inside the n−3 interval (using a pass in the single‐square interval when needed), so she guarantees at least 1 + b(n−3) uncovered squares in total. By the induction hypothesis on b, one checks (by examining r=n mod 7) that b(n−3)=a(n−7). Hence a(n) ≥ 1 + a(n−7).\n\n2. Upper bound: Suppose Kira’s first domino splits the row into intervals of lengths i and n−2−i. Liam will choose whichever interval yields the smaller final uncovered total (and play optimally there, again passing if forced). This shows\n\na(n) ≤ max_{0≤i≤n−2} min{ a(i)+b(n−2−i), b(i)+a(n−2−i) }.\n\nA finite check for i≡0,1,…,6 (using the base table) shows that this maximum always equals a(n−7)+1. Thus a(n) ≤ a(n−7)+1, and so a(n)=a(n−7)+1.\n\nBy the same argument (starting with an initial split of lengths 2 and n−4) one proves b(n)=b(n−7)+1. Hence the claimed shift–7 recurrences hold.\n\nIt follows that\n\na(n)=⌊n/7⌋+a(n mod 7).\n\nFinally, for n=2031 we have 2031≡1 (mod 7), so a(2031)=⌊2031/7⌋+a(1)=290+1=291. Therefore Kira can guarantee that exactly 291 squares remain uncovered.\n\nAnswer: 291.",
      "_meta": {
        "core_steps": [
          "Define a(n), b(n) as optimal uncovered-square counts for an n-square interval and tabulate them for n ≤ 6 by direct inspection.",
          "Show inductively that a(n) = a(n−7)+1 and b(n) = b(n−7)+1 using the ‘split into two intervals’ move plus the option to pass.",
          "Solve the recurrences to get a(n) = ⌊n/7⌋ + a(n mod 7).",
          "Evaluate n mod 7 and plug into the formula to obtain the final guaranteed number of uncovered squares."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Total number of squares on the board",
            "original": 2022
          },
          "slot2": {
            "description": "Names (or ordering) of the two players",
            "original": [
              "Alice",
              "Bob"
            ]
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}