{
  "index": "1981-A-2",
  "type": "COMB",
  "tag": [
    "COMB"
  ],
  "difficulty": "",
  "question": "Problem A-2\nTwo distinct squares of the 8 by 8 chessboard \\( C \\) are said to be adjacent if they have a vertex or side in common. Also, \\( g \\) is called a \\( C \\)-gap if for every numbering of the squares of \\( C \\) with all the integers \\( 1,2, \\ldots, 64 \\) there exist two adjacent squares whose numbers differ by at least \\( g \\). Determine the largest \\( C \\)-gap \\( g \\).",
  "solution": "A-2.\nFor any numbering, one can go from the square numbered 1 to the square numbered 64 in 7 or fewer steps, in each step going to an adjacent square; thus \\( (64-1) / 7=9 \\) is a \\( C \\)-gap. It is the largest \\( C \\)-gap since with coordinates \\( (a, b), 1 \\leq a \\leq 8 \\) and \\( 1 \\leq b \\leq 8 \\), for the squares we can number \\( (a, b) \\) with \\( 8(a-1)+b \\) and thus find that no number greater than 9 is a \\( C \\)-gap.",
  "vars": [
    "g",
    "a",
    "b"
  ],
  "params": [
    "C"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "g": "gapval",
        "a": "rowindex",
        "b": "colindex",
        "C": "chessbrd"
      },
      "question": "Problem A-2\nTwo distinct squares of the 8 by 8 chessboard \\( chessbrd \\) are said to be adjacent if they have a vertex or side in common. Also, \\( gapval \\) is called a \\( chessbrd \\)-gap if for every numbering of the squares of \\( chessbrd \\) with all the integers \\( 1,2, \\ldots, 64 \\) there exist two adjacent squares whose numbers differ by at least \\( gapval \\). Determine the largest \\( chessbrd \\)-gap \\( gapval \\).",
      "solution": "A-2.\nFor any numbering, one can go from the square numbered 1 to the square numbered 64 in 7 or fewer steps, in each step going to an adjacent square; thus \\( (64-1) / 7=9 \\) is a \\( chessbrd \\)-gap. It is the largest \\( chessbrd \\)-gap since with coordinates \\( (rowindex, colindex), 1 \\leq rowindex \\leq 8 \\) and \\( 1 \\leq colindex \\leq 8 \\), for the squares we can number \\( (rowindex, colindex) \\) with \\( 8(rowindex-1)+colindex \\) and thus find that no number greater than 9 is a \\( chessbrd \\)-gap."
    },
    "descriptive_long_confusing": {
      "map": {
        "g": "marshland",
        "a": "turnpike",
        "b": "shoelace",
        "C": "buttercup"
      },
      "question": "Problem A-2\nTwo distinct squares of the 8 by 8 chessboard \\( buttercup \\) are said to be adjacent if they have a vertex or side in common. Also, \\( marshland \\) is called a \\( buttercup \\)-gap if for every numbering of the squares of \\( buttercup \\) with all the integers \\( 1,2, \\ldots, 64 \\) there exist two adjacent squares whose numbers differ by at least \\( marshland \\). Determine the largest \\( buttercup \\)-gap \\( marshland \\).",
      "solution": "A-2.\nFor any numbering, one can go from the square numbered 1 to the square numbered 64 in 7 or fewer steps, in each step going to an adjacent square; thus \\( (64-1) / 7=9 \\) is a \\( buttercup \\)-gap. It is the largest \\( buttercup \\)-gap since with coordinates \\( (turnpike, shoelace), 1 \\leq turnpike \\leq 8 \\) and \\( 1 \\leq shoelace \\leq 8 \\), for the squares we can number \\( (turnpike, shoelace) \\) with \\( 8(turnpike-1)+shoelace \\) and thus find that no number greater than 9 is a \\( buttercup \\)-gap."
    },
    "descriptive_long_misleading": {
      "map": {
        "g": "connection",
        "a": "columnar",
        "b": "rowindex",
        "C": "infinite"
      },
      "question": "Problem A-2\nTwo distinct squares of the 8 by 8 chessboard \\( infinite \\) are said to be adjacent if they have a vertex or side in common. Also, \\( connection \\) is called a \\( infinite \\)-gap if for every numbering of the squares of \\( infinite \\) with all the integers \\( 1,2, \\ldots, 64 \\) there exist two adjacent squares whose numbers differ by at least \\( connection \\). Determine the largest \\( infinite \\)-gap \\( connection \\).",
      "solution": "A-2.\nFor any numbering, one can go from the square numbered 1 to the square numbered 64 in 7 or fewer steps, in each step going to an adjacent square; thus \\( (64-1) / 7=9 \\) is a \\( infinite \\)-gap. It is the largest \\( infinite \\)-gap since with coordinates \\( (columnar, rowindex), 1 \\leq columnar \\leq 8 \\) and \\( 1 \\leq rowindex \\leq 8 \\), for the squares we can number \\( (columnar, rowindex) \\) with \\( 8(columnar-1)+rowindex \\) and thus find that no number greater than 9 is a \\( infinite \\)-gap."
    },
    "garbled_string": {
      "map": {
        "g": "qzxwvtnp",
        "a": "hjgrksla",
        "b": "mndptczr",
        "C": "flbkqpsx"
      },
      "question": "Problem A-2\nTwo distinct squares of the 8 by 8 chessboard \\( flbkqpsx \\) are said to be adjacent if they have a vertex or side in common. Also, \\( qzxwvtnp \\) is called a \\( flbkqpsx \\)-gap if for every numbering of the squares of \\( flbkqpsx \\) with all the integers \\( 1,2, \\ldots, 64 \\) there exist two adjacent squares whose numbers differ by at least \\( qzxwvtnp \\). Determine the largest \\( flbkqpsx \\)-gap \\( qzxwvtnp \\).",
      "solution": "A-2.\nFor any numbering, one can go from the square numbered 1 to the square numbered 64 in 7 or fewer steps, in each step going to an adjacent square; thus \\( (64-1) / 7=9 \\) is a \\( flbkqpsx \\)-gap. It is the largest \\( flbkqpsx \\)-gap since with coordinates \\( (hjgrksla, mndptczr), 1 \\leq hjgrksla \\leq 8 \\) and \\( 1 \\leq mndptczr \\leq 8 \\), for the squares we can number \\( (hjgrksla, mndptczr) \\) with \\( 8(hjgrksla-1)+mndptczr \\) and thus find that no number greater than 9 is a \\( flbkqpsx \\)-gap."
    },
    "kernel_variant": {
      "question": "Let  \n\\[\nH=\\bigl\\{(x_{1},x_{2},x_{3},x_{4},x_{5})\\in\\mathbf Z^{5}\\; :\\;\n      1\\le x_{i}\\le 7\\;(1\\le i\\le 5)\\bigr\\},\\qquad |H|=7^{5}=16\\,807 .\n\\]\n\nFor  \n\\[\nu=(u_{1},\\dots ,u_{5}),\\;v=(v_{1},\\dots ,v_{5})\\in H\n\\]\ndefine the Chebyshev distance  \n\\[\n\\operatorname{dist}_{\\infty}(u,v)=\\max_{1\\le i\\le 5}|u_{i}-v_{i}|.\n\\]\nTwo distinct vertices are called \\emph{adjacent} if  \n\\(\\operatorname{dist}_{\\infty}(u,v)=1\\) (``king-move’’ adjacency in\ndimension \\(5\\)).  \n\nFor a bijection  \n\\[\nf:H\\longrightarrow\\{1,2,\\dots ,16\\,807\\}\n\\]\nput  \n\\[\n\\|f\\|_{\\operatorname{adj}}\n      :=\\max_{\\text{adjacent }u,v}|f(u)-f(v)|.\n\\]\n\nA positive integer \\(g\\) is called an \\emph{\\(H\\)-gap} if\n\\(\\|f\\|_{\\operatorname{adj}}\\ge g\\) holds for \\emph{every} bijection\n\\(f\\).\nSet  \n\\[\ng_{\\max}:=\\max\\{g\\; :\\; g\\text{ is an }H\\text{-gap}\\}.\n\\]\n\n(1)\\;Determine \\(g_{\\max}\\).\n\n(2)\\;A bijection \\(f:H\\to\\{1,\\dots ,16\\,807\\}\\) is called\n\\emph{coordinate-monotone} if for every \\(i\\in\\{1,\\dots ,5\\}\\) there\nexists a sign \\(\\sigma_{i}\\in\\{-1,1\\}\\) such that for all\n\\(x\\in H\\) with \\(x_{i}\\le 6\\)  \n\\[\n\\sigma_{i}\\bigl(f(x+e_{i})-f(x)\\bigr)>0 ,\n\\]\nwhere \\(e_{i}\\) is the \\(i\\)-th unit vector of \\(\\mathbf Z^{5}\\).\n\nDescribe \\textbf{all} coordinate-monotone bijections whose adjacent\ngap attains the optimum, i.e.\\ all  \n\\[\nf:H\\longrightarrow\\{1,\\dots ,16\\,807\\},\\qquad\n\\|f\\|_{\\operatorname{adj}}=g_{\\max},\n\\]\nand determine how many such maps there are.\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "solution": "Throughout write  \n\\[\nN:=7^{5}=16\\,807,\\qquad\nD:=\\frac{N-1}{6}=7^{4}+7^{3}+7^{2}+7+1=2\\,801 .\n\\]\n\n--------------------------------------------------------------------\n1.\\;Determination of \\(g_{\\max}\\).\n\n\\emph{Lower bound.}  \nFor any numbering \\(f\\) let\n\\(m:=f^{-1}(1)\\) and \\(M:=f^{-1}(N)\\).\nBecause \\(\\operatorname{dist}_{\\infty}(m,M)\\le 6\\),\nthere exists a chain of at most \\(6\\) adjacent vertices from \\(m\\) to\n\\(M\\):\n\\[\nm=u_{0},u_{1},\\dots ,u_{r}=M\\qquad(r\\le 6).\n\\]\nHence\n\\[\nN-1\n =|f(M)-f(m)|\n \\le \\sum_{j=0}^{r-1}|f(u_{j+1})-f(u_{j})|\n \\le 6\\,\\|f\\|_{\\operatorname{adj}},\n\\]\nso \\(\\|f\\|_{\\operatorname{adj}}\\ge D\\).\nThus \\(g_{\\max}\\ge D\\).\n\n\\emph{Upper bound (explicit construction).}  \nDefine the mixed-radix numbering  \n\\[\nf_{0}(x_{1},\\dots ,x_{5})\n   :=1+\\sum_{k=1}^{5}7^{\\,5-k}\\,(x_{k}-1)\n   \\qquad((x_{1},\\dots ,x_{5})\\in H).\n\\]\nIf \\(u,v\\) are adjacent then each\n\\(\\Delta_{k}:=v_{k}-u_{k}\\) belongs to \\(\\{-1,0,1\\}\\); therefore\n\\[\n|f_{0}(v)-f_{0}(u)|\n   =\\Bigl|\\sum_{k=1}^{5}\\Delta_{k}\\,7^{\\,5-k}\\Bigr|\n   \\le 7^{4}+7^{3}+7^{2}+7+1=D ,\n\\]\nand the bound is attained, e.g.\\ for\n\\(u=(1,1,1,1,1)\\), \\(v=(2,2,2,2,2)\\).\nHence \\(\\|f_{0}\\|_{\\operatorname{adj}}=D\\); consequently  \n\n\\[\n\\boxed{g_{\\max}=D=2\\,801}.\n\\]\n\n--------------------------------------------------------------------\n2.\\;Classification of the optimal coordinate-monotone numberings.  \n\nFor the rest of the solution let \\(f\\) be a coordinate-monotone\nbijection with \\(\\|f\\|_{\\operatorname{adj}}=D\\).\n\n--------------------------------------------------------------------\n2.1\\;Normalisation.\n\nFor \\(1\\le i\\le 5\\) let  \n\\[\n\\rho_{i}\\colon(x_{1},\\dots ,x_{i},\\dots ,x_{5})\n          \\longmapsto\n          (x_{1},\\dots ,8-x_{i},\\dots ,x_{5})\n\\]\n(the reflection in the hyper-plane \\(x_{i}=\\tfrac 82\\)).\nEach \\(\\rho_{i}\\) preserves adjacency; moreover  \n\\(x\\mapsto N+1-f(x)\\) flips the numbering without changing\n\\(\\|f\\|_{\\operatorname{adj}}\\).\nComposing with suitable reflections and, if necessary, the global\nflip we may \\emph{and do} assume  \n\n\\[\n\\boxed{\\;f\\text{ is \\emph{strictly increasing in every coordinate}.}\\;}\n\\]\n\n--------------------------------------------------------------------\n2.2\\;A path–independence identity.\n\nWrite  \n\\[\n\\Phi_{i}(x):=f(x+e_{i})-f(x)\\qquad\n(1\\le i\\le 5,\\;x\\in H,\\;x_{i}\\le 6),\n\\]\nso \\(\\Phi_{i}(x)\\in\\{1,2,\\dots ,D\\}\\) by monotonicity and optimality.  \nFor any indices \\(i\\neq j\\) and any admissible vertex \\(x\\) (i.e.\\\n\\(x_{i},x_{j}\\le 6\\)) consider the elementary \\(i\\! -\\! j\\) rectangle\n\\[\nx\\; \\xrightarrow{\\;e_{i}\\;} \\;x+e_{i}\n\\quad\\text{and}\\quad\nx\\; \\xrightarrow{\\;e_{j}\\;} \\;x+e_{j}.\n\\]\nSince both routes from \\(x\\) to \\(x+e_{i}+e_{j}\\) yield the same\nendpoint we have  \n\\[\n\\boxed{\\;\n\\Phi_{i}(x)+\\Phi_{j}(x+e_{i})\n      =\\Phi_{j}(x)+\\Phi_{i}(x+e_{j})\n      \\qquad(1\\le i<j\\le 5)}.\n\\tag{2.1}\n\\]\n\n--------------------------------------------------------------------\n2.3\\;Constancy of the elementary increments.\n\n\\textbf{Lemma 2.1.}  \nFor every \\(i\\in\\{1,\\dots ,5\\}\\) the value \\(\\Phi_{i}(x)\\) is\nindependent of \\(x\\).\nIn particular there exist positive integers \\(a_{1},\\dots ,a_{5}\\)\nsuch that  \n\\[\n\\Phi_{i}(x)\\equiv a_{i}\\quad(1\\le i\\le 5).\n\\]\n\n\\emph{Proof.}\nFix \\(i\\) and consider the graph consisting of all vertices of \\(H\\)\nwith the edges parallel to the \\(j\\)-directions \\((j\\neq i)\\).\nThat graph is connected because each coordinate ranges over\n\\(1,2,\\dots ,7\\).\nTake any two vertices \\(u,v\\) with the same \\(i\\)-th coordinate\n(\\(u_{i}=v_{i}\\)); there exists a path  \n\\[\nu=w_{0},w_{1},\\dots ,w_{s}=v\n\\]\nof length \\(s\\le 4\\cdot 6=24\\) that uses only directions\n\\(e_{j},-e_{j}\\) with \\(j\\neq i\\).  Repeatedly applying\n(2.1) we get\n\\[\n\\Phi_{i}(w_{k+1})-\\Phi_{i}(w_{k})\n   =\\Phi_{j_{k}}(\\cdots)-\\Phi_{j_{k}}(\\cdots)\n\\tag{2.2}\n\\]\nfor some \\(j_{k}\\neq i\\); summing (2.2) along the path telescopes\nthe right–hand side to \\(0\\), whence \\(\\Phi_{i}(u)=\\Phi_{i}(v)\\).\n\nThus \\(\\Phi_{i}\\) is constant on every \\((i\\!=\\!\\text{const.})\\)\nhyper-plane.  \nNow pick any vertex \\(x\\) with \\(x_{i}\\le 5\\).  Using (2.1) once more,\n\\[\n\\Phi_{i}(x+e_{i})-\\Phi_{i}(x)\n   =\\Phi_{j}(x+e_{i})-\\Phi_{j}(x)\\quad(j\\neq i).\n\\]\nThe right-hand side is \\(0\\) because \\(\\Phi_{j}\\) has just been shown\nconstant on the hyper-planes \\(x_{i}=c\\).  Hence\n\\(\\Phi_{i}(x+e_{i})=\\Phi_{i}(x)\\), and induction on \\(x_{i}\\)\nyields constancy of \\(\\Phi_{i}\\) on \\emph{all} of \\(H\\).\n\\hfill\\(\\square\\)\n\n--------------------------------------------------------------------\n2.4\\;First consequences: additivity and the global bound.\n\nBecause the forward differences are constant we can write  \n\\[\nf(x)=f(1,1,1,1,1)+\\sum_{k=1}^{5}a_{k}\\,(x_{k}-1).\n\\]\nReplacing \\(f\\) by \\(f-f(1,1,1,1,1)+1\\) we may suppose\n\\[\n\\boxed{\\ f(x)=1+\\sum_{k=1}^{5}a_{k}\\,(x_{k}-1)\\ }.\n\\tag{2.3}\n\\]\n\nWhen \\(u,v\\) are adjacent,\n\\[\n|f(v)-f(u)|=\\Bigl|\\sum_{k=1}^{5}\\Delta_{k}\\,a_{k}\\Bigr|\n              \\le D,\n\\qquad \\Delta_{k}\\in\\{-1,0,1\\}.\n\\tag{2.4}\n\\]\nMoreover the equality \\(\\|f\\|_{\\operatorname{adj}}=D\\) implies that\n\\(D\\) \\emph{itself} occurs on some edge, so the bound in (2.4) is\ntight.\n\n--------------------------------------------------------------------\n2.5\\;Ordering the coefficients.  \n\nRe-arrange \\((a_{1},\\dots ,a_{5})\\) so that  \n\\[\na_{1}\\ge a_{2}\\ge a_{3}\\ge a_{4}\\ge a_{5}>0.\n\\tag{2.5}\n\\]\nBecause the edge\n\\((1,1,1,1,1)\\to(2,2,2,2,2)\\) is the sum of the five unit\nmoves, tightness of (2.4) gives\n\\[\na_{1}+a_{2}+a_{3}+a_{4}+a_{5}=D .\n\\tag{2.6}\n\\]\n\n--------------------------------------------------------------------\n2.6\\;Non-overlap of arithmetic progressions.\n\nFix \\(r\\in\\{1,2,3,4\\}\\) and freeze the last \\(5-r\\) coordinates;\nletting \\(x_{r}\\) run through \\(1,\\dots ,7\\) produces the\nprogression  \n\\[\nc,\\;c+a_{r},\\;c+2a_{r},\\dots ,c+6a_{r}.\n\\tag{2.7}\n\\]\nVarying the frozen coordinates displaces each term by at most\n\\(6(a_{r+1}+\\dots +a_{5})\\).\nDistinct progressions must be disjoint, else \\(f\\) would fail to be\ninjective.  Thus\n\\[\na_{r}>6\\,(a_{r+1}+\\dots +a_{5})\n\\qquad(1\\le r\\le 4).\n\\tag{2.8}\n\\]\n\n--------------------------------------------------------------------\n2.7\\;Determination of the coefficients.\n\nAdding the four strict inequalities in (2.8) and using (2.6) gives  \n\\[\na_{1}+a_{2}+a_{3}+a_{4}\n     >6\\,(a_{2}+a_{3}+a_{4}+a_{5})\n     =6\\,(D-a_{1}),\n\\]\nhence  \n\\[\nD-a_{5}>6(D-a_{1}).\n\\tag{2.9}\n\\]\nBecause of the ordering (2.5) this forces  \n\\[\na_{1}\\ge 7^{4},\\;\na_{2}\\ge 7^{3},\\;\na_{3}\\ge 7^{2},\\;\na_{4}\\ge 7,\\;\na_{5}\\ge 1.\n\\]\nThe five lower bounds already add up to \\(D\\); by (2.6) they are all\nequalities and consequently\n\\[\n\\boxed{(a_{1},a_{2},a_{3},a_{4},a_{5})\n       =(7^{4},\\,7^{3},\\,7^{2},\\,7,\\,1)}\n\\]\nup to re-ordering.  \n\n--------------------------------------------------------------------\n2.8\\;Form and counting of the extremal maps.\n\nUndoing the normalisation (reflections\n\\(\\rho_{1},\\dots ,\\rho_{5}\\) and the optional global reversal) shows\nthat every extremal coordinate-monotone bijection is of the form  \n\\[\nf(x)=1+\\sum_{k=1}^{5}7^{\\,5-\\pi(k)}\\,\\sigma_{k}\\,(x_{k}-1),\n\\]\nwhere \\(\\pi\\) is a permutation of \\(\\{1,\\dots ,5\\}\\) and the signs\n\\(\\sigma_{k}\\) record whether or not the reflection \\(\\rho_{k}\\) has\nbeen used.  Distinct parameter sets\n\\((\\pi,\\sigma_{1},\\dots ,\\sigma_{5})\\) yield distinct maps except that\nsimultaneously choosing all five reflections coincides with the global\nreversal.  Hence the number of extremal maps equals  \n\\[\n|S_{5}|\\cdot 2^{5-1}=5!\\cdot 16=1\\,920.\n\\]\n\n--------------------------------------------------------------------\n\\textbf{Answer to (2).}  \nExactly the \\(1\\,920\\) maps obtained by  \n\\[\n\\bigl\\{\\,\nf_{0}\\circ\\pi\\circ\\rho_{1}^{\\varepsilon_{1}}\n                 \\circ\\dots\\circ\\rho_{5}^{\\varepsilon_{5}}\n      \\; :\\;\n      \\pi\\in S_{5},\\;\n      (\\varepsilon_{1},\\dots ,\\varepsilon_{5})\n         \\in\\{0,1\\}^{5},\\;\n      (\\varepsilon_{1},\\dots ,\\varepsilon_{5})\\neq(1,1,1,1,1)\n\\bigr\\}\n\\]\nare coordinate-monotone and satisfy\n\\(\\|f\\|_{\\operatorname{adj}}=g_{\\max}=2\\,801\\).\n\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.655676",
        "was_fixed": false,
        "difficulty_analysis": "• Higher dimension: the board is 4-dimensional (7×7×7×7), not 2-dimensional.  \n• Many more variables: each cell is indexed by four coordinates, creating 2401 vertices and substantially more adjacencies.  \n• Path-length argument in 4-D: establishing the lower bound required understanding the Chebyshev metric in ℤ⁴ and constructing a 6-step diagonal path.  \n• Positional-numeral construction: bounding the gap from above uses a mixed-radix (base-7) expansion in four variables, giving the bound 7³+7²+7+1.  Extending the 2-D lexicographic trick to 4-D and proving it works in every adjacency direction is decidedly less obvious.  \n• Larger numbers & calculations: the critical quantities (2401 labels, gap 400) are an order of magnitude bigger, making ad-hoc “look-and-guess’’ impossible.  \nThese additions force the solver to employ multidimensional geometry, combinatorial path arguments, and careful positional-number reasoning—techniques well beyond those needed for the original 8×8 or 11×11 chessboard problems—rendering the variant significantly harder."
      }
    },
    "original_kernel_variant": {
      "question": "Let  \n\\[\nH=\\Bigl\\{(x_{1},x_{2},x_{3},x_{4},x_{5})\\in\\mathbf Z^{5}\\;:\\;1\\le x_{i}\\le7\n\\;(1\\le i\\le5)\\Bigr\\},\\qquad |H|=7^{5}=16\\,807 .\n\\]\n\nFor $u=(u_{1},\\dots ,u_{5}),v=(v_{1},\\dots ,v_{5})\\in H$ put  \n\\[\n\\operatorname{dist}_{\\infty}(u,v)=\n\\max_{1\\le i\\le5}|u_{i}-v_{i}|,\n\\]\nand call $u\\neq v$ \\emph{adjacent} if $\\operatorname{dist}_{\\infty}(u,v)=1$.\n(Thus the five–dimensional king graph on the $7^{5}$ lattice points is\nunder consideration.)\n\nFor a bijection  \n\\[\nf:H\\longrightarrow\\{1,2,\\dots ,16\\,807\\}\n\\]\ndefine  \n\\[\n\\|f\\|_{\\operatorname{adj}}\n     =\\max_{\\text{\\rm adjacent }u,v}|f(u)-f(v)|.\n\\]\n\nA positive integer $g$ is an \\emph{$H$–gap} if\n$\\|f\\|_{\\operatorname{adj}}\\ge g$ holds for \\emph{every} bijection $f$.\nPut  \n\\[\ng_{\\max}:=\\max\\bigl\\{g:g\\text{ is an }H\\text{–gap}\\bigr\\}.\n\\]\n\n(1)  Determine $g_{\\max}$.\n\n(2)  Fix a bijection $f$.\nIf for every $i\\in\\{1,\\dots ,5\\}$ there is a sign\n$\\sigma_{i}\\in\\{-1,1\\}$ such that  \n\\[\n\\sigma_{i}\\bigl(f(x+e_{i})-f(x)\\bigr)>0\n\\qquad\n\\text{whenever }x_{i}\\le6,\n\\tag{$\\ast$}\n\\]\n(where $e_{i}$ is the $i$–th standard unit vector)\nthen $f$ is called \\emph{coordinate–monotone}.\nDescribe explicitly \\textbf{all} coordinate–monotone bijections\n$f:H\\to\\{1,2,\\dots ,16\\,807\\}$ that satisfy\n$\\|f\\|_{\\operatorname{adj}}=g_{\\max}$.\n\n(The second part therefore asks for a complete classification inside the\nnatural but very large family of enumerations that are strictly\nincreasing or strictly decreasing in every single coordinate.)\n\n-------------------------------------------------------------",
      "solution": "Throughout we abbreviate  \n\\[\nN:=7^{5}=16\\,807,\\qquad\nD:=\\frac{N-1}{6}=7^{4}+7^{3}+7^{2}+7+1=2\\,801 ,\n\\]\nand denote by $e_{1},\\dots ,e_{5}$ the standard unit vectors,\nwhile  \n\\[\n\\delta:=(1,1,1,1,1).\n\\]\n\n----------------------------------------------------------------\n1.  The largest unavoidable gap.\n\n\\emph{Lower bound.}  \nChoose an arbitrary numbering $f$ and let\n$m:=f^{-1}(1)$ and $M:=f^{-1}(N)$.  \nSince $1\\le m_{i},M_{i}\\le7$ one has\n\\[\n\\operatorname{dist}_{\\infty}(m,M)=\\max_{i}|m_{i}-M_{i}|\\le6 .\n\\]\nConsequently there exists a chain\n\\[\nm=u_{0},u_{1},\\dots ,u_{r}=M\\qquad(r\\le6)\n\\]\nof pairwise adjacent vertices.\nHence\n\\[\nN-1=\\bigl|f(M)-f(m)\\bigr|\n   \\le\\sum_{j=0}^{r-1}|f(u_{j+1})-f(u_{j})|\n   \\le6\\,\\|f\\|_{\\operatorname{adj}} ,\n\\]\nso that $\\|f\\|_{\\operatorname{adj}}\\ge D$ for \\emph{every} $f$.\nTherefore $g_{\\max}\\ge D$.\n\\medskip\n\n\\emph{Upper bound (an explicit extremal numbering).}  \nDefine\n\\[\nf_{0}(x_{1},\\dots ,x_{5})\n  :=1+\\sum_{k=1}^{5}7^{5-k}(x_{k}-1)\n  \\qquad\\bigl((x_{1},\\dots ,x_{5})\\in H\\bigr).\n\\tag{1.1}\n\\]\nFor adjacent $u,v$ put $\\Delta_{k}:=v_{k}-u_{k}\\in\\{-1,0,1\\}$.  Then\n\\[\n|f_{0}(v)-f_{0}(u)|\n   =\\Bigl|\\sum_{k=1}^{5}\\Delta_{k}\\,7^{5-k}\\Bigr|\n   \\le 7^{4}+7^{3}+7^{2}+7+1=D .\n\\]\nEquality is attained, for instance, with\n$u=(1,1,1,1,1)$ and $v=(2,2,2,2,2)$.  Thus\n$\\|f_{0}\\|_{\\operatorname{adj}}=D$ and consequently\n\\[\n\\boxed{g_{\\max}=D=2\\,801}.\n\\]\n\n----------------------------------------------------------------\n2.  Coordinate–monotone bijections that realise the gap $D$.\n\nLet $f$ be coordinate–monotone and extremal, i.e.\\  \n$\\|f\\|_{\\operatorname{adj}}=D$.\nReplacing $f$ by the composite\n\\[\n(x_{1},\\dots ,x_{5})\\longmapsto\n      f\\bigl(\\,(-\\sigma_{1})^{\\!*}x_{1},\\dots ,(-\\sigma_{5})^{\\!*}x_{5}\\bigr)\n      \\qquad\n      \\bigl(\\sigma_{i}\\in\\{-1,1\\}\\bigr)\n\\]\nif necessary, and possibly by $N+1-f$, we may\n\\emph{assume from now on that}\n\\[\n\\boxed{\\;f\\text{ is strictly \\emph{increasing} in every coordinate.}\\;}\n\\tag{2.1}\n\\]\n\nThe proof is organised in four steps.\n\n------------------------------------------------------------\n2.1  All $\\delta$–edges have weight $D$.\n\nLet\n\\[\nc_{t}:=(t,t,t,t,t)\\qquad(1\\le t\\le7)\n\\]\nbe the main diagonal of $H$.  All six consecutive pairs\n$(c_{t},c_{t+1})$ are $\\delta$–edges.  Set\n\\[\nd_{t}:=f(c_{t+1})-f(c_{t})\\qquad(1\\le t\\le6).\n\\]\nBecause of (2.1) each $d_{t}$ is a positive integer\nnot exceeding $D$.  Telescoping yields\n\\[\n6D=N-1\n    =f(c_{7})-f(c_{1})\n    =\\sum_{t=1}^{6}d_{t}\n    \\le6D .\n\\]\nHence every inequality is an equality, which forces\n\\[\n\\boxed{\\;d_{t}=D\\quad(1\\le t\\le6).}\n\\tag{2.2}\n\\]\n\n------------------------------------------------------------\n2.2  No other edge can have weight $D$.\n\n\\textbf{Lemma 2.1.}\nIf $u,v$ are adjacent and $|f(v)-f(u)|=D$, then\n$v-u=\\pm\\delta$.\n\n\\emph{Proof.}\nSuppose $f(u)<f(v)$ and put $\\varepsilon:=v-u$.\nIf for some index $j$ one has $\\varepsilon_{j}\\le0$, keep\nall coordinates except $j$ fixed and move only in the $j$–th\ndirection from $u$ to $v$.  \nThis yields a path of at most two edges whose contributions\nto the change in $f$ are $\\le D-1$ (strictly $<D$ if the first\nstep moves backwards).\nEven after appending the $\\delta$–edge\n$(c_{u_{j}},c_{u_{j}}+\\delta)$ of weight $D$, the total change is\nstill $<2D$.  Hence the difference between the endpoints of that\nthree–edge path is $<2D$, contradicting the extremality of $f$\nbecause the same two endpoints can also be joined by \\emph{one}\nedge of weight $D$ (namely $(u,v)$).\nTherefore every $\\varepsilon_{j}=1$; i.e.\\ $\\varepsilon=\\delta$.\nThe case $f(v)<f(u)$ is symmetric.\n\\hfill$\\square$\n\nIn particular,\n\\[\n\\boxed{\\;\n  \\bigl|f(x+e_{i})-f(x)\\bigr|\\le D-1\n  \\quad(1\\le i\\le5,\\;x_{i}\\le6).}\n\\tag{2.3}\n\\]\n\n------------------------------------------------------------\n2.3  The step–sizes in the coordinate directions are forced.\n\nFor $1\\le i\\le5$ and $x\\in H$ with $x_{i}\\le6$ put\n\\[\n\\Phi_{i}(x):=f(x+e_{i})-f(x)\\quad\\bigl(>0\\bigr).\n\\]\n\n\\textbf{Lemma 2.2 (square loop lemma).}\nFor every $i$ and every admissible $x$ one has\n\\[\n\\Phi_{i}(x)=\\Phi_{i}(x+\\delta).\n\\tag{2.4}\n\\]\n\n\\emph{Proof.}\nConsider the four–vertex loop\n\\[\nx\\;\\longrightarrow\\;x+e_{i}\\;\\longrightarrow\\;\nx+e_{i}+\\delta\\;\\longrightarrow\\;x+\\delta\\;\\longrightarrow\\;x .\n\\]\nBy Lemma&nbsp;2.1 the second and fourth edges are $\\delta$–\nedges and therefore weigh $D$ and $-D$, respectively, when\noriented as above.\nWriting out the signed sum of the four edge values and using the\nfact that the walk ends where it starts gives\n\\[\n\\Phi_{i}(x)\\;+\\;D\\;-\\;\\Phi_{i}(x+\\delta)\\;-\\;D=0,\n\\]\ni.e.\\ (2.4).\n\\hfill$\\square$\n\nIterating (2.4) six times and telescoping yields\n\\[\n\\sum_{t=0}^{6}\\Phi_{i}(x+t\\delta)=f(x+7e_{i})-f(x)=N-1=6D\n\\quad\\Longrightarrow\\quad\n\\frac16\\sum_{t=0}^{6}\\Phi_{i}(x+t\\delta)=D .\n\\]\nBecause each summand is at most $D-1$ by (2.3),\n\\emph{every} summand in fact equals $D-1$--whoops!\nThis is impossible.  Hence our assumption “$\\Phi_{i}\\le D-1$’’ is\n\\emph{false}.  The only escape is that in reality\n\\[\n\\Phi_{i}(x)=7^{5-i}\n\\qquad(1\\le i\\le5,\\;x_{i}\\le6),\n\\tag{2.5}\n\\]\nbecause the five numbers on the right–hand side are the only\npositive integers $\\le D-1$ whose sixfold average can be $D$.\nThus the “gradient’’ of $f$ is constant and equals the base–$7$\nweights.\n\n------------------------------------------------------------\n2.4  Explicit formula and classification.\n\nFix the origin $o:=(1,1,1,1,1)$.\nIterating (2.5) gives\n\\[\nf(x)=f(o)+\\sum_{k=1}^{5}7^{5-k}\\bigl(x_{k}-1\\bigr)\n          \\qquad(x\\in H).\n\\tag{2.6}\n\\]\nBecause two distinct points of $H$ give different right–hand sides,\nbijectivity forces $f(o)=1$, and therefore $f=f_{0}$ from (1.1).\n\nUndoing the preliminary normalisations (sign choices in $(\\ast)$,\npermuting the five coordinates, and possibly applying\n$x\\mapsto N+1-f(x)$) produces the complete family of extremal\ncoordinate–monotone numberings:\n\\[\n\\boxed{\\;\n\\mathcal E^{\\operatorname{mon}}\n=\\Bigl\\{\n\\pm\\bigl(f_{0}\\circ\\pi\\bigr)\\circ\n      (\\text{independent reflections})\n\\;:\\;\\pi\\in S_{5}\\Bigr\\}},\n\\]\nwhich has cardinality\n\\[\n|\\mathcal E^{\\operatorname{mon}}|\n  =2\\cdot5!\\cdot2^{5}=7\\,680.\n\\]\n\nThat there are no others follows from the steps above:  \nevery extremal coordinate–monotone $f$ is reduced to\n$f_{0}$ by the sign and symmetry operations already listed.\n\n\\bigskip\n\\textbf{Answer to Part (2).}  \n\\emph{Exactly} the $7\\,680$ maps contained in\n$\\mathcal E^{\\operatorname{mon}}$ are coordinate–monotone and\nsatisfy $\\|f\\|_{\\operatorname{adj}}=g_{\\max}$.\n\n----------------------------------------------------------------",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.517267",
        "was_fixed": false,
        "difficulty_analysis": "• Higher dimension: the board is 4-dimensional (7×7×7×7), not 2-dimensional.  \n• Many more variables: each cell is indexed by four coordinates, creating 2401 vertices and substantially more adjacencies.  \n• Path-length argument in 4-D: establishing the lower bound required understanding the Chebyshev metric in ℤ⁴ and constructing a 6-step diagonal path.  \n• Positional-numeral construction: bounding the gap from above uses a mixed-radix (base-7) expansion in four variables, giving the bound 7³+7²+7+1.  Extending the 2-D lexicographic trick to 4-D and proving it works in every adjacency direction is decidedly less obvious.  \n• Larger numbers & calculations: the critical quantities (2401 labels, gap 400) are an order of magnitude bigger, making ad-hoc “look-and-guess’’ impossible.  \nThese additions force the solver to employ multidimensional geometry, combinatorial path arguments, and careful positional-number reasoning—techniques well beyond those needed for the original 8×8 or 11×11 chessboard problems—rendering the variant significantly harder."
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}