{
  "index": "2003-A-6",
  "type": "COMB",
  "tag": [
    "COMB",
    "NT"
  ],
  "difficulty": "",
  "question": "For a set  $S$  of nonnegative integers, let  $r_S(n)$  denote the number of\nordered pairs  $(s_1, s_2)$  such that  $s_1 \\in S$, $s_2 \\in S$, $s_1 \\ne\ns_2$,\nand  $s_1 + s_2 = n$.  Is it possible to partition the nonnegative\nintegers into two sets  $A$  and  $B$  in such a way that  $r_A(n) = r_B(n)$\nfor all  $n$ ?",
  "solution": "\\textbf{First solution:} Yes, such a partition is possible. To achieve it,\nplace each integer into $A$ if it has an even number of 1s in its binary\nrepresentation, and into $B$ if it has an odd number. (One discovers this\nby simply attempting to place the first few numbers by hand and noticing\nthe resulting pattern.)\n\nTo show that $r_A(n) = r_B(n)$, we exhibit a bijection between the pairs\n$(a_1, a_2)$ of distinct elements of $A$ with $a_1 + a_2 = n$ and the\npairs $(b_1, b_2)$ of distinct elements of $B$ with $b_1 + b_2 = n$.\nNamely, given a pair $(a_1, a_2)$ with $a_1+a_2 = n$, write both numbers\nin binary and find the lowest-order place in which they differ (such a\nplace exists because $a_1 \\neq a_2$). Change both numbers in that place\nand call the resulting numbers $b_1, b_2$. Then $a_1 + a_2 = b_1 + b_2 =\nn$, but the parity of the number of 1s in $b_1$ is opposite that of $a_1$,\nand likewise between $b_2$ and $a_2$. This yields the desired bijection.\n\n\\textbf{Second solution:} (by Micah Smukler)\nWrite $b(n)$ for the number of 1s in the base 2 expansion of $n$,\nand $f(n) = (-1)^{b(n)}$.\nThen\nthe desired partition can be described as $A = f^{-1}(1)$ and $B = f^{-1}(-1)$.\nSince $f(2n) + f(2n+1) = 0$, we have\n\\[\n\\sum_{i=0}^n f(n) = \\begin{cases} 0 & \\mbox{$n$ odd} \\\\\nf(n) & \\mbox{$n$ even.} \\end{cases}\n\\]\nIf $p,q$ are both in $A$, then $f(p) + f(q) = 2$;\nif $p,q$ are both in $B$, then $f(p) + f(q) = -2$; if $p,q$ are\nin different sets, then $f(p) + f(q) = 0$. In other words,\n\\[\n2(r_A(n) - r_B(n)) = \\sum_{p+q=n,p < q} (f(p) + f(q))\n\\]\nand it suffices to show that the sum on the right is always zero.\nIf $n$ is odd, that sum is visibly $\\sum_{i=0}^n f(i) = 0$.\nIf $n$ is even, the sum equals\n\\[\n\\left(\\sum_{i=0}^n f(i) \\right) - f(n/2) = f(n) - f(n/2) = 0.\n\\]\nThis yields the desired result.\n\n\\textbf{Third solution:} (by Dan Bernstein)\nPut $f(x) = \\sum_{n \\in A} x^n$ and $g(x) = \\sum_{n \\in B} x^n$; then\nthe value of $r_A(n)$ (resp.\\ $r_B(n)$) is the coefficient of $x^n$\nin $f(x)^2 - f(x^2)$ (resp.\\ $g(x)^2 - g(x^2)$). From the evident identities\n\\begin{align*}\n\\frac{1}{1-x} &= f(x) + g(x) \\\\\nf(x) &= f(x^2) + xg(x^2) \\\\\ng(x) &= g(x^2) + xf(x^2),\n\\end{align*}\nwe have\n\\begin{align*}\nf(x) - g(x) &= f(x^2) - g(x^2) + xg(x^2) - xf(x^2) \\\\\n&= (1-x)(f(x^2) - g(x^2)) \\\\\n&= \\frac{f(x^2) - g(x^2)}{f(x) + g(x)}.\n\\end{align*}\nWe deduce that $f(x)^2 - g(x)^2 = f(x^2) - g(x^2)$, yielding the desired\nequality.\n\n\\textbf{Note:}\nThis partition is actually unique, up to interchanging $A$ and $B$.\nMore precisely, the condition that $0 \\in A$ and $r_A(n) = r_B(n)$ for\n$n=1, \\dots, m$ uniquely determines the positions of $0, \\dots, m$. We\nsee this by induction on $m$: given the result for $m-1$, switching the\nlocation of $m$ changes $r_A(m)$ by one and does not change $r_B(m)$, so\nit is not possible for both positions to work.  Robin Chapman points out\nthis problem is solved in D.J. Newman's \\textit{Analytic Number Theory}\n(Springer, 1998); in that solution, one uses generating functions to find\nthe partition and establish its uniqueness, not just verify it.",
  "vars": [
    "S",
    "n",
    "s_1",
    "s_2",
    "A",
    "B",
    "r_S",
    "r_A",
    "r_B",
    "b",
    "f",
    "p",
    "q",
    "i",
    "x",
    "g",
    "m"
  ],
  "params": [],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "S": "integerset",
        "n": "targetsum",
        "s_1": "firstmember",
        "s_2": "secondmember",
        "A": "alfaset",
        "B": "bravoset",
        "r_S": "paircountset",
        "r_A": "paircountalfa",
        "r_B": "paircountbravo",
        "b": "bitcount",
        "f": "parityfunc",
        "p": "firstindex",
        "q": "secondindex",
        "i": "loopindex",
        "x": "formalvar",
        "g": "complementfunc",
        "m": "indexlimit"
      },
      "question": "For a set  $integerset$  of nonnegative integers, let  $paircountset(targetsum)$  denote the number of\nordered pairs  $(firstmember, secondmember)$  such that  $firstmember \\in integerset$, $secondmember \\in integerset$, $firstmember \\ne\nsecondmember$,\nand  $firstmember + secondmember = targetsum$.  Is it possible to partition the nonnegative\nintegers into two sets  $alfaset$  and  $bravoset$  in such a way that  $paircountalfa(targetsum) = paircountbravo(targetsum)$\nfor all  $targetsum$ ?",
      "solution": "\\textbf{First solution:} Yes, such a partition is possible. To achieve it,\nplace each integer into $alfaset$ if it has an even number of 1s in its binary\nrepresentation, and into $bravoset$ if it has an odd number. (One discovers this\nby simply attempting to place the first few numbers by hand and noticing\nthe resulting pattern.)\n\nTo show that $paircountalfa(targetsum) = paircountbravo(targetsum)$, we exhibit a bijection between the pairs\n$(a_1, a_2)$ of distinct elements of $alfaset$ with $a_1 + a_2 = targetsum$ and the\npairs $(b_1, b_2)$ of distinct elements of $bravoset$ with $b_1 + b_2 = targetsum$.\nNamely, given a pair $(a_1, a_2)$ with $a_1+a_2 = targetsum$, write both numbers\nin binary and find the lowest-order place in which they differ (such a\nplace exists because $a_1 \\neq a_2$). Change both numbers in that place\nand call the resulting numbers $b_1, b_2$. Then $a_1 + a_2 = b_1 + b_2 =\ntargetsum$, but the parity of the number of 1s in $b_1$ is opposite that of $a_1$,\nand likewise between $b_2$ and $a_2$. This yields the desired bijection.\n\n\\textbf{Second solution:} (by Micah Smukler)\nWrite $bitcount(targetsum)$ for the number of 1s in the base 2 expansion of $targetsum$,\nand $parityfunc(targetsum) = (-1)^{bitcount(targetsum)}$.\nThen\nthe desired partition can be described as $alfaset = parityfunc^{-1}(1)$ and $bravoset = parityfunc^{-1}(-1)$.\nSince $parityfunc(2targetsum) + parityfunc(2targetsum+1) = 0$, we have\n\\[\n\\sum_{loopindex=0}^{targetsum} parityfunc(targetsum) = \\begin{cases} 0 & \\mbox{$targetsum$ odd} \\\\\nparityfunc(targetsum) & \\mbox{$targetsum$ even.} \\end{cases}\n\\]\nIf $firstindex,secondindex$ are both in $alfaset$, then $parityfunc(firstindex) + parityfunc(secondindex) = 2$;\nif $firstindex,secondindex$ are both in $bravoset$, then $parityfunc(firstindex) + parityfunc(secondindex) = -2$; if $firstindex,secondindex$ are\nin different sets, then $parityfunc(firstindex) + parityfunc(secondindex) = 0$. In other words,\n\\[\n2(paircountalfa(targetsum) - paircountbravo(targetsum)) = \\sum_{firstindex+secondindex=targetsum,firstindex < secondindex} (parityfunc(firstindex) + parityfunc(secondindex))\n\\]\nand it suffices to show that the sum on the right is always zero.\nIf $targetsum$ is odd, that sum is visibly $\\sum_{loopindex=0}^{targetsum} parityfunc(loopindex) = 0$.\nIf $targetsum$ is even, the sum equals\n\\[\n\\left(\\sum_{loopindex=0}^{targetsum} parityfunc(loopindex) \\right) - parityfunc(targetsum/2) = parityfunc(targetsum) - parityfunc(targetsum/2) = 0.\n\\]\nThis yields the desired result.\n\n\\textbf{Third solution:} (by Dan Bernstein)\nPut $parityfunc(formalvar) = \\sum_{targetsum \\in alfaset} formalvar^{targetsum}$ and $complementfunc(formalvar) = \\sum_{targetsum \\in bravoset} formalvar^{targetsum}$; then\nthe value of $paircountalfa(targetsum)$ (resp.\\ $paircountbravo(targetsum)$) is the coefficient of $formalvar^{targetsum}$\nin $parityfunc(formalvar)^2 - parityfunc(formalvar^2)$ (resp.\\ $complementfunc(formalvar)^2 - complementfunc(formalvar^2)$). From the evident identities\n\\begin{align*}\n\\frac{1}{1-formalvar} &= parityfunc(formalvar) + complementfunc(formalvar) \\\\\nparityfunc(formalvar) &= parityfunc(formalvar^2) + formalvar\\,complementfunc(formalvar^2) \\\\\ncomplementfunc(formalvar) &= complementfunc(formalvar^2) + formalvar\\,parityfunc(formalvar^2),\n\\end{align*}\nwe have\n\\begin{align*}\nparityfunc(formalvar) - complementfunc(formalvar) &= parityfunc(formalvar^2) - complementfunc(formalvar^2) + formalvar\\,complementfunc(formalvar^2) - formalvar\\,parityfunc(formalvar^2) \\\\\n&= (1-formalvar)(parityfunc(formalvar^2) - complementfunc(formalvar^2)) \\\\\n&= \\frac{parityfunc(formalvar^2) - complementfunc(formalvar^2)}{parityfunc(formalvar) + complementfunc(formalvar)}.\n\\end{align*}\nWe deduce that $parityfunc(formalvar)^2 - complementfunc(formalvar)^2 = parityfunc(formalvar^2) - complementfunc(formalvar^2)$, yielding the desired\nequality.\n\n\\textbf{Note:}\nThis partition is actually unique, up to interchanging $alfaset$ and $bravoset$.\nMore precisely, the condition that $0 \\in alfaset$ and $paircountalfa(targetsum) = paircountbravo(targetsum)$ for\n$targetsum=1, \\dots, indexlimit$ uniquely determines the positions of $0, \\dots, indexlimit$. We\nsee this by induction on $indexlimit$: given the result for $indexlimit-1$, switching the\nlocation of $indexlimit$ changes $paircountalfa(indexlimit)$ by one and does not change $paircountbravo(indexlimit)$, so\nit is not possible for both positions to work.  Robin Chapman points out\nthis problem is solved in D.J. Newman's \\textit{Analytic Number Theory}\n(Springer, 1998); in that solution, one uses generating functions to find\nthe partition and establish its uniqueness, not just verify it."
    },
    "descriptive_long_confusing": {
      "map": {
        "S": "waterfall",
        "n": "blueberries",
        "s_1": "lanterns",
        "s_2": "fireworks",
        "A": "galaxycar",
        "B": "drizzleof",
        "r_S": "wilderness",
        "r_A": "stormcaves",
        "r_B": "cobblestone",
        "b": "marigolds",
        "f": "heirlooms",
        "p": "rainspout",
        "q": "sledgesnow",
        "i": "needlepin",
        "x": "tangerine",
        "g": "sunscreen",
        "m": "patchwork"
      },
      "question": "For a set  $waterfall$  of nonnegative integers, let  $wilderness(blueberries)$  denote the number of\nordered pairs  $(lanterns, fireworks)$  such that  $lanterns \\in waterfall$, $fireworks \\in waterfall$, $lanterns \\ne\nfireworks$,\nand  $lanterns + fireworks = blueberries$.  Is it possible to partition the nonnegative\nintegers into two sets  $galaxycar$  and  $drizzleof$  in such a way that  $stormcaves(blueberries) = cobblestone(blueberries)$\nfor all  $blueberries$ ?",
      "solution": "\\textbf{First solution:} Yes, such a partition is possible. To achieve it,\nplace each integer into $galaxycar$ if it has an even number of 1s in its binary\nrepresentation, and into $drizzleof$ if it has an odd number. (One discovers this\nby simply attempting to place the first few numbers by hand and noticing\nthe resulting pattern.)\n\nTo show that $stormcaves(blueberries) = cobblestone(blueberries)$, we exhibit a bijection between the pairs\n$(a_1, a_2)$ of distinct elements of $galaxycar$ with $a_1 + a_2 = blueberries$ and the\npairs $(b_1, b_2)$ of distinct elements of $drizzleof$ with $b_1 + b_2 = blueberries$.\nNamely, given a pair $(a_1, a_2)$ with $a_1+a_2 = blueberries$, write both numbers\nin binary and find the lowest-order place in which they differ (such a\nplace exists because $a_1 \\neq a_2$). Change both numbers in that place\nand call the resulting numbers $b_1, b_2$. Then $a_1 + a_2 = b_1 + b_2 =\nblueberries$, but the parity of the number of 1s in $b_1$ is opposite that of $a_1$,\nand likewise between $b_2$ and $a_2$. This yields the desired bijection.\n\n\\textbf{Second solution:} (by Micah Smukler)\nWrite $marigolds(blueberries)$ for the number of 1s in the base 2 expansion of $blueberries$,\nand $heirlooms(blueberries) = (-1)^{marigolds(blueberries)}$.\nThen\nthe desired partition can be described as $galaxycar = heirlooms^{-1}(1)$ and $drizzleof = heirlooms^{-1}(-1)$.\nSince $heirlooms(2blueberries) + heirlooms(2blueberries+1) = 0$, we have\n\\[\n\\sum_{needlepin=0}^{blueberries} heirlooms(blueberries) = \\begin{cases} 0 & \\mbox{$blueberries$ odd} \\\\\nheirlooms(blueberries) & \\mbox{$blueberries$ even.} \\end{cases}\n\\]\nIf $rainspout,sledgesnow$ are both in $galaxycar$, then $heirlooms(rainspout) + heirlooms(sledgesnow) = 2$;\nif $rainspout,sledgesnow$ are both in $drizzleof$, then $heirlooms(rainspout) + heirlooms(sledgesnow) = -2$; if $rainspout,sledgesnow$ are\nin different sets, then $heirlooms(rainspout) + heirlooms(sledgesnow) = 0$. In other words,\n\\[\n2(stormcaves(blueberries) - cobblestone(blueberries)) = \\sum_{rainspout+sledgesnow=blueberries,rainspout < sledgesnow} (heirlooms(rainspout) + heirlooms(sledgesnow))\n\\]\nand it suffices to show that the sum on the right is always zero.\nIf $blueberries$ is odd, that sum is visibly $\\sum_{needlepin=0}^{blueberries} heirlooms(needlepin) = 0$.\nIf $blueberries$ is even, the sum equals\n\\[\n\\left(\\sum_{needlepin=0}^{blueberries} heirlooms(needlepin) \\right) - heirlooms(blueberries/2) = heirlooms(blueberries) - heirlooms(blueberries/2) = 0.\n\\]\nThis yields the desired result.\n\n\\textbf{Third solution:} (by Dan Bernstein)\nPut $heirlooms(tangerine) = \\sum_{blueberries \\in galaxycar} tangerine^{blueberries}$ and $sunscreen(tangerine) = \\sum_{blueberries \\in drizzleof} tangerine^{blueberries}$; then\nthe value of $stormcaves(blueberries)$ (resp.\\ $cobblestone(blueberries)$) is the coefficient of $tangerine^{blueberries}$\nin $heirlooms(tangerine)^2 - heirlooms(tangerine^2)$ (resp.\\ $sunscreen(tangerine)^2 - sunscreen(tangerine^2)$). From the evident identities\n\\begin{align*}\n\\frac{1}{1-tangerine} &= heirlooms(tangerine) + sunscreen(tangerine) \\\\\nheirlooms(tangerine) &= heirlooms(tangerine^2) + tangerine\\,sunscreen(tangerine^2) \\\\\nsunscreen(tangerine) &= sunscreen(tangerine^2) + tangerine\\,heirlooms(tangerine^2),\n\\end{align*}\nwe have\n\\begin{align*}\nheirlooms(tangerine) - sunscreen(tangerine) &= heirlooms(tangerine^2) - sunscreen(tangerine^2) + tangerine\\,sunscreen(tangerine^2) - tangerine\\,heirlooms(tangerine^2) \\\\\n&= (1-tangerine)(heirlooms(tangerine^2) - sunscreen(tangerine^2)) \\\\\n&= \\frac{heirlooms(tangerine^2) - sunscreen(tangerine^2)}{heirlooms(tangerine) + sunscreen(tangerine)}.\n\\end{align*}\nWe deduce that $heirlooms(tangerine)^2 - sunscreen(tangerine)^2 = heirlooms(tangerine^2) - sunscreen(tangerine^2)$, yielding the desired\nequality.\n\n\\textbf{Note:}\nThis partition is actually unique, up to interchanging $galaxycar$ and $drizzleof$.\nMore precisely, the condition that $0 \\in galaxycar$ and $stormcaves(blueberries) = cobblestone(blueberries)$ for\n$blueberries=1, \\dots, patchwork$ uniquely determines the positions of $0, \\dots, patchwork$. We\nsee this by induction on $patchwork$: given the result for $patchwork-1$, switching the\nlocation of $patchwork$ changes $stormcaves(patchwork)$ by one and does not change $cobblestone(patchwork)$, so\nit is not possible for both positions to work.  Robin Chapman points out\nthis problem is solved in D.J. Newman's \\textit{Analytic Number Theory}\n(Springer, 1998); in that solution, one uses generating functions to find\nthe partition and establish its uniqueness, not just verify it."
    },
    "descriptive_long_misleading": {
      "map": {
        "S": "orderedlist",
        "n": "continuum",
        "s_1": "aggregate",
        "s_2": "totality",
        "A": "complement",
        "B": "superset",
        "r_S": "uniqueness",
        "r_A": "emptiness",
        "r_B": "voidness",
        "b": "nullness",
        "f": "constancy",
        "p": "holistic",
        "q": "entirety",
        "i": "terminal",
        "x": "constant",
        "g": "destroyer",
        "m": "nothingness"
      },
      "question": "For a set  $orderedlist$  of nonnegative integers, let  $uniqueness(continuum)$  denote the number of\nordered pairs  $(aggregate, totality)$  such that  $aggregate \\in orderedlist$, $totality \\in orderedlist$, $aggregate \\ne\ntotality$, and  $aggregate + totality = continuum$.  Is it possible to partition the nonnegative\nintegers into two sets  $complement$  and  $superset$  in such a way that  $emptiness(continuum) = voidness(continuum)$\nfor all  $continuum$ ?",
      "solution": "\\textbf{First solution:} Yes, such a partition is possible. To achieve it,\nplace each integer into $complement$ if it has an even number of 1s in its binary\nrepresentation, and into $superset$ if it has an odd number. (One discovers this\nby simply attempting to place the first few numbers by hand and noticing\nthe resulting pattern.)\n\nTo show that $emptiness(continuum) = voidness(continuum)$, we exhibit a bijection between the pairs\n$(a_1, a_2)$ of distinct elements of $complement$ with $a_1 + a_2 = continuum$ and the\npairs $(b_1, b_2)$ of distinct elements of $superset$ with $b_1 + b_2 = continuum$.\nNamely, given a pair $(a_1, a_2)$ with $a_1+a_2 = continuum$, write both numbers\nin binary and find the lowest-order place in which they differ (such a\nplace exists because $a_1 \\neq a_2$). Change both numbers in that place\nand call the resulting numbers $b_1, b_2$. Then $a_1 + a_2 = b_1 + b_2 =\ncontinuum$, but the parity of the number of 1s in $b_1$ is opposite that of $a_1$,\nand likewise between $b_2$ and $a_2$. This yields the desired bijection.\n\n\\textbf{Second solution:} (by Micah Smukler)\nWrite $nullness(continuum)$ for the number of 1s in the base 2 expansion of $continuum$,\nand $constancy(continuum) = (-1)^{nullness(continuum)}$.\nThen\nthe desired partition can be described as $complement = constancy^{-1}(1)$ and $superset = constancy^{-1}(-1)$.\nSince $constancy(2continuum) + constancy(2continuum+1) = 0$, we have\n\\[\n\\sum_{terminal=0}^{continuum} constancy(continuum) = \\begin{cases} 0 & \\mbox{$continuum$ odd} \\\\\nconstancy(continuum) & \\mbox{$continuum$ even.} \\end{cases}\n\\]\nIf $holistic,entirety$ are both in $complement$, then $constancy(holistic) + constancy(entirety) = 2$;\nif $holistic,entirety$ are both in $superset$, then $constancy(holistic) + constancy(entirety) = -2$; if $holistic,entirety$ are\nin different sets, then $constancy(holistic) + constancy(entirety) = 0$. In other words,\n\\[\n2(emptiness(continuum) - voidness(continuum)) = \\sum_{holistic+entirety=continuum,holistic < entirety} (constancy(holistic) + constancy(entirety))\n\\]\nand it suffices to show that the sum on the right is always zero.\nIf $continuum$ is odd, that sum is visibly $\\sum_{terminal=0}^{continuum} constancy(terminal) = 0$.\nIf $continuum$ is even, the sum equals\n\\[\n\\left(\\sum_{terminal=0}^{continuum} constancy(terminal) \\right) - constancy(continuum/2) = constancy(continuum) - constancy(continuum/2) = 0.\n\\]\nThis yields the desired result.\n\n\\textbf{Third solution:} (by Dan Bernstein)\nPut $constancy(constant) = \\sum_{continuum \\in complement} constant^{continuum}$ and $destroyer(constant) = \\sum_{continuum \\in superset} constant^{continuum}$; then\nthe value of $emptiness(continuum)$ (resp.\\ $voidness(continuum)$) is the coefficient of $constant^{continuum}$\nin $constancy(constant)^2 - constancy(constant^2)$ (resp.\\ $destroyer(constant)^2 - destroyer(constant^2)$). From the evident identities\n\\begin{align*}\n\\frac{1}{1-constant} &= constancy(constant) + destroyer(constant) \\\\\nconstancy(constant) &= constancy(constant^2) + constant\\,destroyer(constant^2) \\\\\ndestroyer(constant) &= destroyer(constant^2) + constant\\,constancy(constant^2),\n\\end{align*}\nwe have\n\\begin{align*}\nconstancy(constant) - destroyer(constant) &= constancy(constant^2) - destroyer(constant^2) + constant\\,destroyer(constant^2) - constant\\,constancy(constant^2) \\\\\n&= (1-constant)(constancy(constant^2) - destroyer(constant^2)) \\\\\n&= \\frac{constancy(constant^2) - destroyer(constant^2)}{constancy(constant) + destroyer(constant)}.\n\\end{align*}\nWe deduce that $constancy(constant)^2 - destroyer(constant)^2 = constancy(constant^2) - destroyer(constant^2)$, yielding the desired\nequality.\n\n\\textbf{Note:}\nThis partition is actually unique, up to interchanging $complement$ and $superset$.\nMore precisely, the condition that $0 \\in complement$ and $emptiness(continuum) = voidness(continuum)$ for\n$continuum=1, \\dots, nothingness$ uniquely determines the positions of $0, \\dots, nothingness$. We\nsee this by induction on $nothingness$: given the result for $nothingness-1$, switching the\nlocation of $nothingness$ changes $emptiness(nothingness)$ by one and does not change $voidness(nothingness)$, so\nit is not possible for both positions to work.  Robin Chapman points out\nthis problem is solved in D.J. Newman's \\textit{Analytic Number Theory}\n(Springer, 1998); in that solution, one uses generating functions to find\nthe partition and establish its uniqueness, not just verify it."
    },
    "garbled_string": {
      "map": {
        "S": "qzxwvtnp",
        "n": "hjgrksla",
        "s_1": "mvbtrqsp",
        "s_2": "plkzmnob",
        "A": "gldrfqwe",
        "B": "snvkjdap",
        "r_S": "wemtgqrs",
        "r_A": "yokspndl",
        "r_B": "cfrqpmza",
        "b": "djlwqopa",
        "f": "rixhumtn",
        "p": "zoirvmac",
        "q": "tclsopkw",
        "i": "ebaxchud",
        "x": "nzymplka",
        "g": "fvqzdnpm",
        "m": "hkarwbce"
      },
      "question": "For a set  $qzxwvtnp$  of nonnegative integers, let  $wemtgqrs(hjgrksla)$  denote the number of ordered pairs  $(mvbtrqsp, plkzmnob)$  such that  $mvbtrqsp \\in qzxwvtnp$, $plkzmnob \\in qzxwvtnp$, $mvbtrqsp \\ne plkzmnob$, and  $mvbtrqsp + plkzmnob = hjgrksla$.  Is it possible to partition the nonnegative integers into two sets  $gldrfqwe$  and  $snvkjdap$  in such a way that  $yokspndl(hjgrksla) = cfrqpmza(hjgrksla)$ for all  $hjgrksla$ ?",
      "solution": "\\textbf{First solution:} Yes, such a partition is possible. To achieve it,\nplace each integer into $gldrfqwe$ if it has an even number of 1s in its binary\nrepresentation, and into $snvkjdap$ if it has an odd number. (One discovers this\nby simply attempting to place the first few numbers by hand and noticing\nthe resulting pattern.)\n\nTo show that $yokspndl(hjgrksla) = cfrqpmza(hjgrksla)$, we exhibit a bijection between the pairs\n$(a_1, a_2)$ of distinct elements of $gldrfqwe$ with $a_1 + a_2 = hjgrksla$ and the\npairs $(b_1, b_2)$ of distinct elements of $snvkjdap$ with $b_1 + b_2 = hjgrksla$.\nNamely, given a pair $(a_1, a_2)$ with $a_1+a_2 = hjgrksla$, write both numbers\nin binary and find the lowest-order place in which they differ (such a\nplace exists because $a_1 \\neq a_2$). Change both numbers in that place\nand call the resulting numbers $b_1, b_2$. Then $a_1 + a_2 = b_1 + b_2 =\nhjgrksla$, but the parity of the number of 1s in $b_1$ is opposite that of $a_1$,\nand likewise between $b_2$ and $a_2$. This yields the desired bijection.\n\n\\textbf{Second solution:} (by Micah Smukler)\nWrite $djlwqopa(hjgrksla)$ for the number of 1s in the base 2 expansion of $hjgrksla$,\nand $rixhumtn(hjgrksla) = (-1)^{djlwqopa(hjgrksla)}$.\nThen\nthe desired partition can be described as $gldrfqwe = rixhumtn^{-1}(1)$ and $snvkjdap = rixhumtn^{-1}(-1)$.\nSince $rixhumtn(2hjgrksla) + rixhumtn(2hjgrksla+1) = 0$, we have\n\\[\n\\sum_{ebaxchud=0}^{hjgrksla} rixhumtn(hjgrksla) = \\begin{cases} 0 & \\mbox{$hjgrksla$ odd} \\\\\nrixhumtn(hjgrksla) & \\mbox{$hjgrksla$ even.} \\end{cases}\n\\]\nIf $zoirvmac,tclsopkw$ are both in $gldrfqwe$, then $rixhumtn(zoirvmac) + rixhumtn(tclsopkw) = 2$;\nif $zoirvmac,tclsopkw$ are both in $snvkjdap$, then $rixhumtn(zoirvmac) + rixhumtn(tclsopkw) = -2$; if $zoirvmac,tclsopkw$ are\nin different sets, then $rixhumtn(zoirvmac) + rixhumtn(tclsopkw) = 0$. In other words,\n\\[\n2(yokspndl(hjgrksla) - cfrqpmza(hjgrksla)) = \\sum_{zoirvmac+tclsopkw=hjgrksla,zoirvmac < tclsopkw} (rixhumtn(zoirvmac) + rixhumtn(tclsopkw))\n\\]\nand it suffices to show that the sum on the right is always zero.\nIf $hjgrksla$ is odd, that sum is visibly $\\sum_{ebaxchud=0}^{hjgrksla} rixhumtn(ebaxchud) = 0$.\nIf $hjgrksla$ is even, the sum equals\n\\[\n\\left(\\sum_{ebaxchud=0}^{hjgrksla} rixhumtn(ebaxchud) \\right) - rixhumtn(hjgrksla/2) = rixhumtn(hjgrksla) - rixhumtn(hjgrksla/2) = 0.\n\\]\nThis yields the desired result.\n\n\\textbf{Third solution:} (by Dan Bernstein)\nPut $rixhumtn(nzymplka) = \\sum_{hjgrksla \\in gldrfqwe} nzymplka^{hjgrksla}$ and $fvqzdnpm(nzymplka) = \\sum_{hjgrksla \\in snvkjdap} nzymplka^{hjgrksla}$; then\nthe value of $yokspndl(hjgrksla)$ (resp.\\ $cfrqpmza(hjgrksla)$) is the coefficient of $nzymplka^{hjgrksla}$\nin $rixhumtn(nzymplka)^2 - rixhumtn(nzymplka^2)$ (resp.\\ $fvqzdnpm(nzymplka)^2 - fvqzdnpm(nzymplka^2)$). From the evident identities\n\\begin{align*}\n\\frac{1}{1-nzymplka} &= rixhumtn(nzymplka) + fvqzdnpm(nzymplka) \\\\\nrixhumtn(nzymplka) &= rixhumtn(nzymplka^2) + nzymplka fvqzdnpm(nzymplka^2) \\\\\nfvqzdnpm(nzymplka) &= fvqzdnpm(nzymplka^2) + nzymplka rixhumtn(nzymplka^2),\n\\end{align*}\nwe have\n\\begin{align*}\nrixhumtn(nzymplka) - fvqzdnpm(nzymplka) &= rixhumtn(nzymplka^2) - fvqzdnpm(nzymplka^2) + nzymplka fvqzdnpm(nzymplka^2) - nzymplka rixhumtn(nzymplka^2) \\\\\n&= (1-nzymplka)(rixhumtn(nzymplka^2) - fvqzdnpm(nzymplka^2)) \\\\\n&= \\frac{rixhumtn(nzymplka^2) - fvqzdnpm(nzymplka^2)}{rixhumtn(nzymplka) + fvqzdnpm(nzymplka)}.\n\\end{align*}\nWe deduce that $rixhumtn(nzymplka)^2 - fvqzdnpm(nzymplka)^2 = rixhumtn(nzymplka^2) - fvqzdnpm(nzymplka^2)$, yielding the desired\nequality.\n\n\\textbf{Note:}\nThis partition is actually unique, up to interchanging $gldrfqwe$ and $snvkjdap$.\nMore precisely, the condition that $0 \\in gldrfqwe$ and $yokspndl(hjgrksla) = cfrqpmza(hjgrksla)$ for\n$hjgrksla=1, \\dots, hkarwbce$ uniquely determines the positions of $0, \\dots, hkarwbce$. We\nsee this by induction on $hkarwbce$: given the result for $hkarwbce-1$, switching the\nlocation of $hkarwbce$ changes $yokspndl(hkarwbce)$ by one and does not change $cfrqpmza(hkarwbce)$, so\nit is not possible for both positions to work.  Robin Chapman points out\nthis problem is solved in D.J. Newman's \\textit{Analytic Number Theory}\n(Springer, 1998); in that solution, one uses generating functions to find\nthe partition and establish its uniqueness, not just verify it."
    },
    "kernel_variant": {
      "question": "Fix an integer $d\\ge 1$ and write every point  \n$\\mathbf x=(x_1,\\dots ,x_d)\\in\\mathbb N_0^{\\,d}$ in base 2,\n     $x_k=\\sum_{j\\ge 0}2^j b_{j,k}$ with $b_{j,k}\\in\\{0,1\\}$.\nPut  \n\n  $\\displaystyle\\omega(\\mathbf x)=\\sum_{j\\ge 0}\\sum_{k=1}^{d} b_{j,k}\\pmod 2$  \n\n(the total number of binary 1’s in all coordinates, taken modulo 2) and define  \n\n  $A=\\{\\mathbf x: \\omega(\\mathbf x)=0\\},\\qquad  \n  B=\\{\\mathbf x: \\omega(\\mathbf x)=1\\}. $  \n\nFor a set $S\\subset\\mathbb N_0^{\\,d}$ let  \n\n  $\\displaystyle u_S(\\mathbf n)=\\#\\bigl\\{\\{\\mathbf s_1,\\mathbf s_2\\}\\subset S:\n        \\mathbf s_1\\ne\\mathbf s_2,\\;\n        \\mathbf s_1+\\mathbf s_2=\\mathbf n\\bigr\\}$  \n(the sum is component-wise).\n\n(a)  Prove that $u_A(\\mathbf n)=u_B(\\mathbf n)$ for every\n    $\\mathbf n\\in\\mathbb N_0^{\\,d}$.  \n    Supply two independent proofs:\n        • a purely combinatorial fixed-point-free involution, and  \n        • an argument with multivariate generating functions.\n\n(b)  Show that, once the colour of the origin is prescribed, the\n    partition $\\mathbb N_0^{\\,d}=A\\sqcup B$ is unique up to swapping the\n    two parts.",
      "solution": "Notation.  For $\\ell\\ge 0$ set  \n$e_{k,\\ell}=2^{\\ell}\\mathbf e_k$ where $\\mathbf e_k$ is the $k$-th unit\nvector in $\\mathbb N_0^{\\,d}$; write $\\mathbf b_\\ell(\\mathbf x)=(b_{\\,\\ell,1},\\dots ,b_{\\,\\ell,d})$ for the $\\ell$-th\nbinary column of $\\mathbf x$.\n\n--------------------------------------------------------------------\nA.  Combinatorial bijection\n--------------------------------------------------------------------\nInput: an unordered pair\n$\\{\\mathbf a,\\mathbf c\\}\\subset A$ with $\\mathbf a\\!+\\!\\mathbf c=\\mathbf n$\nand $\\mathbf a\\neq\\mathbf c$.\n\nStep 1 – first place of disagreement.  \nLet $\\ell\\ge 0$ be the smallest index with\n$\\mathbf b_\\ell(\\mathbf a)\\neq\\mathbf b_\\ell(\\mathbf c)$.\nPick the smallest\ncoordinate $k$ for which the bits differ; assume\n$b_{\\ell,k}(\\mathbf a)=0,\\;b_{\\ell,k}(\\mathbf c)=1$\n(the other case is symmetric).\n\nStep 2 – swapping those two bits only.  \nPut  \n $\\displaystyle\\mathbf a'=\\mathbf a+e_{k,\\ell},\\qquad\n  \\mathbf c'=\\mathbf c-e_{k,\\ell}\\;.$\nBecause only one bit is toggled in each vector,  \n(1) the sum is preserved:\n$\\mathbf a'+\\mathbf c'=\\mathbf a+\\mathbf c=\\mathbf n$;  \n(2) each new vector is still non-negative (the subtracted bit was a\n1); and  \n(3) $\\omega(\\mathbf a')=\\omega(\\mathbf a)\\!+\\!1$,\n$\\omega(\\mathbf c')=\\omega(\\mathbf c)\\!+\\!1$,\nso $\\mathbf a',\\mathbf c'\\in B$.\n\nStep 3 – involution.  \nApplying the same construction to $\\{\\mathbf a',\\mathbf c'\\}$ returns\n$\\{\\mathbf a,\\mathbf c\\}$.  Hence  \n\n $\\Phi:\\{\\mathbf a,\\mathbf c\\}\\longmapsto\\{\\mathbf a',\\mathbf c'\\}$  \n\nis a fixed-point-free involution between the two families  \n\n $\\bigl\\{\\{\\mathbf s_1,\\mathbf s_2\\}\\subset A:\n     \\mathbf s_1\\!+\\!\\mathbf s_2=\\mathbf n\\bigr\\}$ and  \n $\\bigl\\{\\{\\mathbf s_1,\\mathbf s_2\\}\\subset B:\n     \\mathbf s_1\\!+\\!\\mathbf s_2=\\mathbf n\\bigr\\}$.\n\nTherefore $u_A(\\mathbf n)=u_B(\\mathbf n)$ for every\n$\\mathbf n$.\n\n--------------------------------------------------------------------\nB.  Multivariate generating-function argument\n--------------------------------------------------------------------\nIntroduce\n $f(\\mathbf x)=\\sum_{\\mathbf m\\in A}\\mathbf x^{\\mathbf m},\\;\n  g(\\mathbf x)=\\sum_{\\mathbf m\\in B}\\mathbf x^{\\mathbf m}$,\n$\\mathbf x^{\\mathbf m}=x_1^{m_1}\\!\\cdots x_d^{m_d}$.\n\nB.1  Functional equations.  \nWrite $P(\\mathbf x)=\\prod_{k=1}^{d}(1+x_k)$ and\n$Q(\\mathbf x)=\\prod_{k=1}^{d}(1-x_k)$.  Set  \n\n $H_{\\text{even}}=\\dfrac{P+Q}{2},\\qquad\n  H_{\\text{odd}} =\\dfrac{P-Q}{2}.$\n\nSeparating vectors according to the parities of their\nleast-significant bits gives  \n\n $f(\\mathbf x)=H_{\\text{even}}(\\mathbf x)\\,f(\\mathbf x^{2})\n                 +H_{\\text{odd}} (\\mathbf x)\\,g(\\mathbf x^{2}),$  \n $g(\\mathbf x)=H_{\\text{odd}} (\\mathbf x)\\,f(\\mathbf x^{2})\n                 +H_{\\text{even}}(\\mathbf x)\\,g(\\mathbf x^{2}).$ (1)\n\nBecause $A\\sqcup B=\\mathbb N_0^{\\,d}$ we also have  \n\n $f(\\mathbf x)+g(\\mathbf x)=\\displaystyle\\prod_{k=1}^{d}\\frac1{1-x_k}=Q^{-1}(\\mathbf x).$ (2)\n\nB.2  Eliminating $H_{\\text{even}},H_{\\text{odd}}$.  \nSubtract the two identities in (1):\n\n $f-g = \\bigl(H_{\\text{even}}-H_{\\text{odd}}\\bigr)(f(\\mathbf x^{2})-g(\\mathbf x^{2}))\n       = Q(\\mathbf x)\\,(f(\\mathbf x^{2})-g(\\mathbf x^{2})).$ (3)\n\nMultiply (3) by (2):\n\n $(f-g)(f+g)=f^2-g^2=(f(\\mathbf x^{2})-g(\\mathbf x^{2})).$ (4)\n\nB.3  Equality of pair-enumerators.  \nDefine  \n\n $P_A(\\mathbf x)=\\tfrac12\\bigl(f(\\mathbf x)^2-f(\\mathbf x^{2})\\bigr),\\;\n  P_B(\\mathbf x)=\\tfrac12\\bigl(g(\\mathbf x)^2-g(\\mathbf x^{2})\\bigr).$\n\nRelation (4) rewrites as  \n$f^2-g^2=f(\\mathbf x^{2})-g(\\mathbf x^{2})$ and therefore  \n\n $P_A(\\mathbf x)-P_B(\\mathbf x)=\\tfrac12\\bigl[(f^2-g^2)-(f(\\mathbf x^{2})-g(\\mathbf x^{2}))\\bigr]=0.$\n\nThus $P_A(\\mathbf x)=P_B(\\mathbf x)$, i.e. the coefficient of every\nmonomial $\\mathbf x^{\\mathbf n}$ is the same: $u_A(\\mathbf n)=u_B(\\mathbf n)$.\n\n--------------------------------------------------------------------\nC.  Uniqueness once the origin is fixed\n--------------------------------------------------------------------\nSuppose a partition\n$\\mathbb N_0^{\\,d}=A'\\sqcup B'$ satisfies $u_{A'}(\\mathbf n)=u_{B'}(\\mathbf\nn)$ for all $\\mathbf n$ and $0\\in A'$.  We prove by induction on the\ngraded lexicographic order that $A'=A$.\n\nInduction step.  Assume all $\\mathbf m\\prec\\mathbf n$ have been classified\nand agree with $A$.  Examine the pair $\\{0,\\mathbf n\\}$:\nit contributes to $u_{A'}(\\mathbf n)$ iff $\\mathbf n\\in A'$.\nAll other contributing pairs $\\{\\mathbf s_1,\\mathbf s_2\\}$ with\n$\\mathbf s_1+\\mathbf s_2=\\mathbf n$ involve smaller\nsummands, hence are already determined to balance.  Therefore the\nequality $u_{A'}(\\mathbf n)=u_{B'}(\\mathbf n)$ forces the\ncontribution of $\\{0,\\mathbf n\\}$ to be the same as in our original\ncolouring, whence $\\mathbf n\\in A$ iff $\\mathbf n\\in A'$.\nThus the colouring is unique once the colour of the origin is fixed.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.780032",
        "was_fixed": false,
        "difficulty_analysis": "1. Dimension jump:  the problem is now set in $\\Bbb N_0^{\\,d}$ with an\n   arbitrary number $d\\ge2$ of independent variables, so every argument\n   must work simultaneously in all coordinates.\n\n2. Two independent proofs are demanded:  \n   • an explicit involution on *sets of lattice points*, which forces one to\n     track bit patterns in several coordinates at once;  \n   • a generating-function proof in $d$ variables, which requires fluency\n     with multivariate formal power series, functional equations\n     (2)–(3) and an iterative limiting argument.\n\n3. Uniqueness is no longer a curiosity but a required theorem, and its\n   proof has to handle a partially ordered $d$-dimensional lattice\n   instead of the linear order $\\Bbb N_0$.\n\n4. None of the above can be solved by simple pattern-matching;\n   one must recognise the higher-dimensional Thue–Morse structure and\n   manage non-trivial algebraic manipulations in several variables.\n\nThese additions greatly deepen the theoretical content and the\ntechnical workload compared with the original one-dimensional,\nsingle-proof problem."
      }
    },
    "original_kernel_variant": {
      "question": "Fix an integer $d\\ge 1$ and write every point  \n$\\mathbf x=(x_1,\\dots ,x_d)\\in\\mathbb N_0^{\\,d}$ in base 2,\n     $x_k=\\sum_{j\\ge 0}2^j b_{j,k}$ with $b_{j,k}\\in\\{0,1\\}$.\nPut  \n\n  $\\displaystyle\\omega(\\mathbf x)=\\sum_{j\\ge 0}\\sum_{k=1}^{d} b_{j,k}\\pmod 2$  \n\n(the total number of binary 1’s in all coordinates, taken modulo 2) and define  \n\n  $A=\\{\\mathbf x: \\omega(\\mathbf x)=0\\},\\qquad  \n  B=\\{\\mathbf x: \\omega(\\mathbf x)=1\\}. $  \n\nFor a set $S\\subset\\mathbb N_0^{\\,d}$ let  \n\n  $\\displaystyle u_S(\\mathbf n)=\\#\\bigl\\{\\{\\mathbf s_1,\\mathbf s_2\\}\\subset S:\n        \\mathbf s_1\\ne\\mathbf s_2,\\;\n        \\mathbf s_1+\\mathbf s_2=\\mathbf n\\bigr\\}$  \n(the sum is component-wise).\n\n(a)  Prove that $u_A(\\mathbf n)=u_B(\\mathbf n)$ for every\n    $\\mathbf n\\in\\mathbb N_0^{\\,d}$.  \n    Supply two independent proofs:\n        • a purely combinatorial fixed-point-free involution, and  \n        • an argument with multivariate generating functions.\n\n(b)  Show that, once the colour of the origin is prescribed, the\n    partition $\\mathbb N_0^{\\,d}=A\\sqcup B$ is unique up to swapping the\n    two parts.",
      "solution": "Notation.  For $\\ell\\ge 0$ set  \n$e_{k,\\ell}=2^{\\ell}\\mathbf e_k$ where $\\mathbf e_k$ is the $k$-th unit\nvector in $\\mathbb N_0^{\\,d}$; write $\\mathbf b_\\ell(\\mathbf x)=(b_{\\,\\ell,1},\\dots ,b_{\\,\\ell,d})$ for the $\\ell$-th\nbinary column of $\\mathbf x$.\n\n--------------------------------------------------------------------\nA.  Combinatorial bijection\n--------------------------------------------------------------------\nInput: an unordered pair\n$\\{\\mathbf a,\\mathbf c\\}\\subset A$ with $\\mathbf a\\!+\\!\\mathbf c=\\mathbf n$\nand $\\mathbf a\\neq\\mathbf c$.\n\nStep 1 – first place of disagreement.  \nLet $\\ell\\ge 0$ be the smallest index with\n$\\mathbf b_\\ell(\\mathbf a)\\neq\\mathbf b_\\ell(\\mathbf c)$.\nPick the smallest\ncoordinate $k$ for which the bits differ; assume\n$b_{\\ell,k}(\\mathbf a)=0,\\;b_{\\ell,k}(\\mathbf c)=1$\n(the other case is symmetric).\n\nStep 2 – swapping those two bits only.  \nPut  \n $\\displaystyle\\mathbf a'=\\mathbf a+e_{k,\\ell},\\qquad\n  \\mathbf c'=\\mathbf c-e_{k,\\ell}\\;.$\nBecause only one bit is toggled in each vector,  \n(1) the sum is preserved:\n$\\mathbf a'+\\mathbf c'=\\mathbf a+\\mathbf c=\\mathbf n$;  \n(2) each new vector is still non-negative (the subtracted bit was a\n1); and  \n(3) $\\omega(\\mathbf a')=\\omega(\\mathbf a)\\!+\\!1$,\n$\\omega(\\mathbf c')=\\omega(\\mathbf c)\\!+\\!1$,\nso $\\mathbf a',\\mathbf c'\\in B$.\n\nStep 3 – involution.  \nApplying the same construction to $\\{\\mathbf a',\\mathbf c'\\}$ returns\n$\\{\\mathbf a,\\mathbf c\\}$.  Hence  \n\n $\\Phi:\\{\\mathbf a,\\mathbf c\\}\\longmapsto\\{\\mathbf a',\\mathbf c'\\}$  \n\nis a fixed-point-free involution between the two families  \n\n $\\bigl\\{\\{\\mathbf s_1,\\mathbf s_2\\}\\subset A:\n     \\mathbf s_1\\!+\\!\\mathbf s_2=\\mathbf n\\bigr\\}$ and  \n $\\bigl\\{\\{\\mathbf s_1,\\mathbf s_2\\}\\subset B:\n     \\mathbf s_1\\!+\\!\\mathbf s_2=\\mathbf n\\bigr\\}$.\n\nTherefore $u_A(\\mathbf n)=u_B(\\mathbf n)$ for every\n$\\mathbf n$.\n\n--------------------------------------------------------------------\nB.  Multivariate generating-function argument\n--------------------------------------------------------------------\nIntroduce\n $f(\\mathbf x)=\\sum_{\\mathbf m\\in A}\\mathbf x^{\\mathbf m},\\;\n  g(\\mathbf x)=\\sum_{\\mathbf m\\in B}\\mathbf x^{\\mathbf m}$,\n$\\mathbf x^{\\mathbf m}=x_1^{m_1}\\!\\cdots x_d^{m_d}$.\n\nB.1  Functional equations.  \nWrite $P(\\mathbf x)=\\prod_{k=1}^{d}(1+x_k)$ and\n$Q(\\mathbf x)=\\prod_{k=1}^{d}(1-x_k)$.  Set  \n\n $H_{\\text{even}}=\\dfrac{P+Q}{2},\\qquad\n  H_{\\text{odd}} =\\dfrac{P-Q}{2}.$\n\nSeparating vectors according to the parities of their\nleast-significant bits gives  \n\n $f(\\mathbf x)=H_{\\text{even}}(\\mathbf x)\\,f(\\mathbf x^{2})\n                 +H_{\\text{odd}} (\\mathbf x)\\,g(\\mathbf x^{2}),$  \n $g(\\mathbf x)=H_{\\text{odd}} (\\mathbf x)\\,f(\\mathbf x^{2})\n                 +H_{\\text{even}}(\\mathbf x)\\,g(\\mathbf x^{2}).$ (1)\n\nBecause $A\\sqcup B=\\mathbb N_0^{\\,d}$ we also have  \n\n $f(\\mathbf x)+g(\\mathbf x)=\\displaystyle\\prod_{k=1}^{d}\\frac1{1-x_k}=Q^{-1}(\\mathbf x).$ (2)\n\nB.2  Eliminating $H_{\\text{even}},H_{\\text{odd}}$.  \nSubtract the two identities in (1):\n\n $f-g = \\bigl(H_{\\text{even}}-H_{\\text{odd}}\\bigr)(f(\\mathbf x^{2})-g(\\mathbf x^{2}))\n       = Q(\\mathbf x)\\,(f(\\mathbf x^{2})-g(\\mathbf x^{2})).$ (3)\n\nMultiply (3) by (2):\n\n $(f-g)(f+g)=f^2-g^2=(f(\\mathbf x^{2})-g(\\mathbf x^{2})).$ (4)\n\nB.3  Equality of pair-enumerators.  \nDefine  \n\n $P_A(\\mathbf x)=\\tfrac12\\bigl(f(\\mathbf x)^2-f(\\mathbf x^{2})\\bigr),\\;\n  P_B(\\mathbf x)=\\tfrac12\\bigl(g(\\mathbf x)^2-g(\\mathbf x^{2})\\bigr).$\n\nRelation (4) rewrites as  \n$f^2-g^2=f(\\mathbf x^{2})-g(\\mathbf x^{2})$ and therefore  \n\n $P_A(\\mathbf x)-P_B(\\mathbf x)=\\tfrac12\\bigl[(f^2-g^2)-(f(\\mathbf x^{2})-g(\\mathbf x^{2}))\\bigr]=0.$\n\nThus $P_A(\\mathbf x)=P_B(\\mathbf x)$, i.e. the coefficient of every\nmonomial $\\mathbf x^{\\mathbf n}$ is the same: $u_A(\\mathbf n)=u_B(\\mathbf n)$.\n\n--------------------------------------------------------------------\nC.  Uniqueness once the origin is fixed\n--------------------------------------------------------------------\nSuppose a partition\n$\\mathbb N_0^{\\,d}=A'\\sqcup B'$ satisfies $u_{A'}(\\mathbf n)=u_{B'}(\\mathbf\nn)$ for all $\\mathbf n$ and $0\\in A'$.  We prove by induction on the\ngraded lexicographic order that $A'=A$.\n\nInduction step.  Assume all $\\mathbf m\\prec\\mathbf n$ have been classified\nand agree with $A$.  Examine the pair $\\{0,\\mathbf n\\}$:\nit contributes to $u_{A'}(\\mathbf n)$ iff $\\mathbf n\\in A'$.\nAll other contributing pairs $\\{\\mathbf s_1,\\mathbf s_2\\}$ with\n$\\mathbf s_1+\\mathbf s_2=\\mathbf n$ involve smaller\nsummands, hence are already determined to balance.  Therefore the\nequality $u_{A'}(\\mathbf n)=u_{B'}(\\mathbf n)$ forces the\ncontribution of $\\{0,\\mathbf n\\}$ to be the same as in our original\ncolouring, whence $\\mathbf n\\in A$ iff $\\mathbf n\\in A'$.\nThus the colouring is unique once the colour of the origin is fixed.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.597577",
        "was_fixed": false,
        "difficulty_analysis": "1. Dimension jump:  the problem is now set in $\\Bbb N_0^{\\,d}$ with an\n   arbitrary number $d\\ge2$ of independent variables, so every argument\n   must work simultaneously in all coordinates.\n\n2. Two independent proofs are demanded:  \n   • an explicit involution on *sets of lattice points*, which forces one to\n     track bit patterns in several coordinates at once;  \n   • a generating-function proof in $d$ variables, which requires fluency\n     with multivariate formal power series, functional equations\n     (2)–(3) and an iterative limiting argument.\n\n3. Uniqueness is no longer a curiosity but a required theorem, and its\n   proof has to handle a partially ordered $d$-dimensional lattice\n   instead of the linear order $\\Bbb N_0$.\n\n4. None of the above can be solved by simple pattern-matching;\n   one must recognise the higher-dimensional Thue–Morse structure and\n   manage non-trivial algebraic manipulations in several variables.\n\nThese additions greatly deepen the theoretical content and the\ntechnical workload compared with the original one-dimensional,\nsingle-proof problem."
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}