{
  "index": "1987-B-6",
  "type": "NT",
  "tag": [
    "NT",
    "ALG",
    "COMB"
  ],
  "difficulty": "",
  "question": "Let $F$ be the field of $p^2$ elements, where $p$ is an odd\nprime. Suppose $S$ is a set of $(p^2-1)/2$ distinct nonzero elements\nof $F$ with the property that for each $a\\neq 0$ in $F$, exactly one\nof $a$ and $-a$ is in $S$. Let $N$ be the number of elements in the\nintersection $S \\cap \\{2a: a \\in S\\}$. Prove that $N$ is even.\n\n\\end{itemize}\n\n\\end{document}",
  "solution": "Solution 1. For \\( a \\in S \\), there is a unique way to write \\( 2 a=\\epsilon_{a} s_{a} \\) where \\( \\epsilon_{a}= \\pm 1 \\) and \\( s_{a} \\in S \\). Then \\( S \\cap 2 S=\\left\\{a \\in S: \\epsilon_{a}=1\\right\\} \\), so \\( \\prod_{a \\in S} \\epsilon_{a}=(-1)^{\\# S-N}=(-1)^{N} \\), since \\( \\# S=(p-1) \\cdot(p+1) / 2 \\) is even. In \\( F \\), we have\n\\[\n2^{\\left(p^{2}-1\\right) / 2} \\prod_{a \\in S} a=\\prod_{a \\in S} \\epsilon_{a} s_{a}=(-1)^{N} \\prod_{a \\in S} a\n\\]\nso \\( (-1)^{N}=2^{\\left(p^{2}-1\\right) / 2}=\\left(2^{p-1}\\right)^{(p+1) / 2}=1^{(p+1) / 2}=1 \\), by Fermat's Little Theorem [Lar1, p. 148]. Hence \\( N \\) is even.\n\nRemark. Gauss based one of his proofs of quadratic reciprocity on the following lemma \\( { }^{\\dagger} \\) [NZM, Theorem 3.2], whose proof uses the same method as Solution 1:\n\nLemma. Let \\( p \\) be an odd prime, and suppose that \\( a \\) is an integer prime to \\( p \\). Consider the least positive residues modulo \\( p \\) of \\( a, 2 a, 3 a, \\ldots,((p-1) / 2) a \\). If \\( n \\) is the number of these that exceed \\( p / 2 \\), then the Legendre symbol \\( \\left(\\frac{a}{p}\\right) \\) equals \\( (-1)^{n} \\).\n\nThe case \\( a=2 \\), which is especially close to Solution 1 , easily implies the formula \\( \\left(\\frac{2}{p}\\right)=(-1)^{\\left(p^{2}-1\\right) / 8} \\), see [NZM, Theorem 3.3].\n\nSolution 2. Let \\( \\{1, x\\} \\) be a basis for \\( F \\) over the field \\( \\mathbb{F}_{p} \\) of \\( p \\) elements. Let \\( H=\\{1,2, \\ldots,(p-1) / 2\\} \\subset \\mathbb{F}_{p} \\), and let\n\\[\nS_{0}=\\left\\{a+b x: a \\in H, b \\in \\mathbb{F}_{p} \\text { or } a=0, b \\in H\\right\\}\n\\]\n\nFor each nonzero \\( a \\in F \\), exactly one of \\( a \\) and \\( -a \\) is in \\( S_{0} \\). Also,\n\\[\nS_{0} \\cap 2 S_{0}=\\left\\{a+b x: a \\in Q, b \\in \\mathbb{F}_{p} \\text { or } a=0, b \\in Q\\right\\}\n\\]\nwhere \\( Q=H \\cap 2 H \\), so \\( \\#\\left(S_{0} \\cap 2 S_{0}\\right)=(\\# Q) p+(\\# Q) \\), which is divisible by \\( p+1 \\), hence even.\n\nEvery other possible \\( S \\) can obtained by repeatedly replacing some \\( \\alpha \\in S \\) by \\( -\\alpha \\), so it suffices to show that the parity of \\( N=\\#(S \\cap 2 S) \\) is unchanged by such an operation on \\( S \\). Suppose \\( S \\) is as in the problem, and \\( S^{\\prime} \\) is the same as \\( S \\) except with \\( \\alpha \\) replaced by \\( -\\alpha \\). Define \\( N^{\\prime} \\) analogously. We will show that \\( N^{\\prime}-N \\) is even.\n\nNote that\n(i) If \\( \\beta \\in S \\cap 2 S \\), then \\( \\beta \\in S^{\\prime} \\cap 2 S^{\\prime} \\) unless \\( \\beta=\\alpha \\) or \\( 2 \\alpha \\).\n(ii) If \\( \\beta \\in S^{\\prime} \\cap 2 S^{\\prime} \\), then \\( \\beta \\in S \\cap 2 S \\) unless \\( \\beta=-\\alpha \\) or \\( -2 \\alpha \\).\n\nIn other words, \\( N^{\\prime} \\) can be computed from \\( N \\) by subtracting 1 for each of \\( \\alpha \\) and \\( 2 \\alpha \\) that belongs to \\( S \\cap 2 S \\), and adding 1 for each of \\( -\\alpha \\) and \\( -2 \\alpha \\) that belongs to \\( S \\cap 2 S \\). These adjustments are determined according to the four cases in the table below.\n\\begin{tabular}{|l||c|c||c|c||c|}\n\\hline \\multicolumn{1}{|l|}{ Case } & \\multicolumn{4}{c|}{ In \\( S \\cap 2 S ? \\)} & \\( N^{\\prime}-N \\) \\\\\n& \\( \\alpha \\) & \\( 2 \\alpha \\) & \\( -\\alpha \\) & \\( -2 \\alpha \\) & \\\\\n\\hline\\( (1) \\alpha / 2 \\in S, 2 \\alpha \\in S \\) & yes & yes & no & no & -2 \\\\\n\\( (2) \\alpha / 2 \\in S,-2 \\alpha \\in S \\) & yes & no & no & yes & 0 \\\\\n\\( (3)-\\alpha / 2 \\in S, 2 \\alpha \\in S \\) & no & yes & yes & no & 0 \\\\\n\\( (4)-\\alpha / 2 \\in S,-2 \\alpha \\in S \\) & no & no & yes & yes & 2 \\\\\n\\hline\n\\end{tabular}\n\nIn each row of the table, \\( N^{\\prime}-N \\) equals the number of times \"yes\" appears under the \\( -\\alpha \\) and \\( -2 \\alpha \\) headers minus the number of times \"yes\" appears under the \\( \\alpha \\) and \\( 2 \\alpha \\) headers. Hence \\( N^{\\prime}-N \\) is even in each case, as desired.\n\nRelated question. The following problem, proposed by Iceland for the 1985 International Mathematical Olympiad, is susceptible to the approach of the second solution.\n\nSuppose \\( x_{1}, \\ldots, x_{n} \\in\\{-1,1\\} \\), and\n\\[\n\\begin{array}{l}\nx_{1} x_{2} x_{3} x_{4}+x_{2} x_{3} x_{4} x_{5}+\\cdots+x_{n-3} x_{n-2} x_{n-1} x_{n} \\\\\n\\quad+x_{n-2} x_{n-1} x_{n} x_{1}+x_{n-1} x_{n} x_{1} x_{2}+x_{n} x_{1} x_{2} x_{3}=0 .\n\\end{array}\n\\]\n\nShow that \\( n \\) is divisible by 4 .",
  "vars": [
    "S",
    "N",
    "a",
    "s_a",
    "H",
    "Q",
    "x",
    "b",
    "n",
    "\\\\epsilon_a",
    "\\\\alpha",
    "\\\\beta",
    "S_0"
  ],
  "params": [
    "F",
    "p"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "S": "selectedset",
        "N": "intersectionnumber",
        "a": "fieldelement",
        "s_a": "partnerins",
        "H": "halfindexset",
        "Q": "doubledhalfset",
        "x": "basiselement",
        "b": "coefficientelem",
        "n": "excedecount",
        "\\epsilon_a": "signindicator",
        "\\alpha": "toggledmember",
        "\\beta": "genericmember",
        "S_0": "initialsubset",
        "F": "fullfield",
        "p": "oddprime"
      },
      "question": "Let $fullfield$ be the field of $oddprime^2$ elements, where $oddprime$ is an odd\nprime. Suppose $selectedset$ is a set of $(oddprime^2-1)/2$ distinct nonzero elements\nof $fullfield$ with the property that for each $fieldelement\\neq 0$ in $fullfield$, exactly one\nof $fieldelement$ and $-fieldelement$ is in $selectedset$. Let $intersectionnumber$ be the number of elements in the\nintersection $selectedset \\cap \\{2fieldelement: fieldelement \\in selectedset\\}$. Prove that $intersectionnumber$ is even.",
      "solution": "Solution 1. For \\( fieldelement \\in selectedset \\), there is a unique way to write \\( 2 fieldelement=signindicator partnerins \\) where \\( signindicator= \\pm 1 \\) and \\( partnerins \\in selectedset \\). Then \\( selectedset \\cap 2 selectedset=\\left\\{fieldelement \\in selectedset: signindicator=1\\right\\} \\), so \\( \\prod_{fieldelement \\in selectedset} signindicator=(-1)^{\\# selectedset-intersectionnumber}=(-1)^{intersectionnumber} \\), since \\( \\# selectedset=(oddprime-1) \\cdot(oddprime+1) / 2 \\) is even. In \\( fullfield \\), we have\n\\[\n2^{\\left(oddprime^{2}-1\\right) / 2} \\prod_{fieldelement \\in selectedset} fieldelement=\\prod_{fieldelement \\in selectedset} signindicator partnerins=(-1)^{intersectionnumber} \\prod_{fieldelement \\in selectedset} fieldelement\n\\]\nso \\( (-1)^{intersectionnumber}=2^{\\left(oddprime^{2}-1\\right) / 2}=\\left(2^{oddprime-1}\\right)^{(oddprime+1) / 2}=1^{(oddprime+1) / 2}=1 \\), by Fermat's Little Theorem [Lar1, oddprime. 148]. Hence \\( intersectionnumber \\) is even.\n\nRemark. Gauss based one of his proofs of quadratic reciprocity on the following lemma \\( { }^{\\dagger} \\) [NZM, Theorem 3.2], whose proof uses the same method as Solution 1:\n\nLemma. Let \\( oddprime \\) be an odd prime, and suppose that \\( fieldelement \\) is an integer prime to \\( oddprime \\). Consider the least positive residues modulo \\( oddprime \\) of \\( fieldelement, 2 fieldelement, 3 fieldelement, \\ldots,((oddprime-1) / 2) fieldelement \\). If \\( excedecount \\) is the number of these that exceed \\( oddprime / 2 \\), then the Legendre symbol \\( \\left(\\frac{fieldelement}{oddprime}\\right) \\) equals \\( (-1)^{excedecount} \\).\n\nThe case \\( fieldelement=2 \\), which is especially close to Solution 1 , easily implies the formula \\( \\left(\\frac{2}{oddprime}\\right)=(-1)^{\\left(oddprime^{2}-1\\right) / 8} \\), see [NZM, Theorem 3.3].\n\nSolution 2. Let \\( \\{1, basiselement\\} \\) be a basis for \\( fullfield \\) over the field \\( \\mathbb{F}_{oddprime} \\) of \\( oddprime \\) elements. Let \\( halfindexset=\\{1,2, \\ldots,(oddprime-1) / 2\\} \\subset \\mathbb{F}_{oddprime} \\), and let\n\\[\ninitialsubset=\\left\\{fieldelement+coefficientelem basiselement: fieldelement \\in halfindexset, coefficientelem \\in \\mathbb{F}_{oddprime} \\text { or } fieldelement=0, coefficientelem \\in halfindexset\\right\\}\n\\]\n\nFor each nonzero \\( fieldelement \\in fullfield \\), exactly one of \\( fieldelement \\) and \\( -fieldelement \\) is in \\( initialsubset \\). Also,\n\\[\ninitialsubset \\cap 2 initialsubset=\\left\\{fieldelement+coefficientelem basiselement: fieldelement \\in doubledhalfset, coefficientelem \\in \\mathbb{F}_{oddprime} \\text { or } fieldelement=0, coefficientelem \\in doubledhalfset\\right\\}\n\\]\nwhere \\( doubledhalfset=halfindexset \\cap 2 halfindexset \\), so \\( \\#\\left(initialsubset \\cap 2 initialsubset\\right)=(\\# doubledhalfset) oddprime+(\\# doubledhalfset) \\), which is divisible by \\( oddprime+1 \\), hence even.\n\nEvery other possible \\( selectedset \\) can obtained by repeatedly replacing some \\( toggledmember \\in selectedset \\) by \\( -toggledmember \\), so it suffices to show that the parity of \\( intersectionnumber=\\#(selectedset \\cap 2 selectedset) \\) is unchanged by such an operation on \\( selectedset \\). Suppose \\( selectedset \\) is as in the problem, and \\( selectedset^{\\prime} \\) is the same as \\( selectedset \\) except with \\( toggledmember \\) replaced by \\( -toggledmember \\). Define \\( intersectionnumber^{\\prime} \\) analogously. We will show that \\( intersectionnumber^{\\prime}-intersectionnumber \\) is even.\n\nNote that\n(i) If \\( genericmember \\in selectedset \\cap 2 selectedset \\), then \\( genericmember \\in selectedset^{\\prime} \\cap 2 selectedset^{\\prime} \\) unless \\( genericmember=toggledmember \\) or \\( 2 toggledmember \\).\n(ii) If \\( genericmember \\in selectedset^{\\prime} \\cap 2 selectedset^{\\prime} \\), then \\( genericmember \\in selectedset \\cap 2 selectedset \\) unless \\( genericmember=-toggledmember \\) or \\( -2 toggledmember \\).\n\nIn other words, \\( intersectionnumber^{\\prime} \\) can be computed from \\( intersectionnumber \\) by subtracting 1 for each of \\( toggledmember \\) and \\( 2 toggledmember \\) that belongs to \\( selectedset \\cap 2 selectedset \\), and adding 1 for each of \\( -toggledmember \\) and \\( -2 toggledmember \\) that belongs to \\( selectedset \\cap 2 selectedset \\). These adjustments are determined according to the four cases in the table below.\n\\begin{tabular}{|l||c|c||c|c||c|}\n\\hline \\multicolumn{1}{|l|}{ Case } & \\multicolumn{4}{c|}{ In \\( selectedset \\cap 2 selectedset ? \\)} & \\( intersectionnumber^{\\prime}-intersectionnumber \\) \\\\\n& \\( toggledmember \\) & \\( 2 toggledmember \\) & \\( -toggledmember \\) & \\( -2 toggledmember \\) & \\\\\n\\hline\\( (1) toggledmember / 2 \\in selectedset, 2 toggledmember \\in selectedset \\) & yes & yes & no & no & -2 \\\\\n\\( (2) toggledmember / 2 \\in selectedset,-2 toggledmember \\in selectedset \\) & yes & no & no & yes & 0 \\\\\n\\( (3)-toggledmember / 2 \\in selectedset, 2 toggledmember \\in selectedset \\) & no & yes & yes & no & 0 \\\\\n\\( (4)-toggledmember / 2 \\in selectedset,-2 toggledmember \\in selectedset \\) & no & no & yes & yes & 2 \\\\\n\\hline\n\\end{tabular}\n\nIn each row of the table, \\( intersectionnumber^{\\prime}-intersectionnumber \\) equals the number of times \"yes\" appears under the \\( -toggledmember \\) and \\( -2 toggledmember \\) headers minus the number of times \"yes\" appears under the \\( toggledmember \\) and \\( 2 toggledmember \\) headers. Hence \\( intersectionnumber^{\\prime}-intersectionnumber \\) is even in each case, as desired.\n\nRelated question. The following problem, proposed by Iceland for the 1985 International Mathematical Olympiad, is susceptible to the approach of the second solution.\n\nSuppose \\( basiselement_{1}, \\ldots, basiselement_{excedecount} \\in\\{-1,1\\} \\), and\n\\[\n\\begin{array}{l}\nbasiselement_{1} basiselement_{2} basiselement_{3} basiselement_{4}+basiselement_{2} basiselement_{3} basiselement_{4} basiselement_{5}+\\cdots+basiselement_{excedecount-3} basiselement_{excedecount-2} basiselement_{excedecount-1} basiselement_{excedecount} \\\\\n\\quad+basiselement_{excedecount-2} basiselement_{excedecount-1} basiselement_{excedecount} basiselement_{1}+basiselement_{excedecount-1} basiselement_{excedecount} basiselement_{1} basiselement_{2}+basiselement_{excedecount} basiselement_{1} basiselement_{2} basiselement_{3}=0 .\n\\end{array}\n\\]\n\nShow that \\( excedecount \\) is divisible by 4 ."
    },
    "descriptive_long_confusing": {
      "map": {
        "S": "sandcastle",
        "N": "grandfather",
        "a": "lemonade",
        "s_a": "blackbird",
        "H": "pineapple",
        "Q": "rainstorm",
        "x": "toothpick",
        "b": "drumstick",
        "n": "sailcloth",
        "\\epsilon_a": "nightshade",
        "\\alpha": "beachcomber",
        "\\beta": "waterwheel",
        "S_0": "thumbtack",
        "F": "paintbrush",
        "p": "marshmallow"
      },
      "question": "Let $paintbrush$ be the field of $marshmallow^2$ elements, where $marshmallow$ is an odd\nprime. Suppose $sandcastle$ is a set of $(marshmallow^2-1)/2$ distinct nonzero elements\nof $paintbrush$ with the property that for each $lemonade\\neq 0$ in $paintbrush$, exactly one\nof $lemonade$ and $-lemonade$ is in $sandcastle$. Let $grandfather$ be the number of elements in the\nintersection $sandcastle \\cap \\{2lemonade: lemonade \\in sandcastle\\}$. Prove that $grandfather$ is even.",
      "solution": "Solution 1. For $lemonade \\in sandcastle$, there is a unique way to write $2 lemonade=nightshade\\,blackbird$ where $nightshade= \\pm 1$ and $blackbird \\in sandcastle$. Then $sandcastle \\cap 2 sandcastle=\\{lemonade \\in sandcastle: nightshade=1\\}$, so $\\prod_{lemonade \\in sandcastle} nightshade=(-1)^{\\# sandcastle-grandfather}=(-1)^{grandfather}$, since $\\# sandcastle=(marshmallow-1)\\cdot(marshmallow+1)/2$ is even. In $paintbrush$, we have\n\\[\n2^{(marshmallow^{2}-1)/2}\\prod_{lemonade \\in sandcastle} lemonade=\\prod_{lemonade \\in sandcastle} nightshade\\,blackbird=(-1)^{grandfather}\\prod_{lemonade \\in sandcastle} lemonade\n\\]\nso $(-1)^{grandfather}=2^{(marshmallow^{2}-1)/2}=(2^{marshmallow-1})^{(marshmallow+1)/2}=1^{(marshmallow+1)/2}=1$, by Fermat's Little Theorem [Lar1, p. 148]. Hence $grandfather$ is even.\n\nRemark. Gauss based one of his proofs of quadratic reciprocity on the following lemma [NZM, Theorem 3.2], whose proof uses the same method as Solution 1:\n\nLemma. Let $marshmallow$ be an odd prime, and suppose that $lemonade$ is an integer prime to $marshmallow$. Consider the least positive residues modulo $marshmallow$ of $lemonade, 2lemonade, 3lemonade, \\ldots,((marshmallow-1)/2)lemonade$. If $sailcloth$ is the number of these that exceed $marshmallow/2$, then the Legendre symbol $\\left(\\frac{lemonade}{marshmallow}\\right)$ equals $(-1)^{sailcloth}$.\n\nThe case $lemonade=2$, which is especially close to Solution 1, easily implies the formula $\\left(\\frac{2}{marshmallow}\\right)=(-1)^{(marshmallow^{2}-1)/8}$, see [NZM, Theorem 3.3].\n\nSolution 2. Let $\\{1, toothpick\\}$ be a basis for $paintbrush$ over the field $\\mathbb{F}_{marshmallow}$ of $marshmallow$ elements. Let $pineapple=\\{1,2, \\ldots,(marshmallow-1)/2\\} \\subset \\mathbb{F}_{marshmallow}$, and let\n\\[\nthumbtack=\\{lemonade+drumstick\\,toothpick: lemonade \\in pineapple, drumstick \\in \\mathbb{F}_{marshmallow} \\text{ or } lemonade=0, drumstick \\in pineapple\\}\n\\]\n\nFor each nonzero $lemonade \\in paintbrush$, exactly one of $lemonade$ and $-lemonade$ is in $thumbtack$. Also,\n\\[\nthumbtack \\cap 2 thumbtack=\\{lemonade+drumstick\\,toothpick: lemonade \\in rainstorm, drumstick \\in \\mathbb{F}_{marshmallow} \\text{ or } lemonade=0, drumstick \\in rainstorm\\}\n\\]\nwhere $rainstorm=pineapple \\cap 2 pineapple$, so $\\#(thumbtack \\cap 2 thumbtack)=(\\# rainstorm)marshmallow+(\\# rainstorm)$, which is divisible by $marshmallow+1$, hence even.\n\nEvery other possible $sandcastle$ can obtained by repeatedly replacing some $beachcomber \\in sandcastle$ by $-beachcomber$, so it suffices to show that the parity of $grandfather=\\#(sandcastle \\cap 2 sandcastle)$ is unchanged by such an operation on $sandcastle$. Suppose $sandcastle$ is as in the problem, and $sandcastle^{\\prime}$ is the same as $sandcastle$ except with $beachcomber$ replaced by $-beachcomber$. Define $grandfather^{\\prime}$ analogously. We will show that $grandfather^{\\prime}-grandfather$ is even.\n\nNote that\n(i) If $waterwheel \\in sandcastle \\cap 2 sandcastle$, then $waterwheel \\in sandcastle^{\\prime} \\cap 2 sandcastle^{\\prime}$ unless $waterwheel=beachcomber$ or $2beachcomber$.\n(ii) If $waterwheel \\in sandcastle^{\\prime} \\cap 2 sandcastle^{\\prime}$, then $waterwheel \\in sandcastle \\cap 2 sandcastle$ unless $waterwheel=-beachcomber$ or $-2beachcomber$.\n\nIn other words, $grandfather^{\\prime}$ can be computed from $grandfather$ by subtracting 1 for each of $beachcomber$ and $2beachcomber$ that belongs to $sandcastle \\cap 2 sandcastle$, and adding 1 for each of $-beachcomber$ and $-2beachcomber$ that belongs to $sandcastle \\cap 2 sandcastle$. These adjustments are determined according to the four cases in the table below.\n\\begin{tabular}{|l||c|c||c|c||c|}\n\\hline \\multicolumn{1}{|l|}{ Case } & \\multicolumn{4}{c|}{ In $sandcastle \\cap 2 sandcastle$? } & $grandfather^{\\prime}-grandfather$ \\\\\n& $beachcomber$ & $2beachcomber$ & $-beachcomber$ & $-2beachcomber$ & \\\\\n\\hline (1) $beachcomber/2 \\in sandcastle, 2beachcomber \\in sandcastle$ & yes & yes & no & no & -2 \\\\\n(2) $beachcomber/2 \\in sandcastle,-2beachcomber \\in sandcastle$ & yes & no & no & yes & 0 \\\\\n(3) $-beachcomber/2 \\in sandcastle, 2beachcomber \\in sandcastle$ & no & yes & yes & no & 0 \\\\\n(4) $-beachcomber/2 \\in sandcastle,-2beachcomber \\in sandcastle$ & no & no & yes & yes & 2 \\\\\n\\hline\n\\end{tabular}\n\nIn each row of the table, $grandfather^{\\prime}-grandfather$ equals the number of times \"yes\" appears under the $-beachcomber$ and $-2beachcomber$ headers minus the number of times \"yes\" appears under the $beachcomber$ and $2beachcomber$ headers. Hence $grandfather^{\\prime}-grandfather$ is even in each case, as desired.\n\nRelated question. The following problem, proposed by Iceland for the 1985 International Mathematical Olympiad, is susceptible to the approach of the second solution.\n\nSuppose $toothpick_{1}, \\ldots, toothpick_{sailcloth} \\in\\{-1,1\\}$, and\n\\[\n\\begin{array}{l}\n to\\!\n toothpick_{1} toothpick_{2} toothpick_{3} toothpick_{4}+toothpick_{2} toothpick_{3} toothpick_{4} toothpick_{5}+\\cdots+toothpick_{sailcloth-3} toothpick_{sailcloth-2} toothpick_{sailcloth-1} toothpick_{sailcloth} \\\\\n \\quad+toothpick_{sailcloth-2} toothpick_{sailcloth-1} toothpick_{sailcloth} toothpick_{1}+toothpick_{sailcloth-1} toothpick_{sailcloth} toothpick_{1} toothpick_{2}+toothpick_{sailcloth} toothpick_{1} toothpick_{2} toothpick_{3}=0 .\n\\end{array}\n\\]\n\nShow that $sailcloth$ is divisible by 4 ."
    },
    "descriptive_long_misleading": {
      "map": {
        "S": "disarray",
        "N": "noncount",
        "a": "wholeelem",
        "s_a": "outsider",
        "H": "everyall",
        "Q": "universal",
        "x": "constant",
        "b": "indepvar",
        "n": "irrational",
        "\\\\epsilon_a": "magnitudebig",
        "\\\\alpha": "omegafinal",
        "\\\\beta": "zetaultimate",
        "S_0": "finaldisarray",
        "F": "voidspace",
        "p": "composite"
      },
      "question": "Problem:\n<<<\nLet $voidspace$ be the field of $composite^2$ elements, where $composite$ is an odd\nprime. Suppose $disarray$ is a set of $(composite^2-1)/2$ distinct nonzero elements\nof $voidspace$ with the property that for each $wholeelem\\neq 0$ in $voidspace$, exactly one\nof $wholeelem$ and $-wholeelem$ is in $disarray$. Let $noncount$ be the number of elements in the\nintersection $disarray \\cap \\{2wholeelem: wholeelem \\in disarray\\}$. Prove that $noncount$ is even.\n\n\\end{itemize}\n\n\\end{document}\n>>>\n",
      "solution": "Solution 1. For \\( wholeelem \\in disarray \\), there is a unique way to write \\( 2\\,wholeelem = magnitudebig\\, outsider \\) where \\( magnitudebig = \\pm 1 \\) and \\( outsider \\in disarray \\). Then \\( disarray \\cap 2\\,disarray =\\left\\{wholeelem \\in disarray: magnitudebig =1\\right\\} \\), so \\( \\prod_{wholeelem \\in disarray} magnitudebig = (-1)^{\\#\\,disarray-noncount}=(-1)^{noncount} \\), since \\( \\#\\,disarray=(composite-1) \\cdot(composite+1) / 2 \\) is even. In \\( voidspace \\), we have\n\\[\n2^{\\left(composite^{2}-1\\right) / 2} \\prod_{wholeelem \\in disarray} wholeelem = \\prod_{wholeelem \\in disarray} magnitudebig\\, outsider = (-1)^{noncount} \\prod_{wholeelem \\in disarray} wholeelem\n\\]\nso \\( (-1)^{noncount}=2^{\\left(composite^{2}-1\\right) / 2}=\\left(2^{composite-1}\\right)^{(composite+1) / 2}=1^{(composite+1) / 2}=1 \\), by Fermat's Little Theorem [Lar1, p. 148]. Hence \\( noncount \\) is even.\n\nRemark. Gauss based one of his proofs of quadratic reciprocity on the following lemma \\({ }^{\\dagger}\\) [NZM, Theorem 3.2], whose proof uses the same method as Solution 1:\n\nLemma. Let \\( composite \\) be an odd prime, and suppose that \\( wholeelem \\) is an integer prime to \\( composite \\). Consider the least positive residues modulo \\( composite \\) of \\( wholeelem, 2\\,wholeelem, 3\\,wholeelem, \\ldots,((composite-1) / 2)\\,wholeelem \\). If \\( irrational \\) is the number of these that exceed \\( composite / 2 \\), then the Legendre symbol \\( \\left(\\frac{wholeelem}{composite}\\right) \\) equals \\( (-1)^{irrational} \\).\n\nThe case \\( wholeelem=2 \\), which is especially close to Solution 1 , easily implies the formula \\( \\left(\\frac{2}{composite}\\right)=(-1)^{\\left(composite^{2}-1\\right) / 8} \\), see [NZM, Theorem 3.3].\n\nSolution 2. Let \\( \\{1, constant\\} \\) be a basis for \\( voidspace \\) over the field \\( \\mathbb{F}_{composite} \\) of \\( composite \\) elements. Let \\( everyall=\\{1,2, \\ldots,(composite-1) / 2\\} \\subset \\mathbb{F}_{composite} \\), and let\n\\[\nfinaldisarray=\\left\\{wholeelem+indepvar\\, constant: wholeelem \\in everyall, indepvar \\in \\mathbb{F}_{composite} \\text { or } wholeelem=0, indepvar \\in everyall\\right\\}\n\\]\n\nFor each nonzero \\( wholeelem \\in voidspace \\), exactly one of \\( wholeelem \\) and \\( -wholeelem \\) is in \\( finaldisarray \\). Also,\n\\[\nfinaldisarray \\cap 2\\,finaldisarray=\\left\\{wholeelem+indepvar\\, constant: wholeelem \\in universal, indepvar \\in \\mathbb{F}_{composite} \\text { or } wholeelem=0, indepvar \\in universal\\right\\}\n\\]\nwhere \\( universal=everyall \\cap 2\\,everyall \\), so \\( \\#\\left(finaldisarray \\cap 2\\,finaldisarray\\right)=(\\#\\,universal)\\,composite+(\\#\\,universal) \\), which is divisible by \\( composite+1 \\), hence even.\n\nEvery other possible \\( disarray \\) can obtained by repeatedly replacing some \\( omegafinal \\in disarray \\) by \\( -omegafinal \\), so it suffices to show that the parity of \\( noncount=\\#(disarray \\cap 2\\,disarray) \\) is unchanged by such an operation on \\( disarray \\). Suppose \\( disarray \\) is as in the problem, and \\( disarray^{\\prime} \\) is the same as \\( disarray \\) except with \\( omegafinal \\) replaced by \\( -omegafinal \\). Define \\( noncount^{\\prime} \\) analogously. We will show that \\( noncount^{\\prime}-noncount \\) is even.\n\nNote that\n(i) If \\( zetaultimate \\in disarray \\cap 2\\,disarray \\), then \\( zetaultimate \\in disarray^{\\prime} \\cap 2\\,disarray^{\\prime} \\) unless \\( zetaultimate=omegafinal \\) or \\( 2\\,omegafinal \\).\n(ii) If \\( zetaultimate \\in disarray^{\\prime} \\cap 2\\,disarray^{\\prime} \\), then \\( zetaultimate \\in disarray \\cap 2\\,disarray \\) unless \\( zetaultimate=-omegafinal \\) or \\( -2\\,omegafinal \\).\n\nIn other words, \\( noncount^{\\prime} \\) can be computed from \\( noncount \\) by subtracting 1 for each of \\( omegafinal \\) and \\( 2\\,omegafinal \\) that belongs to \\( disarray \\cap 2\\,disarray \\), and adding 1 for each of \\( -omegafinal \\) and \\( -2\\,omegafinal \\) that belongs to \\( disarray \\cap 2\\,disarray \\). These adjustments are determined according to the four cases in the table below.\n\\begin{tabular}{|l||c|c||c|c||c|}\n\\hline \\multicolumn{1}{|l|}{ Case } & \\multicolumn{4}{c|}{ In \\( disarray \\cap 2\\,disarray ? \\)} & \\( noncount^{\\prime}-noncount \\) \\\\\n& \\( omegafinal \\) & \\( 2\\,omegafinal \\) & \\( -omegafinal \\) & \\( -2\\,omegafinal \\) & \\\\\n\\hline(1) \\( omegafinal / 2 \\in disarray, 2\\,omegafinal \\in disarray \\) & yes & yes & no & no & -2 \\\\\n(2) \\( omegafinal / 2 \\in disarray,-2\\,omegafinal \\in disarray \\) & yes & no & no & yes & 0 \\\\\n(3) \\( -omegafinal / 2 \\in disarray, 2\\,omegafinal \\in disarray \\) & no & yes & yes & no & 0 \\\\\n(4) \\( -omegafinal / 2 \\in disarray,-2\\,omegafinal \\in disarray \\) & no & no & yes & yes & 2 \\\\\n\\hline\n\\end{tabular}\n\nIn each row of the table, \\( noncount^{\\prime}-noncount \\) equals the number of times \"yes\" appears under the \\( -omegafinal \\) and \\( -2\\,omegafinal \\) headers minus the number of times \"yes\" appears under the \\( omegafinal \\) and \\( 2\\,omegafinal \\) headers. Hence \\( noncount^{\\prime}-noncount \\) is even in each case, as desired.\n\nRelated question. The following problem, proposed by Iceland for the 1985 International Mathematical Olympiad, is susceptible to the approach of the second solution.\n\nSuppose \\( constant_{1}, \\ldots, constant_{irrational} \\in\\{-1,1\\} \\), and\n\\[\n\\begin{array}{l}\nconstant_{1} constant_{2} constant_{3} constant_{4}+constant_{2} constant_{3} constant_{4} constant_{5}+\\cdots+constant_{irrational-3} constant_{irrational-2} constant_{irrational-1} constant_{irrational} \\\\\n\\quad+constant_{irrational-2} constant_{irrational-1} constant_{irrational} constant_{1}+constant_{irrational-1} constant_{irrational} constant_{1} constant_{2}+constant_{irrational} constant_{1} constant_{2} constant_{3}=0 .\n\\end{array}\n\\]\n\nShow that \\( irrational \\) is divisible by 4 ."
    },
    "garbled_string": {
      "map": {
        "S": "lkjdshfa",
        "N": "qowpeitr",
        "a": "zmxncbva",
        "s_a": "jweoritx",
        "H": "vbnasdjf",
        "Q": "rtyuiope",
        "x": "pasdfghj",
        "b": "qweasdzx",
        "n": "mnbvcxza",
        "\\epsilon_a": "plmoknij",
        "\\alpha": "qazwsxed",
        "\\beta": "wsxrfvgt",
        "S_0": "kjhgfdsq",
        "F": "asdfghjk",
        "p": "zxcvbnml"
      },
      "question": "Let $asdfghjk$ be the field of $zxcvbnml^2$ elements, where $zxcvbnml$ is an odd\nprime. Suppose $lkjdshfa$ is a set of $(zxcvbnml^2-1)/2$ distinct nonzero elements\nof $asdfghjk$ with the property that for each $zmxncbva\\neq 0$ in $asdfghjk$, exactly one\nof $zmxncbva$ and $-zmxncbva$ is in $lkjdshfa$. Let $qowpeitr$ be the number of elements in the\nintersection $lkjdshfa \\cap \\{2zmxncbva: zmxncbva \\in lkjdshfa\\}$. Prove that $qowpeitr$ is even.",
      "solution": "Solution 1. For \\( zmxncbva \\in lkjdshfa \\), there is a unique way to write \\( 2 zmxncbva=plmoknij jweoritx \\) where \\( plmoknij= \\pm 1 \\) and \\( jweoritx \\in lkjdshfa \\). Then \\( lkjdshfa \\cap 2 lkjdshfa=\\left\\{zmxncbva \\in lkjdshfa: plmoknij=1\\right\\} \\), so \\( \\prod_{zmxncbva \\in lkjdshfa} plmoknij=(-1)^{\\# lkjdshfa-qowpeitr}=(-1)^{qowpeitr} \\), since \\( \\# lkjdshfa=(zxcvbnml-1) \\cdot(zxcvbnml+1) / 2 \\) is even. In \\( asdfghjk \\), we have\n\\[\n2^{\\left(zxcvbnml^{2}-1\\right) / 2} \\prod_{zmxncbva \\in lkjdshfa} zmxncbva=\\prod_{zmxncbva \\in lkjdshfa} plmoknij jweoritx=(-1)^{qowpeitr} \\prod_{zmxncbva \\in lkjdshfa} zmxncbva\n\\]\nso \\( (-1)^{qowpeitr}=2^{\\left(zxcvbnml^{2}-1\\right) / 2}=\\left(2^{zxcvbnml-1}\\right)^{(zxcvbnml+1) / 2}=1^{(zxcvbnml+1) / 2}=1 \\), by Fermat's Little Theorem [Lar1, p. 148]. Hence \\( qowpeitr \\) is even.\n\nRemark. Gauss based one of his proofs of quadratic reciprocity on the following lemma \\( { }^{\\dagger} \\) [NZM, Theorem 3.2], whose proof uses the same method as Solution 1:\n\nLemma. Let \\( zxcvbnml \\) be an odd prime, and suppose that \\( zmxncbva \\) is an integer prime to \\( zxcvbnml \\). Consider the least positive residues modulo \\( zxcvbnml \\) of \\( zmxncbva, 2 zmxncbva, 3 zmxncbva, \\ldots,((zxcvbnml-1) / 2) zmxncbva \\). If \\( mnbvcxza \\) is the number of these that exceed \\( zxcvbnml / 2 \\), then the Legendre symbol \\( \\left(\\frac{zmxncbva}{zxcvbnml}\\right) \\) equals \\( (-1)^{mnbvcxza} \\).\n\nThe case \\( zmxncbva=2 \\), which is especially close to Solution 1 , easily implies the formula \\( \\left(\\frac{2}{zxcvbnml}\\right)=(-1)^{\\left(zxcvbnml^{2}-1\\right) / 8} \\), see [NZM, Theorem 3.3].\n\nSolution 2. Let \\( \\{1, pasdfghj\\} \\) be a basis for \\( asdfghjk \\) over the field \\( \\mathbb{F}_{zxcvbnml} \\) of \\( zxcvbnml \\) elements. Let \\( vbnasdjf=\\{1,2, \\ldots,(zxcvbnml-1) / 2\\} \\subset \\mathbb{F}_{zxcvbnml} \\), and let\n\\[\nkjhgfdsq=\\left\\{zmxncbva+qweasdzx pasdfghj: zmxncbva \\in vbnasdjf, qweasdzx \\in \\mathbb{F}_{zxcvbnml} \\text { or } zmxncbva=0, qweasdzx \\in vbnasdjf\\right\\}\n\\]\n\nFor each nonzero \\( zmxncbva \\in asdfghjk \\), exactly one of \\( zmxncbva \\) and \\( -zmxncbva \\) is in \\( kjhgfdsq \\). Also,\n\\[\nkjhgfdsq \\cap 2 kjhgfdsq=\\left\\{zmxncbva+qweasdzx pasdfghj: zmxncbva \\in rtyuiope, qweasdzx \\in \\mathbb{F}_{zxcvbnml} \\text { or } zmxncbva=0, qweasdzx \\in rtyuiope\\right\\}\n\\]\nwhere \\( rtyuiope=vbnasdjf \\cap 2 vbnasdjf \\), so \\( \\#\\left(kjhgfdsq \\cap 2 kjhgfdsq\\right)=(\\# rtyuiope) zxcvbnml+(\\# rtyuiope) \\), which is divisible by \\( zxcvbnml+1 \\), hence even.\n\nEvery other possible \\( lkjdshfa \\) can obtained by repeatedly replacing some \\( qazwsxed \\in lkjdshfa \\) by \\( -qazwsxed \\), so it suffices to show that the parity of \\( qowpeitr=\\#(lkjdshfa \\cap 2 lkjdshfa) \\) is unchanged by such an operation on \\( lkjdshfa \\). Suppose \\( lkjdshfa \\) is as in the problem, and \\( lkjdshfa^{\\prime} \\) is the same as \\( lkjdshfa \\) except with \\( qazwsxed \\) replaced by \\( -qazwsxed \\). Define \\( qowpeitr^{\\prime} \\) analogously. We will show that \\( qowpeitr^{\\prime}-qowpeitr \\) is even.\n\nNote that  \n(i) If \\( wsxrfvgt \\in lkjdshfa \\cap 2 lkjdshfa \\), then \\( wsxrfvgt \\in lkjdshfa^{\\prime} \\cap 2 lkjdshfa^{\\prime} \\) unless \\( wsxrfvgt=qazwsxed \\) or \\( 2 qazwsxed \\).  \n(ii) If \\( wsxrfvgt \\in lkjdshfa^{\\prime} \\cap 2 lkjdshfa^{\\prime} \\), then \\( wsxrfvgt \\in lkjdshfa \\cap 2 lkjdshfa \\) unless \\( wsxrfvgt=-qazwsxed \\) or \\( -2 qazwsxed \\).\n\nIn other words, \\( qowpeitr^{\\prime} \\) can be computed from \\( qowpeitr \\) by subtracting 1 for each of \\( qazwsxed \\) and \\( 2 qazwsxed \\) that belongs to \\( lkjdshfa \\cap 2 lkjdshfa \\), and adding 1 for each of \\( -qazwsxed \\) and \\( -2 qazwsxed \\) that belongs to \\( lkjdshfa \\cap 2 lkjdshfa \\). These adjustments are determined according to the four cases in the table below.\n\\begin{tabular}{|l||c|c||c|c||c|}\n\\hline \\multicolumn{1}{|l|}{ Case } & \\multicolumn{4}{c|}{ In \\( lkjdshfa \\cap 2 lkjdshfa ? \\)} & \\( qowpeitr^{\\prime}-qowpeitr \\) \\\\\n& \\( qazwsxed \\) & \\( 2 qazwsxed \\) & \\( -qazwsxed \\) & \\( -2 qazwsxed \\) & \\\\\n\\hline\\( (1) qazwsxed / 2 \\in lkjdshfa, 2 qazwsxed \\in lkjdshfa \\) & yes & yes & no & no & -2 \\\\\n\\( (2) qazwsxed / 2 \\in lkjdshfa,-2 qazwsxed \\in lkjdshfa \\) & yes & no & no & yes & 0 \\\\\n\\( (3)-qazwsxed / 2 \\in lkjdshfa, 2 qazwsxed \\in lkjdshfa \\) & no & yes & yes & no & 0 \\\\\n\\( (4)-qazwsxed / 2 \\in lkjdshfa,-2 qazwsxed \\in lkjdshfa \\) & no & no & yes & yes & 2 \\\\\n\\hline\n\\end{tabular}\n\nIn each row of the table, \\( qowpeitr^{\\prime}-qowpeitr \\) equals the number of times \"yes\" appears under the \\( -qazwsxed \\) and \\( -2 qazwsxed \\) headers minus the number of times \"yes\" appears under the \\( qazwsxed \\) and \\( 2 qazwsxed \\) headers. Hence \\( qowpeitr^{\\prime}-qowpeitr \\) is even in each case, as desired.\n\nRelated question. The following problem, proposed by Iceland for the 1985 International Mathematical Olympiad, is susceptible to the approach of the second solution.\n\nSuppose \\( pasdfghj_{1}, \\ldots, pasdfghj_{mnbvcxza} \\in\\{-1,1\\} \\), and\n\\[\n\\begin{array}{l}\npasdfghj_{1} pasdfghj_{2} pasdfghj_{3} pasdfghj_{4}+pasdfghj_{2} pasdfghj_{3} pasdfghj_{4} pasdfghj_{5}+\\cdots+pasdfghj_{mnbvcxza-3} pasdfghj_{mnbvcxza-2} pasdfghj_{mnbvcxza-1} pasdfghj_{mnbvcxza} \\\\\n\\quad+pasdfghj_{mnbvcxza-2} pasdfghj_{mnbvcxza-1} pasdfghj_{mnbvcxza} pasdfghj_{1}+pasdfghj_{mnbvcxza-1} pasdfghj_{mnbvcxza} pasdfghj_{1} pasdfghj_{2}+pasdfghj_{mnbvcxza} pasdfghj_{1} pasdfghj_{2} pasdfghj_{3}=0 .\n\\end{array}\n\\]\n\nShow that \\( mnbvcxza \\) is divisible by 4 ."
    },
    "kernel_variant": {
      "question": "Let q be an odd prime different from 3 and put F := 𝔽_{q^{2}}.  Because q ≠ 3 the element 3 belongs to 𝔽_q^{×} ⊂ F^{×}, so multiplication by 3 is an automorphism of F^{×}.  \n\nCall a subset S ⊂ F^{×} sign-representative if |S| = (q^{2} − 1)/2 and for every non–zero a ∈ F exactly one of a and –a lies in S.  Define\n\n    N := |S ∩ 3S| = |{ a ∈ S : 3a ∈ S }|.\n\nProve that the integer N is even.",
      "solution": "Fix an odd prime q ≠ 3 and set F = 𝔽_{q^{2}}.  Let S ⊂ F^{×} be a sign-representative of size |S| = (q^{2} − 1)/2, and write\n\n    N = |S ∩ 3S|.\n\nWe show N is even.\n\nStep 1.   For each a ∈ S choose ε_a ∈ {±1} and s_a ∈ S satisfying\n            3a = ε_a · s_a,\nthat is, take s_a = 3a if 3a ∈ S and s_a = –3a otherwise, and set ε_a accordingly.  Then a lies in S ∩ 3S exactly when ε_a = +1, so among the |S| signs ε_a there are N plus-ones and |S| − N minus-ones.  Consequently\n            ∏_{a∈S} ε_a = (–1)^{|S| − N}.\nBecause q is odd, (q − 1)(q + 1) is divisible by 4, hence |S| = (q^{2} − 1)/2 is even; therefore |S| − N ≡ N (mod 2) and\n            ∏_{a∈S} ε_a = (–1)^{N}.      (★)\n\nStep 2.   Multiply the relations 3a = ε_a s_a over all a ∈ S:\n        ∏_{a∈S} (3a) = 3^{|S|} · ∏_{a∈S} a\n        ∏_{a∈S} (ε_a s_a) = (∏_{a∈S} ε_a)(∏_{a∈S} s_a) = (–1)^{N} · ∏_{a∈S} s_a.\nThe map a ↦ s_a permutes S, so ∏_{a∈S} s_a = ∏_{a∈S} a.  Cancelling this non-zero element of F^{×} gives\n            (–1)^{N} = 3^{|S|}.       (1)\n\nStep 3.   Since 3 ∈ 𝔽_q^{×} and |S| = (q − 1)(q + 1)/2, Fermat’s little theorem yields\n        3^{|S|} = (3^{q−1})^{(q+1)/2} = 1^{(q+1)/2} = 1.\nSubstituting into (1) gives (–1)^{N} = 1, so N is even, as claimed. ∎",
      "_meta": {
        "core_steps": [
          "For each a∈S write ka = ε_a·s_a with ε_a=±1 and s_a∈S (k=2 in the original).",
          "Because S∩kS = {a∈S : ε_a=1}, the product ∏_{a∈S} ε_a equals (−1)^{|S|−N} = (−1)^N (|S| is even).",
          "Compute the same product another way: k^{|S|}·∏_{a∈S} a = ∏_{a∈S} ε_a s_a = (−1)^N·∏_{a∈S} a, hence (−1)^N = k^{|S|}.",
          "Evaluate k^{|S|} in the prime subfield: since k∈F_p, k^{p−1}=1 and |S|=(p−1)(p+1)/2 is a multiple of p−1, so k^{|S|}=1.",
          "Therefore (−1)^N=1 and N is even."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Choice of the non-zero scalar that multiplies S (originally the ‘2’ in 2a). Any element k of the prime subfield F_p gives k^{p−1}=1, so the argument is unchanged.",
            "original": "2"
          },
          "slot2": {
            "description": "Size of the ground field. One may replace the field F_{p^2} by F_{q^2} with q any odd prime; the same pairing {a,−a} and the identity k^{q−1}=1 in the subfield F_q make all steps identical.",
            "original": "p^2  (with p an odd prime)"
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}