{
  "index": "2005-B-4",
  "type": "COMB",
  "tag": [
    "COMB",
    "ALG",
    "NT"
  ],
  "difficulty": "",
  "question": "For positive integers $m$ and $n$, let $f(m,n)$ denote the number of\n$n$-tuples $(x_1,x_2,\\dots,x_n)$ of integers such that\n$|x_1| + |x_2| + \\cdots + |x_n| \\leq m$.\nShow that $f(m,n) = f(n,m)$.",
  "solution": "\\textbf{First solution:}\nDefine $f(m,n,k)$ as the number of $n$-tuples $(x_1, x_2,\\dots,x_n)$\nof integers such that $|x_1| + \\cdots + |x_n| \\leq m$ and exactly\n$k$ of $x_1, \\dots, x_n$ are nonzero. To choose such a tuple, we may choose\nthe $k$ nonzero positions, the signs of those $k$ numbers, and\nthen an ordered $k$-tuple of positive integers with sum $\\leq m$.\nThere are $\\binom{n}{k}$ options for the first choice, and $2^k$ for the\nsecond. As for the third, we have\n$\\binom{m}{k}$ options by a ``stars and bars'' argument: depict the\n$k$-tuple by drawing a number of stars for each term, separated by bars,\nand adding stars at the end to get a total of $m$ stars. Then each tuple\ncorresponds to placing $k$ bars, each in a different position behind one\nof the $m$ fixed stars.\n\nWe conclude that\n\\[\nf(m,n,k) = 2^k\\binom{m}{k} \\binom{n}{k} = f(n,m,k);\n\\]\nsumming over $k$ gives $f(m,n) = f(n,m)$. (One may also extract easily a\nbijective interpretation of the equality.)\n\n\\textbf{Second solution:}\n(by Greg Kuperberg)\nIt will be convenient to extend the definition of $f(m,n)$ to $m,n \\geq 0$,\nin which case we have $f(0,m) = f(n,0) = 1$.\n\nLet $S_{m,n}$ be the set of $n$-tuples $(x_1, \\dots, x_n)$ of integers\nsuch that $|x_1| + \\cdots + |x_n| \\leq m$. Then elements of $S_{m,n}$\ncan be classified into three types. Tuples with $|x_1| + \\cdots + |x_n| < m$\nalso belong to $S_{m-1,n}$. Tuples with $|x_1| + \\cdots + |x_n| = m$\nand $x_n \\geq 0$ correspond to elements of $S_{m,n-1}$ by dropping $x_n$.\nTuples with $|x_1| + \\cdots + |x_n| = m$ and $x_n < 0$ correspond to\nelements of $S_{m-1,n-1}$ by dropping $x_n$. It follows that\n\\[\nf(m,n) = f(m-1,n) + f(m,n-1) + f(m-1,n-1),\n\\]\nso $f$ satisfies a symmetric recurrence with symmetric boundary conditions\n$f(0,m) = f(n,0) = 1$. Hence $f$ is symmetric.\n\n\\def\\ZZ{\\mathbb{Z}}\n\\textbf{Third solution:}\n(by Greg Martin)\nAs in the second solution,\nit is convenient to allow $f(m,0)=f(0,n)=1$. Define the generating function\n\\[\nG(x,y) = \\sum_{m=0}^\\infty \\sum_{n=0}^\\infty f(m,n) x^m y^n.\n\\]\nAs equalities of formal power series (or convergent series on,\nsay, the region $|x|,|y|<\\frac13$), we have\n\\begin{align*}\nG(x,y) &= \\sum_{m\\ge0} \\sum_{n\\ge0} x^m y^n \\sum_{\\substack{k_1,\\,\\dots,\\,k_n \\in \\ZZ \\\\ |k_1| + \\cdots + |k_n| \\le m}} 1 \\\\\n&= \\sum_{n\\ge0} y^n \\sum_{k_1,\\,\\dots,\\,k_n \\in \\ZZ} \\sum_{m\\ge|k_1| + \\cdots + |k_n|} x^m \\\\\n&= \\sum_{n\\ge0} y^n \\sum_{k_1,\\,\\dots,\\,k_n \\in \\ZZ} \\frac{x^{|k_1| + \\cdots + |k_n|}}{1-x} \\\\\n&= \\frac1{1-x} \\sum_{n\\ge0} y^n \\bigg( \\sum_{k\\in\\ZZ} x^{|k|} \\bigg)^n \\\\\n&= \\frac1{1-x} \\sum_{n\\ge0} y^n \\bigg( \\frac{1+x}{1-x} \\bigg)^n \\\\\n&= \\frac1{1-x} \\cdot \\frac1{1-y(1+x)/(1-x)} \\\\\n&= \\frac1{1-x-y-xy}.\n\\end{align*}\nSince $G(x,y) = G(y,x)$, it follows that $f(m,n) = f(n,m)$ for all $m,n\\ge0$.",
  "vars": [
    "x",
    "y",
    "x_1",
    "x_n",
    "k_1",
    "k_n"
  ],
  "params": [
    "m",
    "n",
    "k",
    "f",
    "G",
    "S_m,n"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "x": "seriesvarx",
        "y": "seriesvary",
        "x_1": "firstxvar",
        "x_n": "nthxvar",
        "k_1": "firstkvar",
        "k_n": "nthkvar",
        "m": "boundm",
        "n": "tuplelen",
        "k": "nonzerocount",
        "f": "tuplecount",
        "G": "genfunct",
        "S_m,n": "tuplecountset"
      },
      "question": "For positive integers $boundm$ and $tuplelen$, let $tuplecount(boundm,tuplelen)$ denote the number of\n$tuplelen$-tuples $(firstxvar,x_2,\\dots,nthxvar)$ of integers such that\n$|firstxvar| + |x_2| + \\cdots + |nthxvar| \\leq boundm$.\nShow that $tuplecount(boundm,tuplelen) = tuplecount(tuplelen,boundm)$.",
      "solution": "\\textbf{First solution:}\nDefine $tuplecount(boundm,tuplelen,nonzerocount)$ as the number of $tuplelen$-tuples $(firstxvar, x_2,\\dots,nthxvar)$\nof integers such that $|firstxvar| + \\cdots + |nthxvar| \\leq boundm$ and exactly\n$nonzerocount$ of $firstxvar, \\dots, nthxvar$ are nonzero. To choose such a tuple, we may choose\nthe $nonzerocount$ nonzero positions, the signs of those $nonzerocount$ numbers, and\nthen an ordered $nonzerocount$-tuple of positive integers with sum $\\leq boundm$.\nThere are $\\binom{tuplelen}{nonzerocount}$ options for the first choice, and $2^{nonzerocount}$ for the\nsecond. As for the third, we have\n$\\binom{boundm}{nonzerocount}$ options by a ``stars and bars'' argument: depict the\n$nonzerocount$-tuple by drawing a number of stars for each term, separated by bars,\nand adding stars at the end to get a total of $boundm$ stars. Then each tuple\ncorresponds to placing $nonzerocount$ bars, each in a different position behind one\nof the $boundm$ fixed stars.\n\nWe conclude that\n\\[\ntuplecount(boundm,tuplelen,nonzerocount) = 2^{nonzerocount}\\binom{boundm}{nonzerocount} \\binom{tuplelen}{nonzerocount} = tuplecount(tuplelen,boundm,nonzerocount);\n\\]\nsumming over $nonzerocount$ gives $tuplecount(boundm,tuplelen) = tuplecount(tuplelen,boundm)$. (One may also extract easily a\nbijective interpretation of the equality.)\n\n\\textbf{Second solution:}\n(by Greg Kuperberg)\nIt will be convenient to extend the definition of $tuplecount(boundm,tuplelen)$ to $boundm,tuplelen \\geq 0$,\nin which case we have $tuplecount(0,boundm) = tuplecount(tuplelen,0) = 1$.\n\nLet $tuplecountset_{boundm,tuplelen}$ be the set of $tuplelen$-tuples $(firstxvar, \\dots, nthxvar)$ of integers\nsuch that $|firstxvar| + \\cdots + |nthxvar| \\leq boundm$. Then elements of $tuplecountset_{boundm,tuplelen}$\ncan be classified into three types. Tuples with $|firstxvar| + \\cdots + |nthxvar| < boundm$\nalso belong to $tuplecountset_{boundm-1,tuplelen}$. Tuples with $|firstxvar| + \\cdots + |nthxvar| = boundm$\nand $nthxvar \\geq 0$ correspond to elements of $tuplecountset_{boundm,tuplelen-1}$ by dropping $nthxvar$.\nTuples with $|firstxvar| + \\cdots + |nthxvar| = boundm$ and $nthxvar < 0$ correspond to\nelements of $tuplecountset_{boundm-1,tuplelen-1}$ by dropping $nthxvar$. It follows that\n\\[\ntuplecount(boundm,tuplelen) = tuplecount(boundm-1,tuplelen) + tuplecount(boundm,tuplelen-1) + tuplecount(boundm-1,tuplelen-1),\n\\]\nso $tuplecount$ satisfies a symmetric recurrence with symmetric boundary conditions\n$tuplecount(0,boundm) = tuplecount(tuplelen,0) = 1$. Hence $tuplecount$ is symmetric.\n\n\\def\\ZZ{\\mathbb{Z}}\n\\textbf{Third solution:}\n(by Greg Martin)\nAs in the second solution,\nit is convenient to allow $tuplecount(boundm,0)=tuplecount(0,tuplelen)=1$. Define the generating function\n\\[\ngenfunct(seriesvarx,seriesvary) = \\sum_{boundm=0}^{\\infty} \\sum_{tuplelen=0}^{\\infty} tuplecount(boundm,tuplelen) seriesvarx^{boundm} seriesvary^{tuplelen}.\n\\]\nAs equalities of formal power series (or convergent series on,\nsay, the region $|seriesvarx|,|seriesvary|<\\frac13$), we have\n\\begin{align*}\ngenfunct(seriesvarx,seriesvary) &= \\sum_{boundm\\ge0} \\sum_{tuplelen\\ge0} seriesvarx^{boundm} seriesvary^{tuplelen} \\sum_{\\substack{firstkvar,\\,\\dots,\\,nthkvar \\in \\ZZ \\\\ |firstkvar| + \\cdots + |nthkvar| \\le boundm}} 1 \\\\\n&= \\sum_{tuplelen\\ge0} seriesvary^{tuplelen} \\sum_{firstkvar,\\,\\dots,\\,nthkvar \\in \\ZZ} \\sum_{boundm\\ge|firstkvar| + \\cdots + |nthkvar|} seriesvarx^{boundm} \\\\\n&= \\sum_{tuplelen\\ge0} seriesvary^{tuplelen} \\sum_{firstkvar,\\,\\dots,\\,nthkvar \\in \\ZZ} \\frac{seriesvarx^{|firstkvar| + \\cdots + |nthkvar|}}{1-seriesvarx} \\\\\n&= \\frac1{1-seriesvarx} \\sum_{tuplelen\\ge0} seriesvary^{tuplelen} \\bigg( \\sum_{nonzerocount\\in\\ZZ} seriesvarx^{|nonzerocount|} \\bigg)^{\\!tuplelen} \\\\\n&= \\frac1{1-seriesvarx} \\sum_{tuplelen\\ge0} seriesvary^{tuplelen} \\bigg( \\frac{1+seriesvarx}{1-seriesvarx} \\bigg)^{\\!tuplelen} \\\\\n&= \\frac1{1-seriesvarx} \\cdot \\frac1{1-seriesvary(1+seriesvarx)/(1-seriesvarx)} \\\\\n&= \\frac1{1-seriesvarx-seriesvary-seriesvarx seriesvary}.\n\\end{align*}\nSince $genfunct(seriesvarx,seriesvary) = genfunct(seriesvary,seriesvarx)$, it follows that $tuplecount(boundm,tuplelen) = tuplecount(tuplelen,boundm)$ for all $boundm,tuplelen\\ge0$.",
      "confidence": 0.14
    },
    "descriptive_long_confusing": {
      "map": {
        "x": "pinecones",
        "y": "sailboats",
        "x_1": "quasarbeam",
        "x_n": "glacierbay",
        "k_1": "thunderfog",
        "k_n": "meadowlark",
        "m": "starfruits",
        "n": "riverbanks",
        "k": "stormcloud",
        "f": "hummingbird",
        "G": "drizzlepath",
        "S_m,n": "waterlilies"
      },
      "question": "For positive integers starfruits and riverbanks, let hummingbird(starfruits,riverbanks) denote the number of riverbanks-tuples (quasarbeam,x_2,\\dots,glacierbay) of integers such that |quasarbeam| + |x_2| + \\cdots + |glacierbay| \\leq starfruits. Show that hummingbird(starfruits,riverbanks) = hummingbird(riverbanks,starfruits).",
      "solution": "\\textbf{First solution:}\nDefine $hummingbird(starfruits,riverbanks,stormcloud)$ as the number of riverbanks-tuples $(quasarbeam, x_2,\\dots,glacierbay)$\nof integers such that $|quasarbeam| + \\cdots + |glacierbay| \\leq starfruits$ and exactly\n$stormcloud$ of $quasarbeam, \\dots, glacierbay$ are nonzero. To choose such a tuple, we may choose\nthe $stormcloud$ nonzero positions, the signs of those $stormcloud$ numbers, and\nthen an ordered $stormcloud$-tuple of positive integers with sum $\\leq starfruits$.\nThere are $\\binom{riverbanks}{stormcloud}$ options for the first choice, and $2^{stormcloud}$ for the\nsecond. As for the third, we have\n$\\binom{starfruits}{stormcloud}$ options by a ``stars and bars'' argument: depict the\n$stormcloud$-tuple by drawing a number of stars for each term, separated by bars,\nand adding stars at the end to get a total of $starfruits$ stars. Then each tuple\ncorresponds to placing $stormcloud$ bars, each in a different position behind one\nof the $starfruits$ fixed stars.\n\nWe conclude that\n\\[\nhummingbird(starfruits,riverbanks,stormcloud) = 2^{stormcloud}\\binom{starfruits}{stormcloud} \\binom{riverbanks}{stormcloud} = hummingbird(riverbanks,starfruits,stormcloud);\n\\]\nsumming over $stormcloud$ gives $hummingbird(starfruits,riverbanks) = hummingbird(riverbanks,starfruits)$. (One may also extract easily a\nbijective interpretation of the equality.)\n\n\\textbf{Second solution:}\n(by Greg Kuperberg)\nIt will be convenient to extend the definition of $hummingbird(starfruits,riverbanks)$ to $starfruits,riverbanks \\geq 0$,\nin which case we have $hummingbird(0,starfruits) = hummingbird(riverbanks,0) = 1$.\n\nLet $waterlilies$ be the set of riverbanks-tuples $(quasarbeam, \\dots, glacierbay)$ of integers\nsuch that $|quasarbeam| + \\cdots + |glacierbay| \\leq starfruits$. Then elements of $waterlilies$\ncan be classified into three types. Tuples with $|quasarbeam| + \\cdots + |glacierbay| < starfruits$\nalso belong to $waterlilies$ with parameter $starfruits-1$. Tuples with $|quasarbeam| + \\cdots + |glacierbay| = starfruits$\nand $glacierbay \\geq 0$ correspond to elements of $waterlilies$ with parameters $(starfruits,riverbanks-1)$ by dropping $glacierbay$.\nTuples with $|quasarbeam| + \\cdots + |glacierbay| = starfruits$ and $glacierbay < 0$ correspond to\nelements of $waterlilies$ with parameters $(starfruits-1,riverbanks-1)$ by dropping $glacierbay$. It follows that\n\\[\nhummingbird(starfruits,riverbanks) = hummingbird(starfruits-1,riverbanks) + hummingbird(starfruits,riverbanks-1) + hummingbird(starfruits-1,riverbanks-1),\n\\]\nso $hummingbird$ satisfies a symmetric recurrence with symmetric boundary conditions\n$hummingbird(0,starfruits) = hummingbird(riverbanks,0) = 1$. Hence $hummingbird$ is symmetric.\n\n\\def\\ZZ{\\mathbb{Z}}\n\\textbf{Third solution:}\n(by Greg Martin)\nAs in the second solution,\nit is convenient to allow $hummingbird(starfruits,0)=hummingbird(0,riverbanks)=1$. Define the generating function\n\\[\ndrizzlepath(pinecones,sailboats) = \\sum_{starfruits=0}^\\infty \\sum_{riverbanks=0}^\\infty hummingbird(starfruits,riverbanks) pinecones^{starfruits} sailboats^{riverbanks}.\n\\]\nAs equalities of formal power series (or convergent series on,\nsay, the region $|pinecones|,|sailboats|<\\frac13$), we have\n\\begin{align*}\ndrizzlepath(pinecones,sailboats) &= \\sum_{starfruits\\ge0} \\sum_{riverbanks\\ge0} pinecones^{starfruits} sailboats^{riverbanks} \\sum_{\\substack{thunderfog,\\,\\dots,\\,meadowlark \\in \\ZZ \\\\ |thunderfog| + \\cdots + |meadowlark| \\le starfruits}} 1 \\\\\n&= \\sum_{riverbanks\\ge0} sailboats^{riverbanks} \\sum_{thunderfog,\\,\\dots,\\,meadowlark \\in \\ZZ} \\sum_{starfruits\\ge|thunderfog| + \\cdots + |meadowlark|} pinecones^{starfruits} \\\\\n&= \\sum_{riverbanks\\ge0} sailboats^{riverbanks} \\sum_{thunderfog,\\,\\dots,\\,meadowlark \\in \\ZZ} \\frac{pinecones^{|thunderfog| + \\cdots + |meadowlark|}}{1-pinecones} \\\\\n&= \\frac1{1-pinecones} \\sum_{riverbanks\\ge0} sailboats^{riverbanks} \\bigg( \\sum_{k\\in\\ZZ} pinecones^{|k|} \\bigg)^{riverbanks} \\\\\n&= \\frac1{1-pinecones} \\sum_{riverbanks\\ge0} sailboats^{riverbanks} \\bigg( \\frac{1+pinecones}{1-pinecones} \\bigg)^{riverbanks} \\\\\n&= \\frac1{1-pinecones} \\cdot \\frac1{1-sailboats(1+pinecones)/(1-pinecones)} \\\\\n&= \\frac1{1-pinecones-sailboats-pinecones sailboats}.\n\\end{align*}\nSince $drizzlepath(pinecones,sailboats) = drizzlepath(sailboats,pinecones)$, it follows that $hummingbird(starfruits,riverbanks) = hummingbird(riverbanks,starfruits)$ for all $starfruits,riverbanks\\ge0$.",
      "status": "processed"
    },
    "descriptive_long_misleading": {
      "map": {
        "x": "constantval",
        "y": "unchanging",
        "x_1": "lastelement",
        "x_n": "firstelement",
        "k_1": "aggregate",
        "k_n": "singleton",
        "m": "minimumval",
        "n": "uniqueness",
        "k": "allentries",
        "f": "antifunction",
        "G": "degenerator",
        "S_m,n": "emptiness"
      },
      "question": "For positive integers $minimumval$ and $uniqueness$, let $antifunction(minimumval,uniqueness)$ denote the number of\n$uniqueness$-tuples $(lastelement,x_2,\\dots,firstelement)$ of integers such that\n$|lastelement| + |x_2| + \\cdots + |firstelement| \\leq minimumval$.\nShow that $antifunction(minimumval,uniqueness) = antifunction(uniqueness,minimumval)$.",
      "solution": "\\textbf{First solution:}\nDefine $antifunction(minimumval,uniqueness,allentries)$ as the number of $uniqueness$-tuples $(lastelement, x_2,\\dots,firstelement)$\nof integers such that $|lastelement| + \\cdots + |firstelement| \\leq minimumval$ and exactly\n$allentries$ of $lastelement, \\dots, firstelement$ are nonzero. To choose such a tuple, we may choose\nthe $allentries$ nonzero positions, the signs of those $allentries$ numbers, and\nthen an ordered $allentries$-tuple of positive integers with sum $\\leq minimumval$.\nThere are $\\binom{uniqueness}{allentries}$ options for the first choice, and $2^{allentries}$ for the\nsecond. As for the third, we have\n$\\binom{minimumval}{allentries}$ options by a ``stars and bars'' argument: depict the\n$allentries$-tuple by drawing a number of stars for each term, separated by bars,\nand adding stars at the end to get a total of $minimumval$ stars. Then each tuple\ncorresponds to placing $allentries$ bars, each in a different position behind one\nof the $minimumval$ fixed stars.\n\nWe conclude that\n\\[\nantifunction(minimumval,uniqueness,allentries) = 2^{allentries}\\binom{minimumval}{allentries} \\binom{uniqueness}{allentries} = antifunction(uniqueness,minimumval,allentries);\n\\]\nsumming over $allentries$ gives $antifunction(minimumval,uniqueness) = antifunction(uniqueness,minimumval)$. (One may also extract easily a\nbijective interpretation of the equality.)\n\n\\textbf{Second solution:}\n(by Greg Kuperberg)\nIt will be convenient to extend the definition of $antifunction(minimumval,uniqueness)$ to $minimumval,uniqueness \\geq 0$,\nin which case we have $antifunction(0,minimumval) = antifunction(uniqueness,0) = 1$.\n\nLet $emptiness_{minimumval,uniqueness}$ be the set of $uniqueness$-tuples $(lastelement, \\dots, firstelement)$\nof integers such that $|lastelement| + \\cdots + |firstelement| \\leq minimumval$. Then elements of $emptiness_{minimumval,uniqueness}$\ncan be classified into three types. Tuples with $|lastelement| + \\cdots + |firstelement| < minimumval$\nalso belong to $emptiness_{minimumval-1,uniqueness}$. Tuples with $|lastelement| + \\cdots + |firstelement| = minimumval$\nand $firstelement \\geq 0$ correspond to elements of $emptiness_{minimumval,uniqueness-1}$ by dropping $firstelement$.\nTuples with $|lastelement| + \\cdots + |firstelement| = minimumval$ and $firstelement < 0$ correspond to\nelements of $emptiness_{minimumval-1,uniqueness-1}$ by dropping $firstelement$. It follows that\n\\[\nantifunction(minimumval,uniqueness) = antifunction(minimumval-1,uniqueness) + antifunction(minimumval,uniqueness-1) + antifunction(minimumval-1,uniqueness-1),\n\\]\nso $antifunction$ satisfies a symmetric recurrence with symmetric boundary conditions\n$antifunction(0,minimumval) = antifunction(uniqueness,0) = 1$. Hence $antifunction$ is symmetric.\n\n\\def\\ZZ{\\mathbb{Z}}\n\\textbf{Third solution:}\n(by Greg Martin)\nAs in the second solution,\nit is convenient to allow $antifunction(minimumval,0)=antifunction(0,uniqueness)=1$. Define the generating function\n\\[\ndegenerator(constantval,unchanging) = \\sum_{minimumval=0}^\\infty \\sum_{uniqueness=0}^\\infty antifunction(minimumval,uniqueness)\\, constantval^{minimumval} \\, unchanging^{uniqueness}.\n\\]\nAs equalities of formal power series (or convergent series on,\nsay, the region $|constantval|,|unchanging|<\\frac13$), we have\n\\begin{align*}\ndegenerator(constantval,unchanging) &= \\sum_{minimumval\\ge0} \\sum_{uniqueness\\ge0} constantval^{minimumval} unchanging^{uniqueness} \\sum_{\\substack{aggregate,\\,\\dots,\\,singleton \\in \\ZZ \\\\ |aggregate| + \\cdots + |singleton| \\le minimumval}} 1 \\\\\n&= \\sum_{uniqueness\\ge0} unchanging^{uniqueness} \\sum_{aggregate,\\,\\dots,\\,singleton \\in \\ZZ} \\sum_{minimumval\\ge|aggregate| + \\cdots + |singleton|} constantval^{minimumval} \\\\\n&= \\sum_{uniqueness\\ge0} unchanging^{uniqueness} \\sum_{aggregate,\\,\\dots,\\,singleton \\in \\ZZ} \\frac{constantval^{|aggregate| + \\cdots + |singleton|}}{1-constantval} \\\\\n&= \\frac1{1-constantval} \\sum_{uniqueness\\ge0} unchanging^{uniqueness} \\bigg( \\sum_{allentries\\in\\ZZ} constantval^{|allentries|} \\bigg)^{\\! uniqueness} \\\\\n&= \\frac1{1-constantval} \\sum_{uniqueness\\ge0} unchanging^{uniqueness} \\bigg( \\frac{1+constantval}{1-constantval} \\bigg)^{\\! uniqueness} \\\\\n&= \\frac1{1-constantval} \\cdot \\frac1{1-unchanging(1+constantval)/(1-constantval)} \\\\\n&= \\frac1{1-constantval-unchanging-constantval\\,unchanging}.\n\\end{align*}\nSince $degenerator(constantval,unchanging) = degenerator(unchanging,constantval)$, it follows that $antifunction(minimumval,uniqueness) = antifunction(uniqueness,minimumval)$ for all $minimumval,uniqueness\\ge0$.",
      "final": null
    },
    "garbled_string": {
      "map": {
        "x": "qzxwvtnp",
        "y": "hjgrksla",
        "x_1": "mofdnlcra",
        "x_n": "jsgrplkem",
        "k_1": "tuxmnebrq",
        "k_n": "sadhfplmo",
        "m": "vqenwmsz",
        "n": "yarplhux",
        "k": "czemrptv",
        "f": "wgflexmpr",
        "G": "zsklqvdne",
        "S_m,n": "bbxfjrtcz"
      },
      "question": "For positive integers $vqenwmsz$ and $yarplhux$, let $wgflexmpr(vqenwmsz,yarplhux)$ denote the number of\n$yarplhux$-tuples $(mofdnlcra,x_2,\\dots,jsgrplkem)$ of integers such that\n$|mofdnlcra| + |x_2| + \\cdots + |jsgrplkem| \\leq vqenwmsz$.\nShow that $wgflexmpr(vqenwmsz,yarplhux) = wgflexmpr(yarplhux,vqenwmsz)$.",
      "solution": "\\textbf{First solution:}\nDefine $wgflexmpr(vqenwmsz,yarplhux,czemrptv)$ as the number of $yarplhux$-tuples $(mofdnlcra, x_2,\\dots, jsgrplkem)$\nof integers such that $|mofdnlcra| + \\cdots + |jsgrplkem| \\leq vqenwmsz$ and exactly\n$czemrptv$ of $mofdnlcra, \\dots, jsgrplkem$ are nonzero. To choose such a tuple, we may choose\nthe $czemrptv$ nonzero positions, the signs of those $czemrptv$ numbers, and\nthen an ordered $czemrptv$-tuple of positive integers with sum $\\leq vqenwmsz$.\nThere are $\\binom{yarplhux}{czemrptv}$ options for the first choice, and $2^{czemrptv}$ for the\nsecond. As for the third, we have\n$\\binom{vqenwmsz}{czemrptv}$ options by a ``stars and bars'' argument: depict the\n$czemrptv$-tuple by drawing a number of stars for each term, separated by bars,\nand adding stars at the end to get a total of $vqenwmsz$ stars. Then each tuple\ncorresponds to placing $czemrptv$ bars, each in a different position behind one\nof the $vqenwmsz$ fixed stars.\n\nWe conclude that\n\\[\nwgflexmpr(vqenwmsz,yarplhux,czemrptv) = 2^{czemrptv}\\binom{vqenwmsz}{czemrptv} \\binom{yarplhux}{czemrptv} = wgflexmpr(yarplhux,vqenwmsz,czemrptv);\n\\]\nsumming over $czemrptv$ gives $wgflexmpr(vqenwmsz,yarplhux) = wgflexmpr(yarplhux,vqenwmsz)$. (One may also extract easily a\nbijective interpretation of the equality.)\n\n\\textbf{Second solution:}\n(by Greg Kuperberg)\nIt will be convenient to extend the definition of $wgflexmpr(vqenwmsz,yarplhux)$ to $vqenwmsz,yarplhux \\geq 0$,\nin which case we have $wgflexmpr(0,vqenwmsz) = wgflexmpr(yarplhux,0) = 1$.\n\nLet $bbxfjrtcz_{vqenwmsz,yarplhux}$ be the set of $yarplhux$-tuples $(mofdnlcra, \\dots, jsgrplkem)$ of integers\nsuch that $|mofdnlcra| + \\cdots + |jsgrplkem| \\leq vqenwmsz$. Then elements of $bbxfjrtcz_{vqenwmsz,yarplhux}$\ncan be classified into three types. Tuples with $|mofdnlcra| + \\cdots + |jsgrplkem| < vqenwmsz$\nalso belong to $bbxfjrtcz_{vqenwmsz-1,yarplhux}$. Tuples with $|mofdnlcra| + \\cdots + |jsgrplkem| = vqenwmsz$\nand $jsgrplkem \\geq 0$ correspond to elements of $bbxfjrtcz_{vqenwmsz,yarplhux-1}$ by dropping $jsgrplkem$.\nTuples with $|mofdnlcra| + \\cdots + |jsgrplkem| = vqenwmsz$ and $jsgrplkem < 0$ correspond to\nelements of $bbxfjrtcz_{vqenwmsz-1,yarplhux-1}$ by dropping $jsgrplkem$. It follows that\n\\[\nwgflexmpr(vqenwmsz,yarplhux) = wgflexmpr(vqenwmsz-1,yarplhux) + wgflexmpr(vqenwmsz,yarplhux-1) + wgflexmpr(vqenwmsz-1,yarplhux-1),\n\\]\nso $wgflexmpr$ satisfies a symmetric recurrence with symmetric boundary conditions\n$wgflexmpr(0,vqenwmsz) = wgflexmpr(yarplhux,0) = 1$. Hence $wgflexmpr$ is symmetric.\n\n\\def\\ZZ{\\mathbb{Z}}\n\\textbf{Third solution:}\n(by Greg Martin)\nAs in the second solution,\nit is convenient to allow $wgflexmpr(vqenwmsz,0)=wgflexmpr(0,yarplhux)=1$. Define the generating function\n\\[\nzsklqvdne(qzxwvtnp,hjgrksla) = \\sum_{vqenwmsz=0}^\\infty \\sum_{yarplhux=0}^\\infty wgflexmpr(vqenwmsz,yarplhux) qzxwvtnp^{vqenwmsz} hjgrksla^{yarplhux}.\n\\]\nAs equalities of formal power series (or convergent series on,\nsay, the region $|qzxwvtnp|,|hjgrksla|<\\frac13$), we have\n\\begin{align*}\nzsklqvdne(qzxwvtnp,hjgrksla) &= \\sum_{vqenwmsz\\ge0} \\sum_{yarplhux\\ge0} qzxwvtnp^{vqenwmsz} hjgrksla^{yarplhux} \\sum_{\\substack{tuxmnebrq,\\,\\dots,\\,sadhfplmo \\in \\ZZ \\\\ |tuxmnebrq| + \\cdots + |sadhfplmo| \\le vqenwmsz}} 1 \\\\\n&= \\sum_{yarplhux\\ge0} hjgrksla^{yarplhux} \\sum_{tuxmnebrq,\\,\\dots,\\,sadhfplmo \\in \\ZZ} \\sum_{vqenwmsz\\ge|tuxmnebrq| + \\cdots + |sadhfplmo|} qzxwvtnp^{vqenwmsz} \\\\\n&= \\sum_{yarplhux\\ge0} hjgrksla^{yarplhux} \\sum_{tuxmnebrq,\\,\\dots,\\,sadhfplmo \\in \\ZZ} \\frac{qzxwvtnp^{|tuxmnebrq| + \\cdots + |sadhfplmo|}}{1-qzxwvtnp} \\\\\n&= \\frac1{1-qzxwvtnp} \\sum_{yarplhux\\ge0} hjgrksla^{yarplhux} \\bigg( \\sum_{czemrptv\\in\\ZZ} qzxwvtnp^{|czemrptv|} \\bigg)^{yarplhux} \\\\\n&= \\frac1{1-qzxwvtnp} \\sum_{yarplhux\\ge0} hjgrksla^{yarplhux} \\bigg( \\frac{1+qzxwvtnp}{1-qzxwvtnp} \\bigg)^{yarplhux} \\\\\n&= \\frac1{1-qzxwvtnp} \\cdot \\frac1{1-hjgrksla(1+qzxwvtnp)/(1-qzxwvtnp)} \\\\\n&= \\frac1{1-qzxwvtnp-hjgrksla-qzxwvtnp hjgrksla}.\n\\end{align*}\nSince $zsklqvdne(qzxwvtnp,hjgrksla) = zsklqvdne(hjgrksla,qzxwvtnp)$, it follows that $wgflexmpr(vqenwmsz,yarplhux) = wgflexmpr(yarplhux,vqenwmsz)$ for all $vqenwmsz,yarplhux\\ge0$.}",
      "confidence": 0.13
    },
    "kernel_variant": {
      "question": "Fix an integer r ≥ 2 and let μ₍ᵣ₎ = {1, ζ, ζ²,…, ζ^{r-1}} be the multiplicative group of the r-th roots of unity (ζ = e^{2πi/r}).  \nFor positive integers m and n let h_r(m,n) denote the number of ordered n–tuples  \n\n  (x₁,x₂,…,x_n) with x_i ∈ ℤ  \n\nthat satisfy  \n\n  |x₁| + |x₂| + ⋯ + |x_n| ≤ m,\n\ntogether with an assignment of a root ω_i ∈ μ₍ᵣ₎ to every non–zero coordinate x_i, subject to the global constraint  \n\n  ∏_{x_i≠0} ω_i = 1.                                           (★)\n\n(Zero coordinates receive no root.)  \nProve that for every r ≥ 2 and all positive integers m,n we have  \n\n  h_r(m,n) = h_r(n,m).\n\n————————————————————————————————————",
      "solution": "Step 1.  Reduce to counting by the number k of non–zero coordinates.  \nFor k = 0, the unique tuple (0,…,0) satisfies (★), so h_r(m,n,0) = 1.  \nFix k ≥ 1.  The enumeration proceeds through four independent choices.\n\n(a)  Positions of the k non–zero coordinates: C₁ = 𝑛Ck = 𝐶(n,k).\n\n(b)  Signs of those coordinates: C₂ = 2^k.\n\n(c)  Their absolute values (a₁,…,a_k) ∈ ℕ^k with a₁+⋯+a_k ≤ m.  \n By an ordinary “stars–and–bars’’ argument the number of such k-tuples is  \n\n  C₃ = 𝐶(m,k) = 𝑚Ck.\n\n(d)  The colours ω₁,…,ω_k ∈ μ₍ᵣ₎ satisfying (★).  \n Write μ₍ᵣ₎ additively as ℤ/rℤ.  In that notation (★) becomes  \n\n  ω₁ + ω₂ + ⋯ + ω_k ≡ 0 (mod r).\n\n For any k ≥ 1, choose ω₁,…,ω_{k-1} arbitrarily (r choices each) and force  \n\n  ω_k = −(ω₁+⋯+ω_{k-1}).  \n\n Hence\n\n  C₄ = r^{k-1}.                                              (1)\n\nStep 2.  Assemble the contributions.  \nFor k ≥ 1 the total is  \n\n h_r(m,n,k) = C₁·C₂·C₃·C₄ = 2^k r^{k-1} 𝐶(n,k) 𝐶(m,k).        (2)\n\nInclude k = 0 by decreeing r^{-1}=1; then (2) is valid for every k.\n\nStep 3.  Sum over k.  \n\n h_r(m,n) = Σ_{k=0}^{min(m,n)} 2^k r^{k-1} 𝐶(n,k) 𝐶(m,k).      (3)\n\nBecause the summand is explicitly symmetric in the pair (m,n), the whole sum is symmetric, i.e. h_r(m,n)=h_r(n,m), completing the proof.\n\n————————————————————————————————————",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.794865",
        "was_fixed": false,
        "difficulty_analysis": "• Global coupling:  Unlike the original problems, condition (★) links every non–zero coordinate; colours can no longer be assigned independently.  \n• Group-theoretic enumeration:  Counting colourings requires character theory of the cyclic group μ₍ᵣ₎ (or, equivalently, linear equations over ℤ/rℤ).  \n• Extra parameter r:  The answer must work uniformly for all r ≥ 2, introducing another layer of abstraction.  \n• More intricate combinatorics:  The factor r^{k-1} is derived from a non-trivial counting lemma; after it is found, it must be threaded through the full stars–and–bars and sign analysis before summation.  \n• Multiple advanced concepts interact:  stars–and–bars, binomial identities, finite abelian groups, and symmetry arguments all appear and must be blended coherently.  \nThese additions make the variant substantially harder than both the original and the previous kernel problem while preserving the fundamental m↔n symmetry."
      }
    },
    "original_kernel_variant": {
      "question": "Fix an integer r ≥ 2 and let μ₍ᵣ₎ = {1, ζ, ζ²,…, ζ^{r-1}} be the multiplicative group of the r-th roots of unity (ζ = e^{2πi/r}).  \nFor positive integers m and n let h_r(m,n) denote the number of ordered n–tuples  \n\n  (x₁,x₂,…,x_n) with x_i ∈ ℤ  \n\nthat satisfy  \n\n  |x₁| + |x₂| + ⋯ + |x_n| ≤ m,\n\ntogether with an assignment of a root ω_i ∈ μ₍ᵣ₎ to every non–zero coordinate x_i, subject to the global constraint  \n\n  ∏_{x_i≠0} ω_i = 1.                                           (★)\n\n(Zero coordinates receive no root.)  \nProve that for every r ≥ 2 and all positive integers m,n we have  \n\n  h_r(m,n) = h_r(n,m).\n\n————————————————————————————————————",
      "solution": "Step 1.  Reduce to counting by the number k of non–zero coordinates.  \nFor k = 0, the unique tuple (0,…,0) satisfies (★), so h_r(m,n,0) = 1.  \nFix k ≥ 1.  The enumeration proceeds through four independent choices.\n\n(a)  Positions of the k non–zero coordinates: C₁ = 𝑛Ck = 𝐶(n,k).\n\n(b)  Signs of those coordinates: C₂ = 2^k.\n\n(c)  Their absolute values (a₁,…,a_k) ∈ ℕ^k with a₁+⋯+a_k ≤ m.  \n By an ordinary “stars–and–bars’’ argument the number of such k-tuples is  \n\n  C₃ = 𝐶(m,k) = 𝑚Ck.\n\n(d)  The colours ω₁,…,ω_k ∈ μ₍ᵣ₎ satisfying (★).  \n Write μ₍ᵣ₎ additively as ℤ/rℤ.  In that notation (★) becomes  \n\n  ω₁ + ω₂ + ⋯ + ω_k ≡ 0 (mod r).\n\n For any k ≥ 1, choose ω₁,…,ω_{k-1} arbitrarily (r choices each) and force  \n\n  ω_k = −(ω₁+⋯+ω_{k-1}).  \n\n Hence\n\n  C₄ = r^{k-1}.                                              (1)\n\nStep 2.  Assemble the contributions.  \nFor k ≥ 1 the total is  \n\n h_r(m,n,k) = C₁·C₂·C₃·C₄ = 2^k r^{k-1} 𝐶(n,k) 𝐶(m,k).        (2)\n\nInclude k = 0 by decreeing r^{-1}=1; then (2) is valid for every k.\n\nStep 3.  Sum over k.  \n\n h_r(m,n) = Σ_{k=0}^{min(m,n)} 2^k r^{k-1} 𝐶(n,k) 𝐶(m,k).      (3)\n\nBecause the summand is explicitly symmetric in the pair (m,n), the whole sum is symmetric, i.e. h_r(m,n)=h_r(n,m), completing the proof.\n\n————————————————————————————————————",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.606879",
        "was_fixed": false,
        "difficulty_analysis": "• Global coupling:  Unlike the original problems, condition (★) links every non–zero coordinate; colours can no longer be assigned independently.  \n• Group-theoretic enumeration:  Counting colourings requires character theory of the cyclic group μ₍ᵣ₎ (or, equivalently, linear equations over ℤ/rℤ).  \n• Extra parameter r:  The answer must work uniformly for all r ≥ 2, introducing another layer of abstraction.  \n• More intricate combinatorics:  The factor r^{k-1} is derived from a non-trivial counting lemma; after it is found, it must be threaded through the full stars–and–bars and sign analysis before summation.  \n• Multiple advanced concepts interact:  stars–and–bars, binomial identities, finite abelian groups, and symmetry arguments all appear and must be blended coherently.  \nThese additions make the variant substantially harder than both the original and the previous kernel problem while preserving the fundamental m↔n symmetry."
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}