{
  "index": "2019-B-6",
  "type": "COMB",
  "tag": [
    "COMB"
  ],
  "difficulty": "",
  "question": "Let $\\mathbb{Z}^n$ be the integer lattice in $\\mathbb{R}^n$. Two points in $\\mathbb{Z}^n$ are called \n\\emph{neighbors} if they differ by exactly $1$ in one coordinate and are equal in all other coordinates. \nFor which integers $n \\geq 1$ does there exist a set of points $S \\subset \\mathbb{Z}^n$ satisfying the following two conditions?\n\\begin{enumerate}\n\\item[(1)] If $p$ is in $S$, then none of the neighbors of $p$ is in $S$.\n\\item[(2)] If $p \\in \\mathbb{Z}^n$ is not in $S$, then exactly one of the neighbors of $p$ is in $S$.\n\\end{enumerate}\n\\end{itemize}\n\n\\end{document}",
  "solution": "Such a set exists for every $n$. To construct an example, define the function $f: \\mathbb{Z}^n \\to \\mathbb{Z}/(2n+1) \\mathbb{Z}$ by\n\\[\nf(x_1,\\dots,x_n) = x_1 + 2x_2 + \\cdots + nx_n \\pmod{2n+1},\n\\]\nthen let $S$ be the preimage of 0.\n\nTo check condition (1), note that if $p \\in S$ and $q$ is a neighbor of $p$ differing only in coordinate $i$, then\n\\[\nf(q) = f(p) \\pm i \\equiv \\pm i \\pmod{2n+1}\n\\]\nand so $q \\notin S$.\n\nTo check condition (2), note that if $p \\in \\mathbb{Z}^n$ is not in $S$, then there exists a unique choice of $i \\in \\{1,\\dots,n\\}$ such that $f(p)$ is congruent to one of $+i$ or $-i$ modulo $2n+1$. The unique neighbor $q$ of $p$ in $S$ is then obtained by either subtracting $1$ from, or adding $1$ to, the $i$-th coordinate of $p$.\n\n\\noindent\n\\textbf{Remark.}\nAccording to Art of Problem Solving (thread c6h366290), this problem was a 1985 IMO submission from Czechoslovakia. For an application to steganography, see:\nJ. Fridrich and P. Lison\\v{e}k, Grid colorings in steganography,\n\\textit{IEEE Transactions on Information Theory} \\textbf{53} (2007), 1547--1549.\n\n\\end{itemize}\n\\end{document}",
  "vars": [
    "p",
    "q",
    "x_1",
    "x_2",
    "x_n",
    "x_i",
    "i"
  ],
  "params": [
    "n",
    "S",
    "f"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "p": "pointone",
        "q": "pointtwo",
        "x_1": "coordone",
        "x_2": "coordtwo",
        "x_n": "coordn",
        "x_i": "coordi",
        "i": "indexer",
        "n": "dimension",
        "S": "pointset",
        "f": "mapping"
      },
      "question": "Let $\\mathbb{Z}^{dimension}$ be the integer lattice in $\\mathbb{R}^{dimension}$. Two points in $\\mathbb{Z}^{dimension}$ are called \\emph{neighbors} if they differ by exactly $1$ in one coordinate and are equal in all other coordinates. For which integers $dimension \\geq 1$ does there exist a set of points $pointset \\subset \\mathbb{Z}^{dimension}$ satisfying the following two conditions?\n\\begin{enumerate}\n\\item[(1)] If $pointone$ is in $pointset$, then none of the neighbors of $pointone$ is in $pointset$.\n\\item[(2)] If $pointone \\in \\mathbb{Z}^{dimension}$ is not in $pointset$, then exactly one of the neighbors of $pointone$ is in $pointset$.\n\\end{enumerate}\n\\end{itemize}\n\n\\end{document}",
      "solution": "Such a set exists for every $dimension$. To construct an example, define the function $mapping: \\mathbb{Z}^{dimension} \\to \\mathbb{Z}/(2 dimension +1) \\mathbb{Z}$ by\n\\[\nmapping(coordone,\\dots,coordn) = coordone + 2coordtwo + \\cdots + dimension\\,coordn \\pmod{2 dimension + 1},\n\\]\nthen let $pointset$ be the preimage of 0.\n\nTo check condition (1), note that if $pointone \\in pointset$ and $pointtwo$ is a neighbor of $pointone$ differing only in coordinate $indexer$, then\n\\[\nmapping(pointtwo) = mapping(pointone) \\pm indexer \\equiv \\pm indexer \\pmod{2 dimension + 1}\n\\]\nand so $pointtwo \\notin pointset$.\n\nTo check condition (2), note that if $pointone \\in \\mathbb{Z}^{dimension}$ is not in $pointset$, then there exists a unique choice of $indexer \\in \\{1,\\dots,dimension\\}$ such that $mapping(pointone)$ is congruent to one of $+indexer$ or $-indexer$ modulo $2 dimension + 1$. The unique neighbor $pointtwo$ of $pointone$ in $pointset$ is then obtained by either subtracting $1$ from, or adding $1$ to, the $indexer$-th coordinate of $pointone$.\n\n\\noindent\n\\textbf{Remark.}\nAccording to Art of Problem Solving (thread c6h366290), this problem was a 1985 IMO submission from Czechoslovakia. For an application to steganography, see:\nJ. Fridrich and P. Lison\\v{e}k, Grid colorings in steganography,\n\\textit{IEEE Transactions on Information Theory} \\textbf{53} (2007), 1547--1549.\n\n\\end{itemize}\n\\end{document}"
    },
    "descriptive_long_confusing": {
      "map": {
        "p": "pineapple",
        "q": "saxophone",
        "x_1": "waterfall",
        "x_2": "candlestick",
        "x_n": "journeying",
        "x_i": "honeycomb",
        "i": "marigolds",
        "n": "dragonfly",
        "S": "constable",
        "f": "windshield"
      },
      "question": "Let $\\mathbb{Z}^{dragonfly}$ be the integer lattice in $\\mathbb{R}^{dragonfly}$. Two points in $\\mathbb{Z}^{dragonfly}$ are called \\emph{neighbors} if they differ by exactly $1$ in one coordinate and are equal in all other coordinates. For which integers $dragonfly \\geq 1$ does there exist a set of points $constable \\subset \\mathbb{Z}^{dragonfly}$ satisfying the following two conditions?\n\\begin{enumerate}\n\\item[(1)] If $pineapple$ is in $constable$, then none of the neighbors of $pineapple$ is in $constable$.\n\\item[(2)] If $pineapple \\in \\mathbb{Z}^{dragonfly}$ is not in $constable$, then exactly one of the neighbors of $pineapple$ is in $constable$.\n\\end{enumerate}\n\\end{itemize}\n\n\\end{document}",
      "solution": "Such a set exists for every $dragonfly$. To construct an example, define the function $windshield: \\mathbb{Z}^{dragonfly} \\to \\mathbb{Z}/(2\\dragonfly+1) \\mathbb{Z}$ by\n\\[\nwindshield(waterfall,\\dots,journeying) = waterfall + 2candlestick + \\cdots + \\dragonfly journeying \\pmod{2\\dragonfly+1},\n\\]\nthen let $constable$ be the preimage of 0.\n\nTo check condition (1), note that if $pineapple \\in constable$ and $saxophone$ is a neighbor of $pineapple$ differing only in coordinate $marigolds$, then\n\\[\nwindshield(saxophone) = windshield(pineapple) \\pm marigolds \\equiv \\pm marigolds \\pmod{2\\dragonfly+1}\n\\]\nand so $saxophone \\notin constable$.\n\nTo check condition (2), note that if $pineapple \\in \\mathbb{Z}^{dragonfly}$ is not in $constable$, then there exists a unique choice of $marigolds \\in \\{1,\\dots,\\dragonfly\\}$ such that $windshield(pineapple)$ is congruent to one of $+marigolds$ or $-marigolds$ modulo $2\\dragonfly+1$. The unique neighbor $saxophone$ of $pineapple$ in $constable$ is then obtained by either subtracting $1$ from, or adding $1$ to, the $marigolds$-th coordinate of $pineapple$.\n\n\\noindent\n\\textbf{Remark.}\nAccording to Art of Problem Solving (thread c6h366290), this problem was a 1985 IMO submission from Czechoslovakia. For an application to steganography, see:\nJ. Fridrich and P. Lison\\v{e}k, Grid colorings in steganography,\n\\textit{IEEE Transactions on Information Theory} \\textbf{53} (2007), 1547--1549.\n\n\\end{itemize}\n\\end{document}"
    },
    "descriptive_long_misleading": {
      "map": {
        "p": "voidpoint",
        "q": "nullpoint",
        "x_1": "lastplace",
        "x_2": "latestsecond",
        "x_n": "constantnth",
        "x_i": "constantith",
        "i": "targetvalue",
        "n": "dimensionless",
        "S": "universalset",
        "f": "constantmap"
      },
      "question": "Let $\\mathbb{Z}^{dimensionless}$ be the integer lattice in $\\mathbb{R}^{dimensionless}$. Two points in $\\mathbb{Z}^{dimensionless}$ are called \n\\emph{neighbors} if they differ by exactly $1$ in one coordinate and are equal in all other coordinates. \nFor which integers $dimensionless \\geq 1$ does there exist a set of points $universalset \\subset \\mathbb{Z}^{dimensionless}$ satisfying the following two conditions?\n\\begin{enumerate}\n\\item[(1)] If $voidpoint$ is in $universalset$, then none of the neighbors of $voidpoint$ is in $universalset$.\n\\item[(2)] If $voidpoint \\in \\mathbb{Z}^{dimensionless}$ is not in $universalset$, then exactly one of the neighbors of $voidpoint$ is in $universalset$.\n\\end{enumerate}\n\\end{itemize}\n\n\\end{document}",
      "solution": "Such a set exists for every $dimensionless$. To construct an example, define the function $constantmap: \\mathbb{Z}^{dimensionless} \\to \\mathbb{Z}/(2dimensionless+1) \\mathbb{Z}$ by\n\\[\nconstantmap(lastplace,\\dots,constantnth) = lastplace + 2\\,latestsecond + \\cdots + dimensionless\\,constantnth \\pmod{2dimensionless+1},\n\\]\nthen let $universalset$ be the preimage of 0.\n\nTo check condition (1), note that if $voidpoint \\in universalset$ and $nullpoint$ is a neighbor of $voidpoint$ differing only in coordinate $targetvalue$, then\n\\[\nconstantmap(nullpoint) = constantmap(voidpoint) \\pm targetvalue \\equiv \\pm targetvalue \\pmod{2dimensionless+1}\n\\]\nand so $nullpoint \\notin universalset$.\n\nTo check condition (2), note that if $voidpoint \\in \\mathbb{Z}^{dimensionless}$ is not in $universalset$, then there exists a unique choice of $targetvalue \\in \\{1,\\dots,dimensionless\\}$ such that $constantmap(voidpoint)$ is congruent to one of $+targetvalue$ or $-targetvalue$ modulo $2dimensionless+1$. The unique neighbor $nullpoint$ of $voidpoint$ in $universalset$ is then obtained by either subtracting $1$ from, or adding $1$ to, the $targetvalue$-th coordinate of $voidpoint$.\n\n\\noindent\n\\textbf{Remark.}\nAccording to Art of Problem Solving (thread c6h366290), this problem was a 1985 IMO submission from Czechoslovakia. For an application to steganography, see:\nJ. Fridrich and P. Lison\\v{e}k, Grid colorings in steganography,\n\\textit{IEEE Transactions on Information Theory} \\textbf{53} (2007), 1547--1549.\n\n\\end{itemize}\n\\end{document}"
    },
    "garbled_string": {
      "map": {
        "p": "zdwqleopa",
        "q": "buftrazik",
        "x_1": "ozmtpvcra",
        "x_2": "levurnito",
        "x_n": "fjrakslom",
        "x_i": "gqueslani",
        "i": "ypbmactez",
        "n": "kvorsulei",
        "S": "pmzatgore",
        "f": "hqkimavod"
      },
      "question": "Let $\\mathbb{Z}^{kvorsulei}$ be the integer lattice in $\\mathbb{R}^{kvorsulei}$. Two points in $\\mathbb{Z}^{kvorsulei}$ are called \\emph{neighbors} if they differ by exactly $1$ in one coordinate and are equal in all other coordinates. For which integers $kvorsulei \\geq 1$ does there exist a set of points $pmzatgore \\subset \\mathbb{Z}^{kvorsulei}$ satisfying the following two conditions?\n\\begin{enumerate}\n\\item[(1)] If $zdwqleopa$ is in $pmzatgore$, then none of the neighbors of $zdwqleopa$ is in $pmzatgore$.\n\\item[(2)] If $zdwqleopa \\in \\mathbb{Z}^{kvorsulei}$ is not in $pmzatgore$, then exactly one of the neighbors of $zdwqleopa$ is in $pmzatgore$.\n\\end{enumerate}",
      "solution": "Such a set exists for every $kvorsulei$. To construct an example, define the function $hqkimavod: \\mathbb{Z}^{kvorsulei} \\to \\mathbb{Z}/(2kvorsulei+1) \\mathbb{Z}$ by\n\\[\n hqkimavod(ozmtpvcra,\\dots,fjrakslom) = ozmtpvcra + 2levurnito + \\cdots + kvorsulei fjrakslom \\pmod{2kvorsulei+1},\n\\]\nthen let $pmzatgore$ be the preimage of 0.\n\nTo check condition (1), note that if $zdwqleopa \\in pmzatgore$ and $buftrazik$ is a neighbor of $zdwqleopa$ differing only in coordinate $ypbmactez$, then\n\\[\n hqkimavod(buftrazik) = hqkimavod(zdwqleopa) \\pm ypbmactez \\equiv \\pm ypbmactez \\pmod{2kvorsulei+1}\n\\]\nand so $buftrazik \\notin pmzatgore$.\n\nTo check condition (2), note that if $zdwqleopa \\in \\mathbb{Z}^{kvorsulei}$ is not in $pmzatgore$, then there exists a unique choice of $ypbmactez \\in \\{1,\\dots,kvorsulei\\}$ such that $hqkimavod(zdwqleopa)$ is congruent to one of $+ypbmactez$ or $-ypbmactez$ modulo $2kvorsulei+1$. The unique neighbor $buftrazik$ of $zdwqleopa$ in $pmzatgore$ is then obtained by either subtracting $1$ from, or adding $1$ to, the $ypbmactez$-th coordinate of $zdwqleopa$.\n\n\\noindent\n\\textbf{Remark.}\nAccording to Art of Problem Solving (thread c6h366290), this problem was a 1985 IMO submission from Czechoslovakia. For an application to steganography, see:\nJ. Fridrich and P. Lison\\v{e}k, Grid colorings in steganography,\n\\textit{IEEE Transactions on Information Theory} \\textbf{53} (2007), 1547--1549."
    },
    "kernel_variant": {
      "question": "Let $n\\ge 1$.  Equip the integer lattice $\\mathbb Z^{n}$ with the graph $\\Gamma_{n}$ in which two vertices are \\textbf{adjacent} when they differ by $\\pm 1$ in \\emph{exactly one} coordinate and are equal in all other coordinates.  \n\nA subset $C\\subset \\mathbb Z^{n}$ is called a (lattice-)\\textbf{$1$-perfect code} in $\\Gamma_{n}$ if  \n\n(i) (independence) no two vertices of $C$ are adjacent;  \n\n(ii) (perfect domination) every vertex of $\\mathbb Z^{n}\\setminus C$ is adjacent to \\emph{exactly one} vertex of $C$.\n\nThe code is \\textbf{lattice–periodic} if $C$ is an affine lattice, i.e.\\ $C=v+L$ for some full-rank sublattice $L\\le \\mathbb Z^{n}$ and some $v\\in\\mathbb Z^{n}$.  \nFix a lattice–periodic $1$-perfect code $C=v+L$ and form the finite abelian quotient group  \n\n\\[\nG:=\\mathbb Z^{n}/L ,\\qquad \\bar 0\\in G \\text{ the identity}.\n\\]\n\nWhenever convenient, vectors of $\\mathbb Z^{n}$ are identified with their residue classes in $G$.\n\nA.\\;(\\emph{Parameter set attached to a code})  \nShow that $\\lvert G\\rvert = 2n+1$ and that the $2n$ residue classes  \n\n\\[\n\\Sigma := \\{\\,\\pm\\bar e_{1},\\dots ,\\pm\\bar e_{n}\\}\\subset G\\setminus\\{\\bar 0\\}\n\\]\n\nexhaust $G\\setminus\\{\\bar 0\\}$.  In particular the $2n$ vectors $\\pm e_{i}$ are pairwise incongruent modulo $L$.\n\nB.\\;(\\emph{Constructing codes from a parameter set})  \nConversely, let $G$ be an abelian group of \\emph{odd} order $2n+1$ and pick elements  \n\n\\[\na_{1},\\dots ,a_{n}\\in G\n\\]\n\nsuch that the multiset $\\{\\pm a_{1},\\dots ,\\pm a_{n}\\}$ equals $G\\setminus\\{\\bar 0\\}$.  Define the homomorphism and the kernel  \n\n\\[\n\\Phi:\\mathbb Z^{n}\\longrightarrow G,\\qquad\\Phi(x_{1},\\dots ,x_{n})=x_{1}a_{1}+\\dots +x_{n}a_{n},\\qquad\nL:=\\ker\\Phi .\n\\]\n\nProve that  \n\n(1) $L$ has index $\\lvert\\mathbb Z^{n}:L\\rvert = 2n+1$;  \n\n(2) every coset $v+L$ ($v\\in\\mathbb Z^{n}$) is a lattice–periodic $1$-perfect code in $\\Gamma_{n}$.\n\nC.\\;(\\emph{Classification up to signed permutations})  \nProve that every lattice–periodic $1$-perfect code in $\\mathbb Z^{n}$ arises from the construction in B.  \n\nFurthermore, let $(G,a_{1},\\dots ,a_{n})$ and $(G',a_{1}',\\dots ,a_{n}')$ be two data sets as in B, producing lattices $L,L'\\le\\mathbb Z^{n}$.  Show that  \n\n\\[\nL'=P(L)\\quad\\Longleftrightarrow\\quad \n\\exists\\;\\text{an isomorphism }\\psi:G\\;\\cong\\;G' \n\\text{ and a signed permutation matrix }P\\in \\mathrm{GL}_{n}(\\mathbb Z)\n\\text{ with }\\psi(a_{i})=\\pm a'_{\\sigma(i)}\\;\\forall i,\n\\]\n\nwhere $\\sigma$ is the permutation encoded by $P$.  (A \\emph{signed permutation matrix} is obtained from a permutation matrix by changing signs of arbitrary rows.)\n\nConsequently, the set of lattices supporting $1$-perfect codes in $\\mathbb Z^{n}$, taken modulo the natural action of the signed permutation group, is in bijection with the “signed $1$-factorisations’’ of the complete graph $K_{2n+1}$ (viewed as a Cayley graph of any abelian group of order $2n+1$).",
      "solution": "Throughout $e_{1},\\dots ,e_{n}$ denotes the standard basis of $\\mathbb Z^{n}$, and for an abelian group $G$ we write $\\bar 0$ for its identity element.\n\n\n\n\\textbf{Part A.}\n\nAfter translating by $-v$ we may suppose $0\\in C$, hence $C=L$.\n\n\\emph{A1 – Size of $G$.}  \nFor $c\\in L$ put  \n\n\\[\nB_{1}(c):=\\{c\\}\\cup\\{c\\pm e_{1},\\dots ,c\\pm e_{n}\\},\\qquad \nB_{1}:=B_{1}(0).\n\\]\n\nIndependence and perfect domination together imply that the family  \n$\\{B_{1}(c)\\}_{c\\in L}$ is a \\emph{partition} of $\\mathbb Z^{n}$:\n\n• independence guarantees that distinct codewords are not adjacent, hence the balls are pairwise disjoint in their centres;  \n\n• perfect domination guarantees that every vertex lies in some ball.\n\nConsider the map  \n\n\\[\n\\iota:B_{1}\\longrightarrow G,\\qquad x\\longmapsto\\bar x .\n\\]\n\n\\emph{Injectivity of $\\iota$.}  \nAssume $x,y\\in B_{1}$ and $\\bar x=\\bar y$, so $d:=x-y\\in L$.  \nBecause $x,y\\in B_{1}$, every coordinate of $d$ lies in $\\{-2,-1,0,1,2\\}$.\n\n(i)\\;Suppose $\\lVert d\\rVert_{\\infty}=1$.  \nIf $d$ has exactly one non-zero coordinate, then $d=\\pm e_{k}$, so $0$ and $d$ are adjacent vertices \\emph{both} in $L$, contradicting independence.  \nIf $d$ has at least two non-zero coordinates (all equal to $\\pm1$), pick one such coordinate $k$ and set $z:=\\operatorname{sgn}(d_{k})\\,e_{k}$.  \nThen $z$ is adjacent to $0$ (because it differs from $0$ by $\\pm e_{k}$) and also to $d$ (because $d-z$ differs from $d$ by $\\pm e_{k}$).  \nThus $z\\notin L$ would have \\emph{two} distinct neighbours in $L$, violating perfect domination.  \nHence $\\lVert d\\rVert_{\\infty}\\neq 1$.\n\n(ii)\\;Suppose $\\lVert d\\rVert_{\\infty}=2$.  \nChoose an index $k$ with $d_{k}=\\pm 2$ and put $z:=\\operatorname{sgn}(d_{k})\\,e_{k}$.  \nExactly as above, $z$ would have two neighbours in $L$, contradicting perfect domination.  \nTherefore $\\lVert d\\rVert_{\\infty}\\neq 2$.\n\nSince all coordinates of $d$ lie in $\\{-2,-1,0,1,2\\}$, the only remaining possibility is $d=0$, proving that $\\iota$ is injective.\n\n\\emph{Surjectivity of $\\iota$.}  \nGiven $g\\in G$, choose a lift $x\\in\\mathbb Z^{n}$.  \nFind the unique $c\\in L$ with $x\\in B_{1}(c)$; write $x=c+u$ with $u\\in B_{1}$.  \nThen $g=\\bar x=\\bar u=\\iota(u)$, so $\\iota$ is surjective.\n\nConsequently  \n\n\\[\n\\lvert G\\rvert=\\lvert B_{1}\\rvert=1+2n=2n+1.\n\\]\n\n\\emph{A2 – Non-triviality of the classes $\\pm\\bar e_{i}$.}  \nIf $\\bar e_{i}=\\bar 0$ then $e_{i}\\in L=C$, contradicting independence (since $e_{i}$ is adjacent to $0$).  \nThe same argument shows $-\\bar e_{i}\\neq\\bar 0$.\n\n\\emph{A3 – Exhaustion and distinctness.}  \nTake $g\\in G\\setminus\\{\\bar 0\\}$ and lift it to $x\\in\\mathbb Z^{n}$.  \nAs $x\\notin L$, perfect domination supplies a unique index $j$ and sign $\\varepsilon\\in\\{\\pm 1\\}$ for which $x-\\varepsilon e_{j}\\in L$.  Consequently  \n\n\\[\ng=\\bar x=\\varepsilon\\bar e_{j}\\in\\Sigma .\n\\]\n\nTherefore $G\\setminus\\{\\bar 0\\}\\subseteq\\Sigma$, and since both sets have size $2n$, equality holds.  \nAll elements of $\\Sigma$ are pairwise distinct; hence the $2n$ vectors $\\pm e_{i}$ are incongruent modulo $L$.\n\\hfill$\\square$\n\n\n\n\\textbf{Part B.  Construction from a parameter set}\n\nThe hypothesis implies that the $2n$ elements $\\pm a_{i}$ are pairwise distinct.\n\n\\emph{B1 – Index of $L$.}  \nEach non-zero element of $G$ is some $\\pm a_{j}$ and, by definition, $\\pm a_{j}=\\Phi(\\pm e_{j})$.  \nThus $\\Phi$ is surjective and  \n\n\\[\n\\lvert\\mathbb Z^{n}:L\\rvert=\\lvert G\\rvert=2n+1 .\n\\]\n\n\\emph{B2 – Independence of $L$.}  \nLet $y\\in L$ and let $z$ be the vertex obtained by changing the $i$-th coordinate of $y$ by $\\pm 1$.  \nThen  \n\n\\[\n\\Phi(z)=\\Phi(y)\\pm a_{i}=0\\pm a_{i}=\\pm a_{i}\\neq\\bar 0 ,\n\\]\n\nso $z\\notin L$.  Hence no two vertices of $L$ are adjacent.\n\n\\emph{B3 – Perfect domination of every coset.}  \nFix $x\\notin L$ and put $g:=\\Phi(x)\\neq\\bar 0$.  \nWrite $g=\\varepsilon a_{i}$ (unique by pairwise distinctness).  Define  \n\n\\[\nx^{-}:=x-\\varepsilon e_{i},\\qquad x^{+}:=x+\\varepsilon e_{i}.\n\\]\n\nFirst,  \n\n\\[\n\\Phi(x^{-})=g-\\varepsilon a_{i}=0\\quad\\Longrightarrow\\quad x^{-}\\in L,\n\\]\n\nso $x$ has at least one neighbour in $L$.\n\n\\emph{Uniqueness of that neighbour.}  \nThere are $2n-1$ other neighbours of $x$:\n\n(a) the vertex $x^{+}$ obtained by moving in the \\emph{same} coordinate $i$ but the opposite direction;  \n\n(b) the $2(n-1)$ vertices obtained by moving in some other coordinate $j\\neq i$.\n\n\\underline{Case (a):}  \n\\[\n\\Phi(x^{+})=g+\\varepsilon a_{i}=2\\varepsilon a_{i}\\neq\\bar 0\n\\]\nbecause the order of $a_{i}$ divides $2n+1$ (an odd integer), hence $2$ is invertible in $G$ and $2\\varepsilon a_{i}\\neq\\bar 0$.  Therefore $x^{+}\\notin L$.\n\n\\underline{Case (b):}  \nFor a neighbour $y$ obtained by modifying coordinate $j\\neq i$ we have  \n\\[\n\\Phi(y)=g\\pm a_{j}=\\varepsilon a_{i}\\pm a_{j}\\neq\\bar 0,\n\\]\nthe last inequality using again the pairwise distinctness of the $2n$ elements $\\pm a_{k}$. So such $y\\notin L$.\n\nHence $x^{-}$ is the \\emph{unique} neighbour of $x$ lying in $L$. Translating by any $v\\in\\mathbb Z^{n}$ shows that each coset $v+L$ is a lattice-periodic $1$-perfect code.\n\\hfill$\\square$\n\n\n\n\\textbf{Part C.  Classification up to signed permutations}\n\n\\emph{C1 – Every lattice-periodic code comes from B.}  \nFor a given code, Part A yields $G\\setminus\\{\\bar 0\\}=\\{\\pm\\bar e_{1},\\dots ,\\pm\\bar e_{n}\\}$.  \nTaking $a_{i}:=\\bar e_{i}$ and $\\Phi$ as in Part B we have $\\ker\\Phi=L$, so the code arises from the construction.\n\n\\emph{C2 – Necessity of the stated condition.}  \nAssume $L'=P(L)$ for a signed permutation matrix $P\\in\\mathrm{GL}_{n}(\\mathbb Z)$.  \nLet  \n\n\\[\n\\pi:\\mathbb Z^{n}\\twoheadrightarrow G:=\\mathbb Z^{n}/L,\\qquad\n\\pi':\\mathbb Z^{n}\\twoheadrightarrow G':=\\mathbb Z^{n}/L'\n\\]\n\nbe the quotient maps corresponding to the two lattices.  \nBecause $P$ bijects $L$ onto $L'$,  \n\n\\[\n\\psi:G\\longrightarrow G',\\qquad\\psi(\\bar x):=\\overline{P(x)}\n\\]\n\nis a well-defined group isomorphism.  For a basis vector $e_{i}$,\n\n\\[\n\\psi(a_{i})=\\psi\\bigl(\\Phi(e_{i})\\bigr)=\\overline{P(e_{i})}= \\pm \\overline{e_{\\sigma(i)}}=\\pm\\Phi'(e_{\\sigma(i)})=\\pm a_{\\sigma(i)}',\n\\]\n\nwhere $\\sigma$ and the signs are encoded by $P$.  This establishes the implication $L'=P(L)\\Longrightarrow(\\psi,P)$.\n\n\\emph{C3 – Sufficiency.}  \nConversely, suppose an isomorphism $\\psi:G\\cong G'$ and a signed permutation matrix $P$ satisfy $\\psi(a_{i})=\\pm a'_{\\sigma(i)}$ for every $i$.  \nLet $\\Phi,\\Phi'$ be the homomorphisms defined from the two data sets.  For each $e_{i}$,\n\n\\[\n(\\psi\\circ\\Phi)(e_{i})=\\psi(a_{i})=\\pm a_{\\sigma(i)}'=\\Phi'(P(e_{i})),\n\\]\n\nso $\\psi\\circ\\Phi=\\Phi'\\circ P$ on $\\mathbb Z^{n}$.  Taking kernels gives $L=P^{-1}(L')$, whence $L'=P(L)$.\n\n\\emph{C4 – Combinatorial interpretation.}  \nPartitioning $G\\setminus\\{\\bar 0\\}$ into the $n$ antipodal pairs $\\{\\pm a_{i}\\}$ is equivalent to choosing a $1$-factorisation of the Cayley graph $\\operatorname{Cay}(G,G\\setminus\\{\\bar 0\\})\\cong K_{2n+1}$.  \nQuotienting by group automorphisms and by signed permutations of the coordinates yields the claimed bijection with “signed $1$-factorisations’’ of $K_{2n+1}$.\n\n\\hfill$\\square$",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.866746",
        "was_fixed": false,
        "difficulty_analysis": "1.  Additional structural hypothesis (lattice periodicity) forces a full classification problem instead of a single construction.  \n2.  The proof demands group-theoretic arguments (finite Abelian quotients, cyclicity, generators) combined with lattice index computations, not present in the original.  \n3.  One must show necessity (order 2n+1, cyclic quotient, relation (*)) and sufficiency—two non-trivial directions requiring careful counting and independence/ domination arguments.  \n4.  Identifying all perfect codes up to the automorphism group involves deeper insight into invariant theory (re-labelling coordinates, sign changes, translations).  \n5.  The solution blends combinatorics on graphs, lattice theory, and finite group theory; each step is subtle and none can be bypassed by the direct modular trick that solves the original problem."
      }
    },
    "original_kernel_variant": {
      "question": "Let $n\\ge 1$.  Equip the integer lattice $\\mathbb Z^{n}$ with the graph $\\Gamma_{n}$ in which two vertices are adjacent when they differ by $\\pm 1$ in exactly one coordinate.  \nA subset $C\\subset \\mathbb Z^{n}$ is called a (lattice-)\\textbf{$1$-perfect code} in $\\Gamma_{n}$ if  \n\n(i) (independence) no two vertices of $C$ are adjacent;  \n\n(ii) (perfect domination) every vertex of $\\mathbb Z^{n}\\setminus C$ is adjacent to \\emph{exactly one} vertex of $C$.\n\nThe code is \\textbf{lattice–periodic} if $C$ is an affine lattice, i.e.\\ $C=v+L$ for some full–rank sublattice $L\\le \\mathbb Z^{n}$ and some $v\\in\\mathbb Z^{n}$.  \nFix a lattice–periodic $1$-perfect code $C=v+L$ and form the finite abelian quotient group  \n\n\\[\nG:=\\mathbb Z^{n}/L ,\\qquad \\bar 0\\in G \\text{ the identity}.\n\\]\n\nWhenever convenient, vectors of $\\mathbb Z^{n}$ are identified with their residue classes in $G$.\n\nA.  (Parameter set attached to a code)  \nShow that $\\lvert G\\rvert = 2n+1$ and that the $2n$ residue classes  \n\n\\[\n\\Sigma := \\{\\,\\pm\\bar e_{1},\\dots ,\\pm\\bar e_{n}\\}\\subset G\\setminus\\{\\bar 0\\}\n\\]\n\nexhaust $G\\setminus\\{\\bar 0\\}$.  In particular the $2n$ vectors $\\pm e_{i}$ are pairwise incongruent modulo $L$.\n\nB.  (Constructing codes from a parameter set)  \nConversely, let $G$ be an abelian group of \\emph{odd} order $2n+1$ and pick elements  \n\n\\[\na_{1},\\dots ,a_{n}\\in G\n\\]\n\nsuch that the multiset $\\{\\pm a_{1},\\dots ,\\pm a_{n}\\}$ equals $G\\setminus\\{\\bar 0\\}$.  Define the homomorphism and the kernel  \n\n\\[\n\\Phi:\\mathbb Z^{n}\\longrightarrow G,\\qquad\\Phi(x_{1},\\dots ,x_{n})=x_{1}a_{1}+\\dots +x_{n}a_{n},\\qquad\nL:=\\ker\\Phi .\n\\]\n\nProve that  \n\n(1) $L$ has index $\\lvert\\mathbb Z^{n}:L\\rvert = 2n+1$;  \n\n(2) every coset $v+L$ ($v\\in\\mathbb Z^{n}$) is a lattice–periodic $1$-perfect code in $\\Gamma_{n}$.\n\nC.  (Classification up to signed permutations)  \nProve that every lattice–periodic $1$-perfect code in $\\mathbb Z^{n}$ arises from the construction in B.  \n\nFurthermore, let $(G,a_{1},\\dots ,a_{n})$ and $(G',a_{1}',\\dots ,a_{n}')$ be two data sets as in B, producing lattices $L,L'\\le\\mathbb Z^{n}$.  Show that  \n\n\\[\nL'=P(L)\\quad\\Longleftrightarrow\\quad \n\\exists\\;\\text{an isomorphism }\\psi:G\\;\\cong\\;G' \n\\text{ and a signed permutation matrix }P\\in \\mathrm{GL}_{n}(\\mathbb Z)\n\\text{ with }\\psi(a_{i})=\\pm a'_{\\sigma(i)}\\;\\forall i,\n\\]\n\nwhere $\\sigma$ is the permutation encoded by $P$.  (A \\emph{signed permutation matrix} is obtained from a permutation matrix by changing signs of arbitrary rows.)\n\nConsequently, the set of lattices supporting $1$-perfect codes in $\\mathbb Z^{n}$, taken modulo the natural action of the signed permutation group, is in bijection with the “signed $1$-factorisations’’ of the complete graph $K_{2n+1}$ (viewed as a Cayley graph of any abelian group of order $2n+1$).",
      "solution": "Throughout $e_{1},\\dots ,e_{n}$ denotes the standard basis of $\\mathbb Z^{n}$, and for an abelian group $G$ we write $\\bar 0$ for its identity element.\n\n\n\nPart A.  \n\nAfter translating by $-v$ we may suppose $0\\in C$, hence $C=L$.\n\nA1 – Size of $G$.  \nFor $c\\in L$ put  \n\n\\[\nB_{1}(c):=\\{c\\}\\cup\\{c\\pm e_{1},\\dots ,c\\pm e_{n}\\},\\qquad \nB_{1}:=B_{1}(0).\n\\]\n\nIndependence and perfect domination together imply that the family  \n$\\{B_{1}(c)\\}_{c\\in L}$ yields a \\emph{partition} of $\\mathbb Z^{n}$:\n\n• independence guarantees that distinct codewords are not adjacent, hence the balls are pairwise disjoint in their centres;  \n\n• perfect domination guarantees that every vertex lies in some ball.\n\nConsider the map  \n\n\\[\n\\iota:B_{1}\\longrightarrow G,\\qquad x\\longmapsto\\bar x .\n\\]\n\nInjectivity of $\\iota$.  \nAssume $x,y\\in B_{1}$ and $\\bar x=\\bar y$, so $d:=x-y\\in L$.  \nIf $d\\neq 0$, then each coordinate of $d$ lies in $\\{-2,-1,0,1,2\\}$ because both $x$ and $y$ are in $B_{1}$.  \nIndependence already rules out $\\lVert d\\rVert_{\\infty}=1$, so suppose $\\lVert d\\rVert_{\\infty}=2$.  \nChoose an index $k$ with $d_{k}=\\pm2$ and set  \n\n\\[\nz:=y+\\operatorname{sgn}(d_{k})\\,e_{k}.\n\\]\n\nThen $z$ is adjacent to \\emph{both} $x$ and $y$, hence $z$ would have two distinct code-neighbours, contradicting perfect domination.  \nTherefore $\\lVert d\\rVert_{\\infty}\\ge 3$.  But this is impossible since $d$ has all coordinates in $\\{-2,-1,0,1,2\\}$.  \nHence $d=0$ and $x=y$; $\\iota$ is injective.\n\nSurjectivity of $\\iota$.  \nGiven $g\\in G$, choose a lift $x\\in\\mathbb Z^{n}$.  \nFind the unique $c\\in L$ with $x\\in B_{1}(c)$; write $x=c+u$ with $u\\in B_{1}$.  \nThen $g=\\bar x=\\bar u=\\iota(u)$, so $\\iota$ is surjective.\n\nConsequently  \n\n\\[\n\\lvert G\\rvert=\\lvert B_{1}\\rvert=1+2n=2n+1.\n\\]\n\nA2 – Non-triviality of the classes $\\pm\\bar e_{i}$.  \nIf $\\bar e_{i}=\\bar 0$ then $e_{i}\\in L=C$, contradicting independence (since $e_{i}$ is adjacent to $0$).  \nThe same argument shows $-\\bar e_{i}\\neq\\bar 0$.\n\nA3 – Exhaustion and distinctness.  \nTake $g\\in G\\setminus\\{\\bar 0\\}$ and lift it to $x\\in\\mathbb Z^{n}$.  \nAs $x\\notin L$, perfect domination supplies a unique index $j$ and sign $\\varepsilon\\in\\{\\pm 1\\}$ for which $x-\\varepsilon e_{j}\\in L$.  Consequently  \n\n\\[\ng=\\bar x=\\varepsilon\\bar e_{j}\\in\\Sigma .\n\\]\n\nTherefore $G\\setminus\\{\\bar 0\\}\\subseteq\\Sigma$, and since both sets have size $2n$, equality holds.  \nAll elements of $\\Sigma$ are pairwise distinct; hence the $2n$ vectors $\\pm e_{i}$ are incongruent modulo $L$.\n\\hfill$\\square$\n\n\n\nPart B.  Construction from a parameter set  \n\nThe hypothesis implies that the $2n$ elements $\\pm a_{i}$ are pairwise distinct.\n\nB1 – Index of $L$.  \nEach non-zero element of $G$ is some $\\pm a_{j}$ and, by definition, $\\pm a_{j}=\\Phi(\\pm e_{j})$.  \nThus $\\Phi$ is surjective and  \n\n\\[\n\\lvert\\mathbb Z^{n}:L\\rvert=\\lvert G\\rvert=2n+1 .\n\\]\n\nB2 – Independence of $L$.  \nLet $y\\in L$ and let $z$ be the vertex obtained by changing the $i$-th coordinate of $y$ by $\\pm1$.  \nThen  \n\n\\[\n\\Phi(z)=\\Phi(y)\\pm a_{i}=0\\pm a_{i}=\\pm a_{i}\\neq\\bar 0 ,\n\\]\n\nso $z\\notin L$.  Hence no two vertices of $L$ are adjacent.\n\nB3 – Perfect domination of every coset.  \nFix $x\\notin L$ and put $g:=\\Phi(x)\\neq\\bar 0$.  \nWrite $g=\\varepsilon a_{i}$ (unique by pairwise distinctness).  Define $x':=x-\\varepsilon e_{i}$.  Then  \n\n\\[\n\\Phi(x')=g-\\varepsilon a_{i}=0,\n\\qquad\\text{so }x'\\in L,\n\\]\n\nshowing $x$ has at least one neighbour in $L$.\n\nIf $y$ is another neighbour of $x$, obtained by modifying the coordinate $j\\neq i$, then  \n\n\\[\n\\Phi(y)=g\\pm a_{j}=\\varepsilon a_{i}\\pm a_{j}.\n\\]\n\nBecause the multiset $\\{\\pm a_{1},\\dots ,\\pm a_{n}\\}$ contains $2n$ distinct elements, $\\varepsilon a_{i}\\pm a_{j}\\neq\\bar 0$, so $y\\notin L$.  \nHence $x$ is adjacent to \\emph{exactly one} vertex of $L$.  \n\nTranslating by any $v\\in\\mathbb Z^{n}$ shows that each coset $v+L$ is a lattice–periodic $1$-perfect code.\n\\hfill$\\square$\n\n\n\nPart C.  Classification up to signed permutations  \n\nC1 – Every lattice–periodic code comes from B.  \nFor a given code, Part A yields $G\\setminus\\{\\bar 0\\}=\\{\\pm\\bar e_{1},\\dots ,\\pm\\bar e_{n}\\}$.  \nTaking $a_{i}:=\\bar e_{i}$ and $\\Phi$ as in Part B we have $\\ker\\Phi=L$, so the code arises from the construction.\n\nC2 – Necessity of the stated condition.  \nAssume $L'=P(L)$ for a signed permutation matrix $P\\in\\mathrm{GL}_{n}(\\mathbb Z)$.  \nLet  \n\n\\[\n\\pi:\\mathbb Z^{n}\\twoheadrightarrow G:=\\mathbb Z^{n}/L,\\qquad\n\\pi':\\mathbb Z^{n}\\twoheadrightarrow G':=\\mathbb Z^{n}/L'\n\\]\n\nbe quotient maps.  Because $P$ bijects $L$ onto $L'$,  \n\n\\[\n\\psi:G\\longrightarrow G',\\qquad\\psi(\\bar x):=\\overline{P(x)}\n\\]\n\nis a well-defined group isomorphism.  \nFor a basis vector,  \n\n\\[\n\\psi(\\bar e_{i})=\\overline{P(e_{i})}= \\pm \\bar e_{\\sigma(i)}',\n\\]\n\nwhere $\\sigma$ and the signs are encoded by $P$.  Writing $a_{i}=\\bar e_{i}$ and $a_{j}'=\\bar e_{j}'$ gives $\\psi(a_{i})=\\pm a_{\\sigma(i)}'$, establishing the implication.\n\nC3 – Sufficiency.  \nConversely, suppose an isomorphism $\\psi:G\\cong G'$ and a signed permutation matrix $P$ satisfy $\\psi(a_{i})=\\pm a'_{\\sigma(i)}$ for every $i$.  \nLet $\\Phi,\\Phi'$ be the homomorphisms defined from the two data sets.  For each $e_{i}$,\n\n\\[\n(\\psi\\circ\\Phi)(e_{i})=\\psi(a_{i})=\\pm a_{\\sigma(i)}'=\\Phi'(P(e_{i})),\n\\]\n\nso $\\psi\\circ\\Phi=\\Phi'\\circ P$ on $\\mathbb Z^{n}$.  Taking kernels gives $L=P^{-1}(L')$, whence $L'=P(L)$.\n\nC4 – Combinatorial interpretation.  \nPartitioning $G\\setminus\\{\\bar 0\\}$ into the $n$ antipodal pairs $\\{\\pm a_{i}\\}$ is equivalent to choosing a $1$-factorisation of the Cayley graph $\\mathrm{Cay}(G,G\\setminus\\{\\bar 0\\})\\cong K_{2n+1}$.  \nQuotienting by group automorphisms and by signed permutations of the coordinates yields the claimed bijection with “signed $1$-factorisations’’ of $K_{2n+1}$.\n\n\\hfill$\\square$",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.658155",
        "was_fixed": false,
        "difficulty_analysis": "1.  Additional structural hypothesis (lattice periodicity) forces a full classification problem instead of a single construction.  \n2.  The proof demands group-theoretic arguments (finite Abelian quotients, cyclicity, generators) combined with lattice index computations, not present in the original.  \n3.  One must show necessity (order 2n+1, cyclic quotient, relation (*)) and sufficiency—two non-trivial directions requiring careful counting and independence/ domination arguments.  \n4.  Identifying all perfect codes up to the automorphism group involves deeper insight into invariant theory (re-labelling coordinates, sign changes, translations).  \n5.  The solution blends combinatorics on graphs, lattice theory, and finite group theory; each step is subtle and none can be bypassed by the direct modular trick that solves the original problem."
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}