{
  "index": "1993-A-4",
  "type": "COMB",
  "tag": [
    "COMB",
    "NT"
  ],
  "difficulty": "",
  "question": "which is less than or equal to 93. Let $y_1, y_2, \\dots, y_{93}$ be\npositive integers each of which is less than or equal to 19. Prove that\nthere exists a (nonempty) sum of some $x_i$'s equal to a sum of some $y_j$'s.",
  "solution": "Solution 1. We move a pebble among positions numbered \\( -18,-17, \\ldots, 0,1 \\), \\( 2, \\ldots, 93 \\), until it revisits a location. The pebble starts at position 0 . Thereafter, if the pebble is at position \\( t \\), we move it as follows. If \\( t \\leq 0 \\), choose some unused \\( x_{i} \\), move the pebble to \\( t+x_{i} \\), and then discard that \\( x_{i} \\). If \\( t>0 \\), choose some unused \\( y_{j} \\), move the pebble to \\( t-y_{j} \\), and then discard that \\( y_{j} \\). Since \\( x_{i} \\leq 93 \\) and \\( y_{j} \\leq 19 \\), the pebble's position stays between -18 and 93 .\n\nIn order to continue this process until a location is revisited, we must show that there is always an unused \\( x_{i} \\) or \\( y_{j} \\) as needed. If \\( t \\leq 0 \\) and a revisit has not yet occurred, then one \\( x_{i} \\) has been used after visiting each nonpositive position except the current one, so the total number of \\( x_{i} \\) 's used so far is at most \\( 19-1=18 \\), and at least one \\( x_{i} \\) remains. Similarly, if \\( t>0 \\) and a revisit has not yet occurred, then one \\( y_{j} \\) has been used after visiting each positive position except the current one, so the total number of \\( y_{j} \\) 's used so far is at most \\( 93-1=92 \\), and at least one \\( y_{j} \\) remains.\n\nSince there are only finitely many \\( x_{i} \\) 's and \\( y_{j} \\) 's to be used, the algorithm must eventually terminate with a revisit. The steps between the two visits of the same position constitute a sum of some \\( x_{i} \\) 's equal to a sum of some \\( y_{j} \\) 's.\n\nOur next solution is similar to Solution 1, but we dispense with the algorithmic interpretation.\n\nSolution 2. For the sake of generality, replace 19 and 93 in the problem statement by \\( m \\) and \\( n \\) respectively. Define \\( X_{k}=\\sum_{i=1}^{k} x_{i} \\) and \\( Y_{\\ell}=\\sum_{j=1}^{\\ell} y_{j} \\). Without loss of generality, assume \\( X_{m} \\geq Y_{n} \\). For \\( 1 \\leq \\ell \\leq n \\), define \\( f(\\ell) \\) by\n\\[\nX_{f(\\ell)} \\leq Y_{\\ell}<X_{f(\\ell)+1}\n\\]\nso \\( 0 \\leq f(\\ell) \\leq m \\). Let \\( g(\\ell)=Y_{\\ell}-X_{f(\\ell)} \\). If \\( g(\\ell)=0 \\) for some \\( \\ell \\), we are done. Otherwise,\n\\[\ng(\\ell)=Y_{\\ell}-X_{f(\\ell)}<x_{f(\\ell)+1} \\leq n,\n\\]\nso \\( 0<g(\\ell) \\leq n-1 \\) whenever \\( 1 \\leq \\ell \\leq n \\). Hence by the Pigeonhole Principle, there exist \\( \\ell_{0}<\\ell_{1} \\) such that \\( g\\left(\\ell_{0}\\right)=g\\left(\\ell_{1}\\right) \\). Then\n\\[\n\\sum_{i=f\\left(\\ell_{0}\\right)+1}^{f\\left(\\ell_{1}\\right)} x_{i}=X_{f\\left(\\ell_{1}\\right)}-X_{f\\left(\\ell_{0}\\right)}=Y_{\\ell_{1}}-Y_{\\ell_{0}}=\\sum_{j=\\ell_{0}+1}^{\\ell_{1}} y_{j} .\n\\]\n\nSolution 3 (based on an idea of Noam Elkies). With the same notation as in the previous solution, without loss of generality \\( X_{m} \\geq Y_{n} \\). If equality holds, we are done, so assume \\( X_{m}>Y_{n} \\). By the Pigeonhole Principle, two of the \\( (m+1)(n+1) \\) sums \\( X_{i}+Y_{j}(0 \\leq i \\leq m, 0 \\leq j \\leq n) \\) are congruent modulo \\( X_{m} \\), say\n\\[\nX_{i_{1}}+Y_{j_{1}} \\equiv X_{i_{2}}+Y_{j_{2}} \\quad\\left(\\bmod X_{m}\\right)\n\\]\n\nBut the difference\n\\[\n\\left(X_{i_{1}}-X_{i_{2}}\\right)+\\left(Y_{j_{1}}-Y_{j_{2}}\\right)\n\\]\nlies strictly between \\( -2 X_{m} \\) and \\( +2 X_{m} \\), so it equals 0 or \\( \\pm X_{m} \\). Clearly \\( i_{1} \\neq i_{2} \\); without loss of generality \\( i_{1}>i_{2} \\), so (1) equals 0 or \\( X_{m} \\). If \\( j_{1}<j_{2} \\), then (1) must be 0 , so \\( X_{i_{1}}-X_{i_{2}}=Y_{j_{2}}-Y_{j_{1}} \\) are two equal subsums. If \\( j_{1}>j_{2} \\), then (1) must be \\( X_{m} \\), and \\( Y_{j_{1}}-Y_{j_{2}}=X_{m}-\\left(X_{j_{1}}-X_{j_{2}}\\right) \\) are two equal subsums.",
  "vars": [
    "t",
    "x",
    "x_i",
    "x_f(\\\\ell)",
    "x_f(\\\\ell)+1",
    "y",
    "y_j",
    "X",
    "X_k",
    "X_i",
    "X_i_1",
    "X_i_2",
    "X_f(\\\\ell)",
    "X_f(\\\\ell)+1",
    "X_m",
    "Y",
    "Y_\\\\ell",
    "Y_n",
    "Y_j",
    "Y_j_1",
    "Y_j_2",
    "i",
    "j",
    "k",
    "f",
    "g",
    "\\\\ell",
    "i_1",
    "i_2",
    "j_1",
    "j_2"
  ],
  "params": [
    "m",
    "n"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "t": "pebblepos",
        "x": "xvalue",
        "x_i": "ithxvalue",
        "x_f(\\\\ell)": "functionxvalue",
        "x_f(\\\\ell)+1": "functionxplusone",
        "y": "yvalue",
        "y_j": "jthyvalue",
        "X": "cumulativesumx",
        "X_k": "kthcumulativesumx",
        "X_i": "ithcumulativesumx",
        "X_i_1": "cumulativesumxone",
        "X_i_2": "cumulativesumxtwo",
        "X_f(\\\\ell)": "functioncumulativex",
        "X_f(\\\\ell)+1": "functioncumulativexplusone",
        "X_m": "mcumulativesumx",
        "Y": "cumulativesumy",
        "Y_\\\\ell": "ellcumulativesumy",
        "Y_n": "ncumulativesumy",
        "Y_j": "jthcumulativesumy",
        "Y_j_1": "cumulativesumyone",
        "Y_j_2": "cumulativesumytwo",
        "i": "indexi",
        "j": "indexj",
        "k": "indexk",
        "f": "functionf",
        "g": "functiong",
        "\\\\ell": "ellindex",
        "i_1": "firstindexi",
        "i_2": "secondindexi",
        "j_1": "firstindexj",
        "j_2": "secondindexj",
        "m": "ylimitvalue",
        "n": "xlimitvalue"
      },
      "question": "which is less than or equal to 93. Let $yvalue_1, yvalue_2, \\dots, yvalue_{93}$ be\npositive integers each of which is less than or equal to 19. Prove that\nthere exists a (nonempty) sum of some $ithxvalue$'s equal to a sum of some $jthyvalue$'s.",
      "solution": "Solution 1. We move a pebble among positions numbered \\( -18,-17, \\ldots, 0,1 \\), \\( 2, \\ldots, 93 \\), until it revisits a location. The pebble starts at position 0. Thereafter, if the pebble is at position \\( pebblepos \\), we move it as follows. If \\( pebblepos \\leq 0 \\), choose some unused \\( ithxvalue \\), move the pebble to \\( pebblepos+ithxvalue \\), and then discard that \\( ithxvalue \\). If \\( pebblepos>0 \\), choose some unused \\( jthyvalue \\), move the pebble to \\( pebblepos-jthyvalue \\), and then discard that \\( jthyvalue \\). Since \\( ithxvalue \\leq 93 \\) and \\( jthyvalue \\leq 19 \\), the pebble's position stays between -18 and 93.\n\nIn order to continue this process until a location is revisited, we must show that there is always an unused \\( ithxvalue \\) or \\( jthyvalue \\) as needed. If \\( pebblepos \\leq 0 \\) and a revisit has not yet occurred, then one \\( ithxvalue \\) has been used after visiting each nonpositive position except the current one, so the total number of \\( ithxvalue \\)'s used so far is at most \\( 19-1=18 \\), and at least one \\( ithxvalue \\) remains. Similarly, if \\( pebblepos>0 \\) and a revisit has not yet occurred, then one \\( jthyvalue \\) has been used after visiting each positive position except the current one, so the total number of \\( jthyvalue \\)'s used so far is at most \\( 93-1=92 \\), and at least one \\( jthyvalue \\) remains.\n\nSince there are only finitely many \\( ithxvalue \\)'s and \\( jthyvalue \\)'s to be used, the algorithm must eventually terminate with a revisit. The steps between the two visits of the same position constitute a sum of some \\( ithxvalue \\)'s equal to a sum of some \\( jthyvalue \\)'s.\n\nOur next solution is similar to Solution 1, but we dispense with the algorithmic interpretation.\n\nSolution 2. For the sake of generality, replace 19 and 93 in the problem statement by \\( ylimitvalue \\) and \\( xlimitvalue \\) respectively. Define \\( kthcumulativesumx=\\sum_{indexi=1}^{indexk} ithxvalue \\) and \\( ellcumulativesumy=\\sum_{indexj=1}^{ellindex} jthyvalue \\). Without loss of generality, assume \\( mcumulativesumx \\geq ncumulativesumy \\). For \\( 1 \\leq ellindex \\leq xlimitvalue \\), define \\( functionf(ellindex) \\) by\n\\[\nfunctioncumulativex \\leq ellcumulativesumy<functioncumulativexplusone\n\\]\nso \\( 0 \\leq functionf(ellindex) \\leq ylimitvalue \\). Let \\( functiong(ellindex)=ellcumulativesumy-functioncumulativex \\). If \\( functiong(ellindex)=0 \\) for some \\( ellindex \\), we are done. Otherwise,\n\\[\nfunctiong(ellindex)=ellcumulativesumy-functioncumulativex<functionxplusone \\leq xlimitvalue,\n\\]\nso \\( 0<functiong(ellindex) \\leq xlimitvalue-1 \\) whenever \\( 1 \\leq ellindex \\leq xlimitvalue \\). Hence by the Pigeonhole Principle, there exist \\( ellindex_{0}<ellindex_{1} \\) such that \\( functiong\\left(ellindex_{0}\\right)=functiong\\left(ellindex_{1}\\right) \\). Then\n\\[\n\\sum_{indexi=functionf\\left(ellindex_{0}\\right)+1}^{functionf\\left(ellindex_{1}\\right)} ithxvalue=functioncumulativex-functioncumulativex=ellcumulativesumy-ellcumulativesumy=\\sum_{indexj=ellindex_{0}+1}^{ellindex_{1}} jthyvalue .\n\\]\n\nSolution 3 (based on an idea of Noam Elkies). With the same notation as in the previous solution, without loss of generality \\( mcumulativesumx \\geq ncumulativesumy \\). If equality holds, we are done, so assume \\( mcumulativesumx>ncumulativesumy \\). By the Pigeonhole Principle, two of the \\( (ylimitvalue+1)(xlimitvalue+1) \\) sums \\( ithcumulativesumx+jthcumulativesumy(0 \\leq indexi \\leq ylimitvalue, 0 \\leq indexj \\leq xlimitvalue) \\) are congruent modulo \\( mcumulativesumx \\), say\n\\[\ncumulativesumxone+cumulativesumyone \\equiv cumulativesumxtwo+cumulativesumytwo \\quad\\left(\\bmod mcumulativesumx\\right)\n\\]\n\nBut the difference\n\\[\n\\left(cumulativesumxone-cumulativesumxtwo\\right)+\\left(cumulativesumyone-cumulativesumytwo\\right)\n\\]\nlies strictly between \\( -2 mcumulativesumx \\) and \\( +2 mcumulativesumx \\), so it equals 0 or \\( \\pm mcumulativesumx \\). Clearly \\( firstindexi \\neq secondindexi \\); without loss of generality \\( firstindexi>secondindexi \\), so (1) equals 0 or \\( mcumulativesumx \\). If \\( firstindexj<secondindexj \\), then (1) must be 0, so \\( cumulativesumxone-cumulativesumxtwo=cumulativesumytwo-cumulativesumyone \\) are two equal subsums. If \\( firstindexj>secondindexj \\), then (1) must be \\( mcumulativesumx \\), and \\( cumulativesumyone-cumulativesumytwo=mcumulativesumx-\\left(cumulativesumxone-cumulativesumxtwo\\right) \\) are two equal subsums."
    },
    "descriptive_long_confusing": {
      "map": {
        "t": "kangaroo",
        "x": "saxophone",
        "x_i": "hedgehog",
        "x_f(\\\\ell)": "coastguard",
        "x_f(\\\\ell)+1": "toothbrush",
        "y": "watermelon",
        "y_j": "marshmallow",
        "X": "blueberry",
        "X_k": "chandelier",
        "X_i": "grasshopper",
        "X_i_1": "armadillo",
        "X_i_2": "platypus",
        "X_f(\\\\ell)": "schoolbus",
        "X_f(\\\\ell)+1": "tortoise",
        "X_m": "bubblegum",
        "Y": "pineapple",
        "Y_\\\\ell": "raspberry",
        "Y_n": "skateboard",
        "Y_j": "aftershock",
        "Y_j_1": "blacksmith",
        "Y_j_2": "peppermint",
        "i": "snowflake",
        "j": "bottleneck",
        "k": "driftwood",
        "f": "rainstorm",
        "g": "lighthouse",
        "\\\\ell": "windswept",
        "i_1": "grandmother",
        "i_2": "pinecones",
        "j_1": "firestone",
        "j_2": "dragonfly",
        "m": "cinnamon",
        "n": "lemonade"
      },
      "question": "which is less than or equal to 93. Let $watermelon_1, watermelon_2, \\dots, watermelon_{93}$ be\npositive integers each of which is less than or equal to 19. Prove that\nthere exists a (nonempty) sum of some $hedgehog$'s equal to a sum of some $marshmallow$'s.",
      "solution": "Solution 1. We move a pebble among positions numbered \\( -18,-17, \\ldots, 0,1 \\), \\( 2, \\ldots, 93 \\), until it revisits a location. The pebble starts at position 0. Thereafter, if the pebble is at position \\( kangaroo \\), we move it as follows. If \\( kangaroo \\leq 0 \\), choose some unused \\( hedgehog \\), move the pebble to \\( kangaroo+hedgehog \\), and then discard that \\( hedgehog \\). If \\( kangaroo>0 \\), choose some unused \\( marshmallow \\), move the pebble to \\( kangaroo-marshmallow \\), and then discard that \\( marshmallow \\). Since \\( hedgehog \\leq 93 \\) and \\( marshmallow \\leq 19 \\), the pebble's position stays between -18 and 93.\n\nIn order to continue this process until a location is revisited, we must show that there is always an unused \\( hedgehog \\) or \\( marshmallow \\) as needed. If \\( kangaroo \\leq 0 \\) and a revisit has not yet occurred, then one \\( hedgehog \\) has been used after visiting each nonpositive position except the current one, so the total number of \\( hedgehog \\)'s used so far is at most \\( 19-1=18 \\), and at least one \\( hedgehog \\) remains. Similarly, if \\( kangaroo>0 \\) and a revisit has not yet occurred, then one \\( marshmallow \\) has been used after visiting each positive position except the current one, so the total number of \\( marshmallow \\)'s used so far is at most \\( 93-1=92 \\), and at least one \\( marshmallow \\) remains.\n\nSince there are only finitely many \\( hedgehog \\)'s and \\( marshmallow \\)'s to be used, the algorithm must eventually terminate with a revisit. The steps between the two visits of the same position constitute a sum of some \\( hedgehog \\)'s equal to a sum of some \\( marshmallow \\)'s.\n\nOur next solution is similar to Solution 1, but we dispense with the algorithmic interpretation.\n\nSolution 2. For the sake of generality, replace 19 and 93 in the problem statement by \\( cinnamon \\) and \\( lemonade \\) respectively. Define \\( chandelier=\\sum_{snowflake=1}^{driftwood} hedgehog \\) and \\( raspberry=\\sum_{bottleneck=1}^{windswept} marshmallow \\). Without loss of generality, assume \\( bubblegum \\geq skateboard \\). For \\( 1 \\leq windswept \\leq lemonade \\), define \\( rainstorm(windswept) \\) by\n\\[\nschoolbus \\leq raspberry< tortoise\n\\]\nso \\( 0 \\leq rainstorm(windswept) \\leq cinnamon \\). Let \\( lighthouse(windswept)=raspberry-schoolbus \\). If \\( lighthouse(windswept)=0 \\) for some \\( windswept \\), we are done. Otherwise,\n\\[\nlighthouse(windswept)=raspberry-schoolbus<toothbrush \\leq lemonade,\n\\]\nso \\( 0<lighthouse(windswept) \\leq lemonade-1 \\) whenever \\( 1 \\leq windswept \\leq lemonade \\). Hence by the Pigeonhole Principle, there exist \\( \\ell_{0}<\\ell_{1} \\) such that \\( lighthouse\\left(\\ell_{0}\\right)=lighthouse\\left(\\ell_{1}\\right) \\). Then\n\\[\n\\sum_{snowflake=rainstorm\\left(\\ell_{0}\\right)+1}^{rainstorm\\left(\\ell_{1}\\right)} hedgehog\n= schoolbus - schoolbus\n= raspberry - raspberry\n= \\sum_{bottleneck=\\ell_{0}+1}^{\\ell_{1}} marshmallow .\n\\]\n\nSolution 3 (based on an idea of Noam Elkies). With the same notation as in the previous solution, without loss of generality \\( bubblegum \\geq skateboard \\). If equality holds, we are done, so assume \\( bubblegum>skateboard \\). By the Pigeonhole Principle, two of the \\( (cinnamon+1)(lemonade+1) \\) sums \\( grasshopper+aftershock(0 \\leq snowflake \\leq cinnamon, 0 \\leq bottleneck \\leq lemonade) \\) are congruent modulo \\( bubblegum \\), say\n\\[\narmadillo+blacksmith \\equiv platypus+peppermint \\quad\\left(\\bmod bubblegum\\right)\n\\]\n\nBut the difference\n\\[\n\\left(armadillo-platypus\\right)+\\left(blacksmith-peppermint\\right)\n\\]\nlies strictly between \\( -2 bubblegum \\) and \\( +2 bubblegum \\), so it equals 0 or \\( \\pm bubblegum \\). Clearly \\( grandmother \\neq pinecones \\); without loss of generality \\( grandmother>pinecones \\), so (1) equals 0 or \\( bubblegum \\). If \\( firestone<dragonfly \\), then (1) must be 0 , so \\( armadillo-platypus=peppermint-blacksmith \\) are two equal subsums. If \\( firestone>dragonfly \\), then (1) must be \\( bubblegum \\), and \\( blacksmith-peppermint=bubblegum-\\left(armadillo-platypus\\right) \\) are two equal subsums."
    },
    "descriptive_long_misleading": {
      "map": {
        "t": "staticspot",
        "x": "nonpositive",
        "x_i": "nonpositivesegment",
        "x_f(\\\\ell)": "nonpositivejump",
        "x_f(\\\\ell)+1": "nonpositiveleap",
        "y": "irrational",
        "y_j": "irrationalpiece",
        "X": "shortfall",
        "X_k": "shortfallstep",
        "X_i": "shortfallpart",
        "X_i_1": "shortfallalpha",
        "X_i_2": "shortfallbeta",
        "X_f(\\\\ell)": "shortfallmark",
        "X_f(\\\\ell)+1": "shortfallmarkplus",
        "X_m": "shortfallmax",
        "Y": "abundance",
        "Y_\\\\ell": "abundancestep",
        "Y_n": "abundancemax",
        "Y_j": "abundancepart",
        "Y_j_1": "abundancealpha",
        "Y_j_2": "abundancebeta",
        "i": "endpoint",
        "j": "startpoint",
        "k": "terminal",
        "f": "immutable",
        "g": "aggregate",
        "\\\\ell": "zenithal",
        "i_1": "endpointone",
        "i_2": "endpointtwo",
        "j_1": "startpointone",
        "j_2": "startpointtwo",
        "m": "minlimit",
        "n": "smalllimit"
      },
      "question": "which is less than or equal to 93. Let $y_1, y_2, \\dots, y_{93}$ be\npositive integers each of which is less than or equal to 19. Prove that\nthere exists a (nonempty) sum of some $nonpositivesegment$'s equal to a sum of some $irrationalpiece$'s.",
      "solution": "Solution 1. We move a pebble among positions numbered \\( -18,-17, \\ldots, 0,1 \\), \\( 2, \\ldots, 93 \\), until it revisits a location. The pebble starts at position 0. Thereafter, if the pebble is at position \\( staticspot \\), we move it as follows. If \\( staticspot \\leq 0 \\), choose some unused \\( nonpositivesegment \\), move the pebble to \\( staticspot+nonpositivesegment \\), and then discard that \\( nonpositivesegment \\). If \\( staticspot>0 \\), choose some unused \\( irrationalpiece \\), move the pebble to \\( staticspot-irrationalpiece \\), and then discard that \\( irrationalpiece \\). Since \\( nonpositivesegment \\leq 93 \\) and \\( irrationalpiece \\leq 19 \\), the pebble's position stays between -18 and 93.\n\nIn order to continue this process until a location is revisited, we must show that there is always an unused \\( nonpositivesegment \\) or \\( irrationalpiece \\) as needed. If \\( staticspot \\leq 0 \\) and a revisit has not yet occurred, then one \\( nonpositivesegment \\) has been used after visiting each nonpositive position except the current one, so the total number of \\( nonpositivesegment \\)'s used so far is at most \\( 19-1=18 \\), and at least one \\( nonpositivesegment \\) remains. Similarly, if \\( staticspot>0 \\) and a revisit has not yet occurred, then one \\( irrationalpiece \\) has been used after visiting each positive position except the current one, so the total number of \\( irrationalpiece \\)'s used so far is at most \\( 93-1=92 \\), and at least one \\( irrationalpiece \\) remains.\n\nSince there are only finitely many \\( nonpositivesegment \\)'s and \\( irrationalpiece \\)'s to be used, the algorithm must eventually terminate with a revisit. The steps between the two visits of the same position constitute a sum of some \\( nonpositivesegment \\)'s equal to a sum of some \\( irrationalpiece \\)'s.\n\nSolution 2. For the sake of generality, replace 19 and 93 in the problem statement by \\( minlimit \\) and \\( smalllimit \\) respectively. Define \\( shortfallstep=\\sum_{endpoint=1}^{terminal} nonpositivesegment \\) and \\( abundancestep=\\sum_{startpoint=1}^{zenithal} irrationalpiece \\). Without loss of generality, assume \\( shortfallmax \\geq abundancemax \\). For \\( 1 \\leq zenithal \\leq smalllimit \\), define \\( immutable(zenithal) \\) by\n\\[\nshortfallmark \\leq abundancestep < shortfallmarkplus\n\\]\nso \\( 0 \\leq immutable(zenithal) \\leq minlimit \\). Let \\( aggregate(zenithal)=abundancestep-shortfallmark \\). If \\( aggregate(zenithal)=0 \\) for some \\( zenithal \\), we are done. Otherwise,\n\\[\naggregate(zenithal)=abundancestep-shortfallmark<nonpositiveleap \\leq smalllimit,\n\\]\nso \\( 0<aggregate(zenithal) \\leq smalllimit-1 \\) whenever \\( 1 \\leq zenithal \\leq smalllimit \\). Hence by the Pigeonhole Principle, there exist \\( zenithal_{0}<zenithal_{1} \\) such that \\( aggregate\\left(zenithal_{0}\\right)=aggregate\\left(zenithal_{1}\\right) \\). Then\n\\[\n\\sum_{endpoint=immutable\\left(zenithal_{0}\\right)+1}^{immutable\\left(zenithal_{1}\\right)} nonpositivesegment\n = shortfall_{immutable\\left(zenithal_{1}\\right)}-shortfall_{immutable\\left(zenithal_{0}\\right)}\n = abundance_{zenithal_{1}}-abundance_{zenithal_{0}}\n = \\sum_{startpoint=zenithal_{0}+1}^{zenithal_{1}} irrationalpiece .\n\\]\n\nSolution 3 (based on an idea of Noam Elkies). With the same notation as in the previous solution, without loss of generality \\( shortfallmax \\geq abundancemax \\). If equality holds, we are done, so assume \\( shortfallmax>abundancemax \\). By the Pigeonhole Principle, two of the \\( (minlimit+1)(smalllimit+1) \\) sums \\( shortfall_{endpoint}+abundance_{startpoint}(0 \\leq endpoint \\leq minlimit, 0 \\leq startpoint \\leq smalllimit) \\) are congruent modulo \\( shortfallmax \\), say\n\\[\nshortfallalpha+abundancealpha \\equiv shortfallbeta+abundancebeta \\quad\\left(\\bmod shortfallmax\\right)\n\\]\n\nBut the difference\n\\[\n\\left(shortfallalpha-shortfallbeta\\right)+\\left(abundancealpha-abundancebeta\\right)\n\\]\nlies strictly between \\( -2\\,shortfallmax \\) and \\( +2\\,shortfallmax \\), so it equals 0 or \\( \\pm shortfallmax \\). Clearly \\( endpointone \\neq endpointtwo \\); without loss of generality \\( endpointone>endpointtwo \\), so (1) equals 0 or \\( shortfallmax \\). If \\( startpointone<startpointtwo \\), then (1) must be 0, so \\( shortfallalpha-shortfallbeta=abundancebeta-abundancealpha \\) are two equal subsums. If \\( startpointone>startpointtwo \\), then (1) must be \\( shortfallmax \\), and \\( abundancealpha-abundancebeta=shortfallmax-\\left(shortfall_{startpointone}-shortfall_{startpointtwo}\\right) \\) are two equal subsums."
    },
    "garbled_string": {
      "map": {
        "t": "qzxwvtnpo",
        "x": "hjgrkslab",
        "x_i": "nqcjowpzx",
        "x_f(\\\\ell)": "bxtvsqleo",
        "x_f(\\\\ell)+1": "ojdcnwxpa",
        "y": "pruyxopnm",
        "y_j": "lgdwmqzha",
        "X": "sreplmfaq",
        "X_k": "kptznhswe",
        "X_i": "zdclqxarb",
        "X_i_1": "ctmlasvqe",
        "X_i_2": "voqrkjdym",
        "X_f(\\\\ell)": "qardlsynt",
        "X_f(\\\\ell)+1": "ybenwocsr",
        "X_m": "wksbdmefa",
        "Y": "fhqvcytad",
        "Y_\\\\ell": "jmqvnesor",
        "Y_n": "pzlvcroam",
        "Y_j": "xdqmveyhr",
        "Y_j_1": "lhqusdxwp",
        "Y_j_2": "gkmyrfzea",
        "i": "rjkvhseon",
        "j": "wzrtgploc",
        "k": "btnhaxmre",
        "f": "qpsdnrlcm",
        "g": "toqmzlvuh",
        "\\\\ell": "uakjrwfem",
        "i_1": "plxwabmsq",
        "i_2": "hqskzdnvw",
        "j_1": "urnpoxvcb",
        "j_2": "vdwyrlqjf",
        "m": "nhrpzqkwe",
        "n": "cbetlxdyo"
      },
      "question": "which is less than or equal to 93. Let $pruyxopnm_1, pruyxopnm_2, \\dots, pruyxopnm_{93}$ be\npositive integers each of which is less than or equal to 19. Prove that\nthere exists a (nonempty) sum of some $nqcjowpzx$'s equal to a sum of some $lgdwmqzha$'s.",
      "solution": "Solution 1. We move a pebble among positions numbered \\( -18,-17, \\ldots, 0,1 \\), \\( 2, \\ldots, 93 \\), until it revisits a location. The pebble starts at position 0. Thereafter, if the pebble is at position \\( qzxwvtnpo \\), we move it as follows. If \\( qzxwvtnpo \\leq 0 \\), choose some unused \\( hjgrkslab_{rjkvhseon} \\), move the pebble to \\( qzxwvtnpo+hjgrkslab_{rjkvhseon} \\), and then discard that \\( hjgrkslab_{rjkvhseon} \\). If \\( qzxwvtnpo>0 \\), choose some unused \\( pruyxopnm_{wzrtgploc} \\), move the pebble to \\( qzxwvtnpo-pruyxopnm_{wzrtgploc} \\), and then discard that \\( pruyxopnm_{wzrtgploc} \\). Since \\( hjgrkslab_{rjkvhseon} \\leq 93 \\) and \\( pruyxopnm_{wzrtgploc} \\leq 19 \\), the pebble's position stays between -18 and 93.\n\nIn order to continue this process until a location is revisited, we must show that there is always an unused \\( hjgrkslab_{rjkvhseon} \\) or \\( pruyxopnm_{wzrtgploc} \\) as needed. If \\( qzxwvtnpo \\leq 0 \\) and a revisit has not yet occurred, then one \\( hjgrkslab_{rjkvhseon} \\) has been used after visiting each nonpositive position except the current one, so the total number of \\( hjgrkslab_{rjkvhseon} \\)'s used so far is at most \\( 19-1=18 \\), and at least one \\( hjgrkslab_{rjkvhseon} \\) remains. Similarly, if \\( qzxwvtnpo>0 \\) and a revisit has not yet occurred, then one \\( pruyxopnm_{wzrtgploc} \\) has been used after visiting each positive position except the current one, so the total number of \\( pruyxopnm_{wzrtgploc} \\)'s used so far is at most \\( 93-1=92 \\), and at least one \\( pruyxopnm_{wzrtgploc} \\) remains.\n\nSince there are only finitely many \\( hjgrkslab_{rjkvhseon} \\)'s and \\( pruyxopnm_{wzrtgploc} \\)'s to be used, the algorithm must eventually terminate with a revisit. The steps between the two visits of the same position constitute a sum of some \\( hjgrkslab_{rjkvhseon} \\)'s equal to a sum of some \\( pruyxopnm_{wzrtgploc} \\)'s.\n\nOur next solution is similar to Solution 1, but we dispense with the algorithmic interpretation.\n\nSolution 2. For the sake of generality, replace 19 and 93 in the problem statement by \\( nhrpzqkwe \\) and \\( cbetlxdyo \\) respectively. Define \\( sreplmfaq_{btnhaxmre}=\\sum_{rjkvhseon=1}^{btnhaxmre} hjgrkslab_{rjkvhseon} \\) and \\( fhqvcytad_{uakjrwfem}=\\sum_{wzrtgploc=1}^{uakjrwfem} pruyxopnm_{wzrtgploc} \\). Without loss of generality, assume \\( sreplmfaq_{nhrpzqkwe} \\geq fhqvcytad_{cbetlxdyo} \\). For \\( 1 \\leq uakjrwfem \\leq cbetlxdyo \\), define \\( qpsdnrlcm(uakjrwfem) \\) by\n\\[\nsreplmfaq_{qpsdnrlcm(uakjrwfem)} \\leq fhqvcytad_{uakjrwfem}<sreplmfaq_{qpsdnrlcm(uakjrwfem)+1}\n\\]\nso \\( 0 \\leq qpsdnrlcm(uakjrwfem) \\leq nhrpzqkwe \\). Let \\( toqmzlvuh(uakjrwfem)=fhqvcytad_{uakjrwfem}-sreplmfaq_{qpsdnrlcm(uakjrwfem)} \\). If \\( toqmzlvuh(uakjrwfem)=0 \\) for some \\( uakjrwfem \\), we are done. Otherwise,\n\\[\ntoqmzlvuh(uakjrwfem)=fhqvcytad_{uakjrwfem}-sreplmfaq_{qpsdnrlcm(uakjrwfem)}<hjgrkslab_{qpsdnrlcm(uakjrwfem)+1} \\leq cbetlxdyo,\n\\]\nso \\( 0<toqmzlvuh(uakjrwfem) \\leq cbetlxdyo-1 \\) whenever \\( 1 \\leq uakjrwfem \\leq cbetlxdyo \\). Hence by the Pigeonhole Principle, there exist \\( uakjrwfem_{0}<uakjrwfem_{1} \\) such that \\( toqmzlvuh\\left(uakjrwfem_{0}\\right)=toqmzlvuh\\left(uakjrwfem_{1}\\right) \\). Then\n\\[\n\\sum_{rjkvhseon=qpsdnrlcm\\left(uakjrwfem_{0}\\right)+1}^{qpsdnrlcm\\left(uakjrwfem_{1}\\right)} hjgrkslab_{rjkvhseon}=sreplmfaq_{qpsdnrlcm\\left(uakjrwfem_{1}\\right)}-sreplmfaq_{qpsdnrlcm\\left(uakjrwfem_{0}\\right)}=fhqvcytad_{uakjrwfem_{1}}-fhqvcytad_{uakjrwfem_{0}}=\\sum_{wzrtgploc=uakjrwfem_{0}+1}^{uakjrwfem_{1}} pruyxopnm_{wzrtgploc} .\n\\]\n\nSolution 3 (based on an idea of Noam Elkies). With the same notation as in the previous solution, without loss of generality \\( sreplmfaq_{nhrpzqkwe} \\geq fhqvcytad_{cbetlxdyo} \\). If equality holds, we are done, so assume \\( sreplmfaq_{nhrpzqkwe}>fhqvcytad_{cbetlxdyo} \\). By the Pigeonhole Principle, two of the \\( (nhrpzqkwe+1)(cbetlxdyo+1) \\) sums \\( sreplmfaq_{rjkvhseon}+fhqvcytad_{wzrtgploc}(0 \\leq rjkvhseon \\leq nhrpzqkwe, 0 \\leq wzrtgploc \\leq cbetlxdyo) \\) are congruent modulo \\( sreplmfaq_{nhrpzqkwe} \\), say\n\\[\nsreplmfaq_{plxwabmsq}+fhqvcytad_{urnpoxvcb} \\equiv sreplmfaq_{hqskzdnvw}+fhqvcytad_{vdwyrlqjf} \\quad\\left(\\bmod sreplmfaq_{nhrpzqkwe}\\right)\n\\]\n\nBut the difference\n\\[\n\\left(sreplmfaq_{plxwabmsq}-sreplmfaq_{hqskzdnvw}\\right)+\\left(fhqvcytad_{urnpoxvcb}-fhqvcytad_{vdwyrlqjf}\\right)\n\\]\nlies strictly between \\( -2\\,sreplmfaq_{nhrpzqkwe} \\) and \\( +2\\,sreplmfaq_{nhrpzqkwe} \\), so it equals 0 or \\( \\pm\\,sreplmfaq_{nhrpzqkwe} \\). Clearly \\( plxwabmsq \\neq hqskzdnvw \\); without loss of generality \\( plxwabmsq>hqskzdnvw \\), so (1) equals 0 or \\( sreplmfaq_{nhrpzqkwe} \\). If \\( urnpoxvcb<vdwyrlqjf \\), then (1) must be 0, so \\( sreplmfaq_{plxwabmsq}-sreplmfaq_{hqskzdnvw}=fhqvcytad_{vdwyrlqjf}-fhqvcytad_{urnpoxvcb} \\) are two equal subsums. If \\( urnpoxvcb>vdwyrlqjf \\), then (1) must be \\( sreplmfaq_{nhrpzqkwe} \\), and \\( fhqvcytad_{urnpoxvcb}-fhqvcytad_{vdwyrlqjf}=sreplmfaq_{nhrpzqkwe}-\\left(sreplmfaq_{plxwabmsq}-sreplmfaq_{hqskzdnvw}\\right) \\) are two equal subsums."
    },
    "kernel_variant": {
      "question": "Let $x_{1},x_{2},\\dots ,x_{31}$ be positive integers, each at most $97$.  Let $y_{1},y_{2},\\dots ,y_{97}$ be positive integers, each at most $31$.  Prove that there exist (not necessarily disjoint) non-empty index sets $I\\subseteq\\{1,2,\\dots ,31\\}$ and $J\\subseteq\\{1,2,\\dots ,97\\}$ such that\n\\[\n\\sum_{i\\in I}x_i\\;=\\;\\sum_{j\\in J}y_j.\n\\]",
      "solution": "We prove that among 31 positive integers x₁,…,x₃₁ (each ≤97) and 97 positive integers y₁,…,y₉₇ (each ≤31), there are nonempty I⊆{1,…,31}, J⊆{1,…,97} with ∑_{i∈I}xᵢ = ∑_{j∈J}yⱼ.  The “pebble‐walk” argument is:\n\nStep 1 (Bounded state space).  We place a pebble on the integer line and keep track of its current coordinate t, always maintaining –30 ≤ t ≤ 97.  Indeed, if t ≤ 0 we only ever add some xᵢ ≤ 97, so t + xᵢ ≤ 97; if t > 0 we subtract some yⱼ ≤ 31, and the smallest possible result is 1–31 = –30.  Thus the pebble’s state always lies in the 128 positions {–30,–29,…,–1,0,1,…,97}.\n\nStep 2 (Walking rule).  Start the pebble at t = 0.  Repeatedly do:\n – If t ≤ 0, pick an unused xᵢ, move t ← t + xᵢ, and discard that xᵢ.\n – If t > 0, pick an unused yⱼ, move t ← t – yⱼ, and discard that yⱼ.\nEach move keeps t in [–30,97].\n\nStep 3 (Always a legal move until repetition).  Suppose we have not yet revisited any position, and the pebble now sits at some t ≤ 0.  Every earlier visit to a nonpositive state (–30…0) other than this current one has been left by adding an x‐move, so each such visit consumed one distinct xᵢ.  Since there are 31 total nonpositive states, there can have been at most 30 earlier visits aside from the current state, hence at most 30 of the 31 xᵢ’s have been used.  Therefore at least one unused xᵢ remains, so we can still make a move.  A symmetric argument shows that if t > 0, at most 96 of the 97 yⱼ’s have been used, so we can still subtract some unused yⱼ.\n\nStep 4 (Forced repetition).  The pebble runs forever unless it revisits a state.  But there are only 128 possible states in [–30,97] and at each step we either consume a new xᵢ or a new yⱼ; since there are only finitely many of those, eventually some state must repeat, closing a cycle.\n\nStep 5 (Extracting equal subsums).  Focus on the first time the pebble returns to a previously seen position.  Between these two visits there is a closed loop of moves; on that loop each move from t ≤ 0 contributes +xᵢ, each from t > 0 contributes –yⱼ, and the total signed change is zero (since the loop returns to its start).  Hence\n  ∑(those xᵢ used in the loop)  =  ∑(those yⱼ used in the loop).\nMoreover at least one move occurs in that loop, so each side of the equality is a nonempty subsum of the x’s or y’s.  This completes the proof.",
      "_meta": {
        "core_steps": [
          "Define a bounded state (pebble position or g-value) whose limits come from the opposite sequence’s maximal term.",
          "Advance through unused x’s when the state is non-positive and through unused y’s when it is positive, keeping the state within the fixed bounds.",
          "Argue that at every step at least one required term is still unused and that the finite set of possible states must eventually repeat (Pigeonhole Principle).",
          "Identify the segment between the two visits to the same state.",
          "Translate that segment into a non-empty subset–sum of x’s equalling a subset–sum of y’s."
        ],
        "mutable_slots": {
          "slot1": {
            "description": "Total number of x_i terms (called m in the generalized proof)",
            "original": 19
          },
          "slot2": {
            "description": "Total number of y_j terms (called n in the generalized proof)",
            "original": 93
          },
          "slot3": {
            "description": "Upper bound on every x_i (taken to be n in the generalized version)",
            "original": 93
          },
          "slot4": {
            "description": "Upper bound on every y_j (taken to be m in the generalized version)",
            "original": 19
          }
        }
      }
    }
  },
  "checked": true,
  "problem_type": "proof"
}