{
  "index": "2005-B-6",
  "type": "COMB",
  "tag": [
    "COMB",
    "ALG",
    "ANA",
    "NT"
  ],
  "difficulty": "",
  "question": "Let $S_n$ denote the set of all permutations of the numbers $1,2,\\dots,n$.\nFor $\\pi \\in S_n$, let $\\sigma(\\pi) = 1$ if $\\pi$ is an even permutation\nand $\\sigma(\\pi) = -1$ if $\\pi$ is an odd permutation.\nAlso, let $\\nu(\\pi)$ denote the number of fixed points of $\\pi$.\nShow that\n\\[\n\\sum_{\\pi \\in S_n} \\frac{\\sigma(\\pi)}{\\nu(\\pi) + 1} = (-1)^{n+1}\n\\frac{n}{n+1}.\n\\]\n\\end{itemize}\n\\end{document}",
  "solution": "\\textbf{First solution:}\nLet $I$ be the identity matrix, and let\n$J_x$ be the matrix with $x$'s on the diagonal and 1's elsewhere.\nNote that $J_x - (x-1)I$, being the all 1's matrix, has rank 1 and trace $n$,\nso has $n-1$ eigenvalues equal to 0 and one equal to $n$.\nHence $J_x$ has $n-1$ eigenvalues equal to $x-1$ and one equal to $x+n-1$,\nimplying\n\\[\n\\det J_x = (x+n-1)(x-1)^{n-1}.\n\\]\nOn the other hand, we may expand the determinant as a sum indexed by\npermutations, in which case we get\n\\[\n\\det J_x = \\sum_{\\pi \\in S_n} \\sgn(\\pi) x^{\\nu(\\pi)}.\n\\]\nIntegrating both sides from 0 to 1 (and substituting $y=1-x$) yields\n\\begin{align*}\n\\sum_{\\pi \\in S_n} \\frac{\\sgn(\\pi)}{\\nu(\\pi) + 1}\n&= \\int_0^1 (x+n-1)(x-1)^{n-1}\\,dx \\\\\n&= \\int_0^1 (-1)^{n+1} (n-y)y^{n-1}\\,dy \\\\\n&= (-1)^{n+1} \\frac{n}{n+1},\n\\end{align*}\nas desired.\n\n\\textbf{Second solution:}\nWe start by recalling a form of the principle of inclusion-exclusion:\nif $f$ is a function on the power set of $\\{1, \\dots, n\\}$, then\n\\[\nf(S) = \\sum_{T \\supseteq S} (-1)^{|T|-|S|} \\sum_{U \\supseteq T} f(U).\n\\]\nIn this case we take $f(S)$ to be the sum of $\\sigma(\\pi)$\nover all permutations $\\pi$ whose fixed points are exactly $S$.\nThen $\\sum_{U \\supseteq T} f(U) = 1$ if $|T| \\geq n-1$\nand 0 otherwise (since a permutation group on 2 or more symbols has as many even and odd permutations), so\n\\[\nf(S) = (-1)^{n-|S|}(1 - n + |S|).\n\\]\nThe desired sum can thus be written, by grouping over fixed point sets, as\n\\begin{multline*}\n\\sum_{i=0}^n \\binom{n}{i} (-1)^{n-i} \\frac{1-n+i}{i+1} \\\\\n\\begin{aligned}\n&= \\sum_{i=0}^n (-1)^{n-i} \\binom{n}{i} - \\sum_{i=0}^n (-1)^{n-i} \\frac{n}{i+1}\n\\binom{n}{i} \\\\\n&= 0 - \\sum_{i=0}^n (-1)^{n-i} \\frac{n}{n+1} \\binom{n+1}{i+1} \\\\\n&= (-1)^{n+1} \\frac{n}{n+1}.\n\\end{aligned}\n\\end{multline*}\n\n\\textbf{Third solution:}\n(by Richard Stanley)\nThe \\emph{cycle indicator} of the symmetric group $S_n$ is defined by\n\\[\nZ_n(x_1, \\dots, x_n) = \\sum_{\\pi \\in S_n} x_1^{c_1(\\pi)} \\cdots x_n^{c_n(\\pi)},\n\\]\nwhere $c_i(\\pi)$ is the number of cycles of $\\pi$ of length $i$.\nPut\n\\[\nF_n = \\sum_{\\pi \\in S_n} \\sigma(\\pi) x^{\\nu(\\pi)} =\nZ_n(x,-1,1,-1,1,\\dots)\n\\]\nand\n\\[\nf(n) =  \\sum_{\\pi \\in S_n} \\frac{\\sigma(\\pi)}{\\nu(\\pi) + 1}\n= \\int_0^1 F_n(x)\\,dx.\n\\]\nA standard argument in enumerative combinatorics (the\nExponential Formula) gives\n\\[\n\\sum_{n=0}^\\infty Z_n(x_1,\\dots,x_n) \\frac{t^n}{n!}\n= \\exp \\sum_{k=1}^{\\infty} x_k \\frac{t^k}{k},\n\\]\nyielding\n\\begin{align*}\n\\sum_{n=0}^\\infty\nf(n) \\frac{t^n}{n!} &= \\int_0^1 \\exp \\left( xt - \\frac{t^2}{2}\n+ \\frac{t^3}{3} - \\cdots \\right)\\,dx \\\\\n&= \\int_0^1 e^{(x-1)t + \\log(1+t)}\\,dx \\\\\n&= \\int_0^1 (1+t) e^{(x-1)t}\\,dx \\\\\n&= \\frac{1}{t} (1-e^{-t}) (1+t).\n\\end{align*}\nExpanding the right side as a Taylor series and comparing coefficients\nyields the desired result.\n\n\\textbf{Fourth solution (sketch):}\n(by David Savitt)\nWe prove the identity of rational functions\n\\[\n\\sum_{\\pi \\in S_n} \\frac{\\sigma(\\pi)}{\\nu(\\pi) + x}\n= \\frac{(-1)^{n+1} n! (x+n-1)}{x(x+1)\\cdots(x+n)}\n\\]\nby induction on $n$, which for $x=1$ implies the desired result.\n(This can also be deduced as in the other solutions, but in this argument\nit is necessary to formulate the strong induction hypothesis.)\n\nLet $R(n,x)$ be the right hand side of the above equation. It is\neasy to verify that\n\\begin{align*}\nR(x,n) &= R(x+1,n-1) + (n-1)! \\frac{(-1)^{n+1}}{x} \\\\\n&\\qquad + \\sum_{l=2}^{n-1} (-1)^{l-1}  \\frac{(n-1)!}{(n-l)!} R(x,n-l),\n\\end{align*}\nsince the sum telescopes. To prove the desired equality,\nit suffices to show that the left hand side satisfies the same\nrecurrence. This follows because we can classify each $\\pi \\in S_n$\nas either fixing $n$, being an $n$-cycle, or having $n$ in an\n$l$-cycle for one of $l=2,\\dots,n-1$; writing the sum\nover these classes gives the desired recurrence.\n\n\\end{itemize}\n\n\n\\end{document}",
  "vars": [
    "S",
    "S_n",
    "\\\\pi",
    "\\\\sigma",
    "\\\\nu",
    "I",
    "J_x",
    "x",
    "y",
    "Z_n",
    "F_n",
    "f",
    "c_i",
    "x_k",
    "x_1",
    "x_n",
    "t",
    "k",
    "i",
    "T",
    "U"
  ],
  "params": [
    "n"
  ],
  "sci_consts": [
    "e"
  ],
  "variants": {
    "descriptive_long": {
      "map": {
        "S": "setvar",
        "S_n": "permset",
        "\\pi": "permvar",
        "\\sigma": "parities",
        "\\nu": "fixedcount",
        "I": "identity",
        "J_x": "onesmatrix",
        "x": "variablex",
        "y": "variabley",
        "Z_n": "cycleindicator",
        "F_n": "generating",
        "f": "functionf",
        "c_i": "cyclecount",
        "x_k": "variablek",
        "x_1": "variableone",
        "x_n": "variablen",
        "t": "variablet",
        "k": "indexk",
        "i": "indexi",
        "T": "subsett",
        "U": "subsetu",
        "n": "sizeparam"
      },
      "question": "Problem:\nLet $permset$ denote the set of all permutations of the numbers $1,2,\\dots,sizeparam$.\nFor $permvar \\in permset$, let $parities(permvar) = 1$ if $permvar$ is an even permutation\nand $parities(permvar) = -1$ if $permvar$ is an odd permutation.\nAlso, let $fixedcount(permvar)$ denote the number of fixed points of $permvar$.\nShow that\n\\[\n\\sum_{permvar \\in permset} \\frac{parities(permvar)}{fixedcount(permvar) + 1} = (-1)^{sizeparam+1}\n\\frac{sizeparam}{sizeparam+1}.\n\\]",
      "solution": "\\textbf{First solution:}\nLet $identity$ be the identity matrix, and let\n$onesmatrix$ be the matrix with $variablex$'s on the diagonal and 1's elsewhere.\nNote that $onesmatrix - (variablex-1)identity$, being the all 1's matrix, has rank 1 and trace $sizeparam$,\nso has $sizeparam-1$ eigenvalues equal to 0 and one equal to $sizeparam$.\nHence $onesmatrix$ has $sizeparam-1$ eigenvalues equal to $variablex-1$ and one equal to $variablex+sizeparam-1$,\nimplying\n\\[\n\\det onesmatrix = (variablex+sizeparam-1)(variablex-1)^{sizeparam-1}.\n\\]\nOn the other hand, we may expand the determinant as a sum indexed by\npermutations, in which case we get\n\\[\n\\det onesmatrix = \\sum_{permvar \\in permset} \\sgn(permvar) \\, variablex^{fixedcount(permvar)}.\n\\]\nIntegrating both sides from 0 to 1 (and substituting $variabley=1-variablex$) yields\n\\begin{align*}\n\\sum_{permvar \\in permset} \\frac{\\sgn(permvar)}{fixedcount(permvar) + 1}\n&= \\int_0^1 (variablex+sizeparam-1)(variablex-1)^{sizeparam-1}\\,dvariablex \\\\\n&= \\int_0^1 (-1)^{sizeparam+1} (sizeparam-variabley)\\, variabley^{sizeparam-1}\\,dvariabley \\\\\n&= (-1)^{sizeparam+1} \\frac{sizeparam}{sizeparam+1},\n\\end{align*}\nas desired.\n\n\\textbf{Second solution:}\nWe start by recalling a form of the principle of inclusion–exclusion:\nif $functionf$ is a function on the power set of $\\{1, \\dots, sizeparam\\}$, then\n\\[\nfunctionf(setvar) = \\sum_{subsett \\supseteq setvar} (-1)^{|subsett|-|setvar|}\n\\sum_{subsetu \\supseteq subsett} functionf(subsetu).\n\\]\nIn this case we take $functionf(setvar)$ to be the sum of $parities(permvar)$\nover all permutations $permvar$ whose fixed points are exactly $setvar$.\nThen $\\sum_{subsetu \\supseteq subsett} functionf(subsetu) = 1$ if $|subsett| \\geq sizeparam-1$\nand 0 otherwise (since a permutation group on 2 or more symbols has as many even and odd permutations), so\n\\[\nfunctionf(setvar) = (-1)^{sizeparam-|setvar|}(1 - sizeparam + |setvar|).\n\\]\nThe desired sum can thus be written, by grouping over fixed-point sets, as\n\\begin{multline*}\n\\sum_{indexi=0}^{sizeparam} \\binom{sizeparam}{indexi} (-1)^{sizeparam-indexi} \\frac{1-sizeparam+indexi}{indexi+1} \\\\\n\\begin{aligned}\n&= \\sum_{indexi=0}^{sizeparam} (-1)^{sizeparam-indexi} \\binom{sizeparam}{indexi}\n- \\sum_{indexi=0}^{sizeparam} (-1)^{sizeparam-indexi} \\frac{sizeparam}{indexi+1}\n\\binom{sizeparam}{indexi} \\\\\n&= 0 - \\sum_{indexi=0}^{sizeparam} (-1)^{sizeparam-indexi} \\frac{sizeparam}{sizeparam+1}\n\\binom{sizeparam+1}{indexi+1} \\\\\n&= (-1)^{sizeparam+1} \\frac{sizeparam}{sizeparam+1}.\n\\end{aligned}\n\\end{multline*}\n\n\\textbf{Third solution:}\n(by Richard Stanley)\nThe \\emph{cycle indicator} of the symmetric group $S_{sizeparam}$ is defined by\n\\[\ncycleindicator(variableone, \\dots, variablen) = \\sum_{permvar \\in permset}\nvariableone^{cyclecount(permvar)} \\cdots variablen^{cyclecount(permvar)},\n\\]\nwhere $cyclecount(permvar)$ is the number of cycles of $permvar$ of length $indexi$.\nPut\n\\[\ngenerating = \\sum_{permvar \\in permset} parities(permvar)\\, variablex^{fixedcount(permvar)}\n= cycleindicator(variablex,-1,1,-1,1,\\dots)\n\\]\nand\n\\[\nfunctionf(sizeparam) =  \\sum_{permvar \\in permset} \\frac{parities(permvar)}{fixedcount(permvar) + 1}\n= \\int_0^1 generating\\,dvariablex.\n\\]\nA standard argument in enumerative combinatorics (the\nExponential Formula) gives\n\\[\n\\sum_{sizeparam=0}^\\infty cycleindicator(variableone,\\dots,variablen)\n\\frac{variablet^{sizeparam}}{sizeparam!}\n= \\exp \\sum_{indexk=1}^{\\infty} variablek \\frac{variablet^{indexk}}{indexk},\n\\]\nyielding\n\\begin{align*}\n\\sum_{sizeparam=0}^\\infty\nfunctionf(sizeparam) \\frac{variablet^{sizeparam}}{sizeparam!} &=\n\\int_0^1 \\exp \\left( variablex\\,variablet - \\frac{variablet^2}{2}\n+ \\frac{variablet^3}{3} - \\cdots \\right)\\,dvariablex \\\\\n&= \\int_0^1 e^{(variablex-1)variablet + \\log(1+variablet)}\\,dvariablex \\\\\n&= \\int_0^1 (1+variablet) e^{(variablex-1)variablet}\\,dvariablex \\\\\n&= \\frac{1}{variablet} \\bigl(1-e^{-variablet}\\bigr) (1+variablet).\n\\end{align*}\nExpanding the right side as a Taylor series and comparing coefficients\nyields the desired result.\n\n\\textbf{Fourth solution (sketch):}\n(by David Savitt)\nWe prove the identity of rational functions\n\\[\n\\sum_{permvar \\in permset} \\frac{parities(permvar)}{fixedcount(permvar) + variablex}\n= \\frac{(-1)^{sizeparam+1} sizeparam! (variablex+sizeparam-1)}{variablex(variablex+1)\\cdots(variablex+sizeparam)}\n\\]\nby induction on $sizeparam$, which for $variablex=1$ implies the desired result.\n(This can also be deduced as in the other solutions, but in this argument\nit is necessary to formulate the strong induction hypothesis.)\n\nLet $R(sizeparam,variablex)$ be the right-hand side of the above equation. It is\neasy to verify that\n\\begin{align*}\nR(variablex,sizeparam) &= R(variablex+1,sizeparam-1) + (sizeparam-1)!\n\\frac{(-1)^{sizeparam+1}}{variablex} \\\\\n&\\qquad + \\sum_{l=2}^{sizeparam-1} (-1)^{l-1}  \\frac{(sizeparam-1)!}{(sizeparam-l)!}\nR(variablex,sizeparam-l),\n\\end{align*}\nsince the sum telescopes. To prove the desired equality,\nit suffices to show that the left-hand side satisfies the same\nrecurrence. This follows because we can classify each $permvar \\in permset$\nas either fixing $sizeparam$, being a $sizeparam$-cycle, or having $sizeparam$ in an\n$l$-cycle for one of $l=2,\\dots,sizeparam-1$; writing the sum\nover these classes gives the desired recurrence.\n\n\\end{itemize}\n\n\\end{document}"
    },
    "descriptive_long_confusing": {
      "map": {
        "S": "windmilltoy",
        "S_n": "windmilltoynum",
        "\\\\sigma": "boardwalk",
        "\\\\nu": "tailspin",
        "I": "spaceship",
        "J_x": "distillery",
        "x": "lemonjuice",
        "y": "raincloud",
        "Z_n": "snowglobe",
        "F_n": "mousetrap",
        "f": "dragonfly",
        "c_i": "cornflower",
        "x_k": "buttercup",
        "x_1": "sugarcane",
        "x_n": "jaguarundi",
        "t": "bluewhale",
        "k": "scarecrow",
        "i": "earthworm",
        "T": "riverbank",
        "U": "arrowshaft",
        "n": "goldthread"
      },
      "question": "Let $windmilltoynum$ denote the set of all permutations of the numbers $1,2,\\dots,goldthread$.\nFor $\\pi \\in windmilltoynum$, let $boardwalk(\\pi) = 1$ if $\\pi$ is an even permutation\nand $boardwalk(\\pi) = -1$ if $\\pi$ is an odd permutation.\nAlso, let $tailspin(\\pi)$ denote the number of fixed points of $\\pi$.\nShow that\n\\[\n\\sum_{\\pi \\in windmilltoynum} \\frac{boardwalk(\\pi)}{tailspin(\\pi) + 1} = (-1)^{goldthread+1}\n\\frac{goldthread}{goldthread+1}.\n\\]\n\\end{itemize}\n\\end{document}",
      "solution": "\\textbf{First solution:}\nLet $spaceship$ be the identity matrix, and let\n$distillery$ be the matrix with lemonjuice's on the diagonal and 1's elsewhere.\nNote that $distillery - (lemonjuice-1)spaceship$, being the all 1's matrix, has rank 1 and trace goldthread,\nso has goldthread-1 eigenvalues equal to 0 and one equal to goldthread.\nHence $distillery$ has goldthread-1 eigenvalues equal to lemonjuice-1 and one equal to lemonjuice+goldthread-1,\nimplying\n\\[\n\\det distillery = (lemonjuice+goldthread-1)(lemonjuice-1)^{goldthread-1}.\n\\]\nOn the other hand, we may expand the determinant as a sum indexed by\npermutations, in which case we get\n\\[\n\\det distillery = \\sum_{\\pi \\in windmilltoynum} \\sgn(\\pi) lemonjuice^{tailspin(\\pi)}.\n\\]\nIntegrating both sides from 0 to 1 (and substituting raincloud=1-lemonjuice) yields\n\\begin{align*}\n\\sum_{\\pi \\in windmilltoynum} \\frac{\\sgn(\\pi)}{tailspin(\\pi) + 1}\n&= \\int_0^1 (lemonjuice+goldthread-1)(lemonjuice-1)^{goldthread-1}\\,dlemonjuice \\\\\n&= \\int_0^1 (-1)^{goldthread+1} (goldthread-raincloud)raincloud^{goldthread-1}\\,draincloud \\\\\n&= (-1)^{goldthread+1} \\frac{goldthread}{goldthread+1},\n\\end{align*}\nas desired.\n\n\\textbf{Second solution:}\nWe start by recalling a form of the principle of inclusion-exclusion:\nif $dragonfly$ is a function on the power set of $\\{1, \\dots, goldthread\\}$, then\n\\[\ndragonfly(windmilltoy) = \\sum_{riverbank \\supseteq windmilltoy} (-1)^{|riverbank|-|windmilltoy|} \\sum_{arrowshaft \\supseteq riverbank} dragonfly(arrowshaft).\n\\]\nIn this case we take $dragonfly(windmilltoy)$ to be the sum of $boardwalk(\\pi)$\nover all permutations $\\pi$ whose fixed points are exactly $windmilltoy$.\nThen $\\sum_{arrowshaft \\supseteq riverbank} dragonfly(arrowshaft) = 1$ if $|riverbank| \\geq goldthread-1$\nand 0 otherwise (since a permutation group on 2 or more symbols has as many even and odd permutations), so\n\\[\ndragonfly(windmilltoy) = (-1)^{goldthread-|windmilltoy|}(1 - goldthread + |windmilltoy|).\n\\]\nThe desired sum can thus be written, by grouping over fixed point sets, as\n\\begin{multline*}\n\\sum_{earthworm=0}^{goldthread} \\binom{goldthread}{earthworm} (-1)^{goldthread-earthworm} \\frac{1-goldthread+earthworm}{earthworm+1} \\\\\n\\begin{aligned}\n&= \\sum_{earthworm=0}^{goldthread} (-1)^{goldthread-earthworm} \\binom{goldthread}{earthworm} - \\sum_{earthworm=0}^{goldthread} (-1)^{goldthread-earthworm} \\frac{goldthread}{earthworm+1}\n\\binom{goldthread}{earthworm} \\\\\n&= 0 - \\sum_{earthworm=0}^{goldthread} (-1)^{goldthread-earthworm} \\frac{goldthread}{goldthread+1} \\binom{goldthread+1}{earthworm+1} \\\\\n&= (-1)^{goldthread+1} \\frac{goldthread}{goldthread+1}.\n\\end{aligned}\n\\end{multline*}\n\n\\textbf{Third solution:}\n(by Richard Stanley)\nThe \\emph{cycle indicator} of the symmetric group $windmilltoynum$ is defined by\n\\[\nsnowglobe(sugarcane, \\dots, jaguarundi) = \\sum_{\\pi \\in windmilltoynum} sugarcane^{cornflower(\\pi)} \\cdots jaguarundi^{cornflower(\\pi)},\n\\]\nwhere $cornflower(\\pi)$ is the number of cycles of $\\pi$ of length $i$.\nPut\n\\[\nmousetrap = \\sum_{\\pi \\in windmilltoynum} boardwalk(\\pi) lemonjuice^{tailspin(\\pi)} =\nsnowglobe(lemonjuice,-1,1,-1,1,\\dots)\n\\]\nand\n\\[\ndragonfly(goldthread) =  \\sum_{\\pi \\in windmilltoynum} \\frac{boardwalk(\\pi)}{tailspin(\\pi) + 1}\n= \\int_0^1 mousetrap\\,dlemonjuice.\n\\]\nA standard argument in enumerative combinatorics (the\nExponential Formula) gives\n\\[\n\\sum_{goldthread=0}^\\infty snowglobe(sugarcane,\\dots,jaguarundi) \\frac{bluewhale^{goldthread}}{goldthread!}\n= \\exp \\sum_{scarecrow=1}^{\\infty} buttercup \\frac{bluewhale^{scarecrow}}{scarecrow},\n\\]\nyielding\n\\begin{align*}\n\\sum_{goldthread=0}^\\infty\ndragonfly(goldthread) \\frac{bluewhale^{goldthread}}{goldthread!} &= \\int_0^1 \\exp \\left( lemonjuice bluewhale - \\frac{bluewhale^2}{2}\n+ \\frac{bluewhale^3}{3} - \\cdots \\right)\\,dlemonjuice \\\\\n&= \\int_0^1 e^{(lemonjuice-1)bluewhale + \\log(1+bluewhale)}\\,dlemonjuice \\\\\n&= \\int_0^1 (1+bluewhale) e^{(lemonjuice-1)bluewhale}\\,dlemonjuice \\\\\n&= \\frac{1}{bluewhale} (1-e^{-bluewhale}) (1+bluewhale).\n\\end{align*}\nExpanding the right side as a Taylor series and comparing coefficients\nyields the desired result.\n\n\\textbf{Fourth solution (sketch):}\n(by David Savitt)\nWe prove the identity of rational functions\n\\[\n\\sum_{\\pi \\in windmilltoynum} \\frac{boardwalk(\\pi)}{tailspin(\\pi) + lemonjuice}\n= \\frac{(-1)^{goldthread+1} goldthread! (lemonjuice+goldthread-1)}{lemonjuice(lemonjuice+1)\\cdots(lemonjuice+goldthread)}\n\\]\nby induction on goldthread, which for lemonjuice=1 implies the desired result.\n(This can also be deduced as in the other solutions, but in this argument\nit is necessary to formulate the strong induction hypothesis.)\n\nLet $R(goldthread,lemonjuice)$ be the right hand side of the above equation. It is\neasy to verify that\n\\begin{align*}\nR(lemonjuice,goldthread) &= R(lemonjuice+1,goldthread-1) + (goldthread-1)! \\frac{(-1)^{goldthread+1}}{lemonjuice} \\\\\n&\\qquad + \\sum_{l=2}^{goldthread-1} (-1)^{l-1}  \\frac{(goldthread-1)!}{(goldthread-l)!} R(lemonjuice,goldthread-l),\n\\end{align*}\nsince the sum telescopes. To prove the desired equality,\nit suffices to show that the left hand side satisfies the same\nrecurrence. This follows because we can classify each $\\pi \\in windmilltoynum$\nas either fixing goldthread, being an goldthread-cycle, or having goldthread in an\n$l$-cycle for one of $l=2,\\dots,goldthread-1$; writing the sum\nover these classes gives the desired recurrence.\n\n\\end{itemize}\n\n\\end{document}"
    },
    "descriptive_long_misleading": {
      "map": {
        "S": "emptiness",
        "S_n": "singularity",
        "\\pi": "staticmap",
        "\\sigma": "magnitude",
        "\\nu": "mobility",
        "I": "difference",
        "J_x": "emptymatrix",
        "x": "constant",
        "y": "steadyval",
        "Z_n": "acyclicfn",
        "F_n": "negationsum",
        "f": "variable",
        "c_i": "linearity",
        "x_k": "fixvalue",
        "x_1": "lastvalue",
        "x_n": "initialval",
        "t": "staticvar",
        "k": "entirety",
        "i": "aggregate",
        "T": "universalset",
        "U": "emptyset",
        "n": "nullvalue"
      },
      "question": "Let $singularity$ denote the set of all permutations of the numbers $1,2,\\dots,nullvalue$.\nFor $staticmap \\in singularity$, let $magnitude(staticmap) = 1$ if $staticmap$ is an even permutation\nand $magnitude(staticmap) = -1$ if $staticmap$ is an odd permutation.\nAlso, let $mobility(staticmap)$ denote the number of fixed points of $staticmap$.\nShow that\n\\[\n\\sum_{staticmap \\in singularity} \\frac{magnitude(staticmap)}{mobility(staticmap) + 1} = (-1)^{nullvalue+1}\n\\frac{nullvalue}{nullvalue+1}.\n\\]",
      "solution": "\\textbf{First solution:}\nLet $difference$ be the identity matrix, and let\n$emptymatrix$ be the matrix with $constant$'s on the diagonal and 1's elsewhere.\nNote that $emptymatrix - (constant-1)difference$, being the all 1's matrix, has rank 1 and trace $nullvalue$,\nso has $nullvalue-1$ eigenvalues equal to 0 and one equal to $nullvalue$.\nHence $emptymatrix$ has $nullvalue-1$ eigenvalues equal to $constant-1$ and one equal to $constant+nullvalue-1$,\nimplying\n\\[\n\\det emptymatrix = (constant+nullvalue-1)(constant-1)^{nullvalue-1}.\n\\]\nOn the other hand, we may expand the determinant as a sum indexed by\npermutations, in which case we get\n\\[\n\\det emptymatrix = \\sum_{staticmap \\in singularity} \\sgn(staticmap) constant^{mobility(staticmap)}.\n\\]\nIntegrating both sides from 0 to 1 (and substituting $steadyval=1-constant$) yields\n\\begin{align*}\n\\sum_{staticmap \\in singularity} \\frac{\\sgn(staticmap)}{mobility(staticmap) + 1}\n&= \\int_0^1 (constant+nullvalue-1)(constant-1)^{nullvalue-1}\\,dconstant \\\\\n&= \\int_0^1 (-1)^{nullvalue+1} (nullvalue-steadyval)steadyval^{nullvalue-1}\\,dsteadyval \\\\\n&= (-1)^{nullvalue+1} \\frac{nullvalue}{nullvalue+1},\n\\end{align*}\nas desired.\n\n\\textbf{Second solution:}\nWe start by recalling a form of the principle of inclusion-exclusion:\nif $variable$ is a function on the power set of $\\{1, \\dots, nullvalue\\}$, then\n\\[\nvariable(emptiness) = \\sum_{universalset \\supseteq emptiness} (-1)^{|universalset|-|emptiness|} \\sum_{emptyset \\supseteq universalset} variable(emptyset).\n\\]\nIn this case we take $variable(emptiness)$ to be the sum of $magnitude(staticmap)$\nover all permutations $staticmap$ whose fixed points are exactly $emptiness$.\nThen $\\sum_{emptyset \\supseteq universalset} variable(emptyset) = 1$ if $|universalset| \\geq nullvalue-1$\nand 0 otherwise (since a permutation group on 2 or more symbols has as many even and odd permutations), so\n\\[\nvariable(emptiness) = (-1)^{nullvalue-|emptiness|}(1 - nullvalue + |emptiness|).\n\\]\nThe desired sum can thus be written, by grouping over fixed point sets, as\n\\begin{multline*}\n\\sum_{aggregate=0}^{nullvalue} \\binom{nullvalue}{aggregate} (-1)^{nullvalue-aggregate} \\frac{1-nullvalue+aggregate}{aggregate+1} \\\\\n\\begin{aligned}\n&= \\sum_{aggregate=0}^{nullvalue} (-1)^{nullvalue-aggregate} \\binom{nullvalue}{aggregate} - \\sum_{aggregate=0}^{nullvalue} (-1)^{nullvalue-aggregate} \\frac{nullvalue}{aggregate+1}\n\\binom{nullvalue}{aggregate} \\\\\n&= 0 - \\sum_{aggregate=0}^{nullvalue} (-1)^{nullvalue-aggregate} \\frac{nullvalue}{nullvalue+1} \\binom{nullvalue+1}{aggregate+1} \\\\\n&= (-1)^{nullvalue+1} \\frac{nullvalue}{nullvalue+1}.\n\\end{aligned}\n\\end{multline*}\n\n\\textbf{Third solution:}\n(by Richard Stanley)\nThe \\emph{cycle indicator} of the symmetric group $singularity$ is defined by\n\\[\nacyclicfn(lastvalue, \\dots, initialval) = \\sum_{staticmap \\in singularity} lastvalue^{linearity(staticmap)} \\cdots initialval^{linearity(staticmap)},\n\\]\nwhere $linearity(staticmap)$ is the number of cycles of $staticmap$ of length $aggregate$.\nPut\n\\[\nnegationsum = \\sum_{staticmap \\in singularity} magnitude(staticmap) constant^{mobility(staticmap)} =\nacyclicfn(constant,-1,1,-1,1,\\dots)\n\\]\nand\n\\[\nvariable(nullvalue) =  \\sum_{staticmap \\in singularity} \\frac{magnitude(staticmap)}{mobility(staticmap) + 1}\n= \\int_0^1 negationsum(constant)\\,dconstant.\n\\]\nA standard argument in enumerative combinatorics (the\nExponential Formula) gives\n\\[\n\\sum_{nullvalue=0}^\\infty acyclicfn(lastvalue,\\dots,initialval) \\frac{staticvar^{nullvalue}}{nullvalue!}\n= \\exp \\sum_{entirety=1}^{\\infty} fixvalue \\frac{staticvar^{entirety}}{entirety},\n\\]\nyielding\n\\begin{align*}\n\\sum_{nullvalue=0}^\\infty\nvariable(nullvalue) \\frac{staticvar^{nullvalue}}{nullvalue!} &= \\int_0^1 \\exp \\left( constant staticvar - \\frac{staticvar^2}{2}\n+ \\frac{staticvar^3}{3} - \\cdots \\right)\\,dconstant \\\\\n&= \\int_0^1 e^{(constant-1)staticvar + \\log(1+staticvar)}\\,dconstant \\\\\n&= \\int_0^1 (1+staticvar) e^{(constant-1)staticvar}\\,dconstant \\\\\n&= \\frac{1}{staticvar} (1-e^{-staticvar}) (1+staticvar).\n\\end{align*}\nExpanding the right side as a Taylor series and comparing coefficients\nyields the desired result.\n\n\\textbf{Fourth solution (sketch):}\n(by David Savitt)\nWe prove the identity of rational functions\n\\[\n\\sum_{staticmap \\in singularity} \\frac{magnitude(staticmap)}{mobility(staticmap) + constant}\n= \\frac{(-1)^{nullvalue+1} nullvalue! (constant+nullvalue-1)}{constant(constant+1)\\cdots(constant+nullvalue)}\n\\]\nby induction on $nullvalue$, which for $constant=1$ implies the desired result.\n(This can also be deduced as in the other solutions, but in this argument\nit is necessary to formulate the strong induction hypothesis.)\n\nLet $R(nullvalue,constant)$ be the right hand side of the above equation. It is\neasy to verify that\n\\begin{align*}\nR(constant,nullvalue) &= R(constant+1,nullvalue-1) + (nullvalue-1)! \\frac{(-1)^{nullvalue+1}}{constant} \\\\\n&\\qquad + \\sum_{l=2}^{nullvalue-1} (-1)^{l-1}  \\frac{(nullvalue-1)!}{(nullvalue-l)!} R(constant,nullvalue-l),\n\\end{align*}\nsince the sum telescopes. To prove the desired equality,\nit suffices to show that the left hand side satisfies the same\nrecurrence. This follows because we can classify each $staticmap \\in singularity$\nas either fixing $nullvalue$, being an $nullvalue$-cycle, or having $nullvalue$ in an\n$l$-cycle for one of $l=2,\\dots,nullvalue-1$; writing the sum\nover these classes gives the desired recurrence."
    },
    "garbled_string": {
      "map": {
        "S": "ljkwerpo",
        "S_n": "bcsqodjv",
        "\\\\pi": "mxrslfgh",
        "\\\\sigma": "qzrnvxle",
        "\\\\nu": "hbcejkta",
        "I": "spqdnfhe",
        "J_x": "kzbxpwlo",
        "x": "zdvmpqen",
        "y": "ohfznkae",
        "Z_n": "nhvclruz",
        "F_n": "dfqsmnty",
        "f": "raqglwzp",
        "c_i": "svljpqom",
        "x_k": "zosymbgn",
        "x_1": "umqazplk",
        "x_n": "wparklhz",
        "t": "cipknoev",
        "k": "mxqeropd",
        "i": "tyclspuv",
        "T": "gdrbmpxe",
        "U": "vbkslqud",
        "n": "gplmyrwo"
      },
      "question": "Let $bcsqodjv$ denote the set of all permutations of the numbers $1,2,\\dots,gplmyrwo$.\nFor $mxrslfgh \\in bcsqodjv$, let $qzrnvxle(mxrslfgh) = 1$ if $mxrslfgh$ is an even permutation\nand $qzrnvxle(mxrslfgh) = -1$ if $mxrslfgh$ is an odd permutation.\nAlso, let $hbcejkta(mxrslfgh)$ denote the number of fixed points of $mxrslfgh$.\nShow that\n\\[\n\\sum_{mxrslfgh \\in bcsqodjv} \\frac{qzrnvxle(mxrslfgh)}{hbcejkta(mxrslfgh) + 1} = (-1)^{gplmyrwo+1}\n\\frac{gplmyrwo}{gplmyrwo+1}.\n\\]",
      "solution": "\\textbf{First solution:}\nLet $spqdnfhe$ be the identity matrix, and let\n$kzbxpwlo$ be the matrix with $zdvmpqen$'s on the diagonal and 1's elsewhere.\nNote that $kzbxpwlo - (zdvmpqen-1)spqdnfhe$, being the all 1's matrix, has rank 1 and trace $gplmyrwo$,\nso has $gplmyrwo-1$ eigenvalues equal to 0 and one equal to $gplmyrwo$.\nHence $kzbxpwlo$ has $gplmyrwo-1$ eigenvalues equal to $zdvmpqen-1$ and one equal to $zdvmpqen+gplmyrwo-1$,\nimplying\n\\[\n\\det kzbxpwlo = (zdvmpqen+gplmyrwo-1)(zdvmpqen-1)^{gplmyrwo-1}.\n\\]\nOn the other hand, we may expand the determinant as a sum indexed by\npermutations, in which case we get\n\\[\n\\det kzbxpwlo = \\sum_{mxrslfgh \\in bcsqodjv} \\sgn(mxrslfgh) zdvmpqen^{hbcejkta(mxrslfgh)}.\n\\]\nIntegrating both sides from 0 to 1 (and substituting $ohfznkae=1-zdvmpqen$) yields\n\\begin{align*}\n\\sum_{mxrslfgh \\in bcsqodjv} \\frac{\\sgn(mxrslfgh)}{hbcejkta(mxrslfgh) + 1}\n&= \\int_0^1 (zdvmpqen+gplmyrwo-1)(zdvmpqen-1)^{gplmyrwo-1}\\,dzdvmpqen \\\\\n&= \\int_0^1 (-1)^{gplmyrwo+1} (gplmyrwo-ohfznkae)ohfznkae^{gplmyrwo-1}\\,dohfznkae \\\\\n&= (-1)^{gplmyrwo+1} \\frac{gplmyrwo}{gplmyrwo+1},\n\\end{align*}\nas desired.\n\n\\textbf{Second solution:}\nWe start by recalling a form of the principle of inclusion-exclusion:\nif $raqglwzp$ is a function on the power set of $\\{1, \\dots, gplmyrwo\\}$, then\n\\[\nraqglwzp(S) = \\sum_{gdrbmpxe \\supseteq S} (-1)^{|gdrbmpxe|-|S|} \\sum_{vbkslqud \\supseteq gdrbmpxe} raqglwzp(vbkslqud).\n\\]\nIn this case we take $raqglwzp(S)$ to be the sum of $qzrnvxle(mxrslfgh)$\nover all permutations $mxrslfgh$ whose fixed points are exactly $S$.\nThen $\\sum_{vbkslqud \\supseteq gdrbmpxe} raqglwzp(vbkslqud) = 1$ if $|gdrbmpxe| \\ge gplmyrwo-1$\nand 0 otherwise (since a permutation group on 2 or more symbols has as many even and odd permutations), so\n\\[\nraqglwzp(S) = (-1)^{gplmyrwo-|S|}(1 - gplmyrwo + |S|).\n\\]\nThe desired sum can thus be written, by grouping over fixed point sets, as\n\\begin{multline*}\n\\sum_{tyclspuv=0}^{gplmyrwo} \\binom{gplmyrwo}{tyclspuv} (-1)^{gplmyrwo-tyclspuv} \\frac{1-gplmyrwo+tyclspuv}{tyclspuv+1} \\\\\n\\begin{aligned}\n&= \\sum_{tyclspuv=0}^{gplmyrwo} (-1)^{gplmyrwo-tyclspuv} \\binom{gplmyrwo}{tyclspuv} - \\sum_{tyclspuv=0}^{gplmyrwo} (-1)^{gplmyrwo-tyclspuv} \\frac{gplmyrwo}{tyclspuv+1}\n\\binom{gplmyrwo}{tyclspuv} \\\\\n&= 0 - \\sum_{tyclspuv=0}^{gplmyrwo} (-1)^{gplmyrwo-tyclspuv} \\frac{gplmyrwo}{gplmyrwo+1} \\binom{gplmyrwo+1}{tyclspuv+1} \\\\\n&= (-1)^{gplmyrwo+1} \\frac{gplmyrwo}{gplmyrwo+1}.\n\\end{aligned}\n\\end{multline*}\n\n\\textbf{Third solution:}\n(by Richard Stanley)\nThe \\emph{cycle indicator} of the symmetric group $bcsqodjv$ is defined by\n\\[\nnhvclruz(umqazplk, \\dots, wparklhz) = \\sum_{mxrslfgh \\in bcsqodjv} umqazplk^{c_1(mxrslfgh)} \\cdots wparklhz^{c_{gplmyrwo}(mxrslfgh)},\n\\]\nwhere $c_j(mxrslfgh)$ is the number of cycles of $mxrslfgh$ of length $j$.\nPut\n\\[\ndfqsmnty = \\sum_{mxrslfgh \\in bcsqodjv} qzrnvxle(mxrslfgh) zdvmpqen^{hbcejkta(mxrslfgh)} =\nnhvclruz(zdvmpqen,-1,1,-1,1,\\dots)\n\\]\nand\n\\[\nraqglwzp(gplmyrwo) =  \\sum_{mxrslfgh \\in bcsqodjv} \\frac{qzrnvxle(mxrslfgh)}{hbcejkta(mxrslfgh) + 1}\n= \\int_0^1 dfqsmnty(zdvmpqen)\\,dzdvmpqen.\n\\]\nA standard argument in enumerative combinatorics (the\nExponential Formula) gives\n\\[\n\\sum_{gplmyrwo=0}^\\infty nhvclruz(umqazplk,\\dots,wparklhz) \\frac{cipknoev^{gplmyrwo}}{gplmyrwo!}\n= \\exp \\sum_{mxqeropd=1}^{\\infty} zosymbgn \\frac{cipknoev^{mxqeropd}}{mxqeropd},\n\\]\nyielding\n\\begin{align*}\n\\sum_{gplmyrwo=0}^\\infty\nraqglwzp(gplmyrwo) \\frac{cipknoev^{gplmyrwo}}{gplmyrwo!} &= \\int_0^1 \\exp \\left( zdvmpqen cipknoev - \\frac{cipknoev^2}{2}\n+ \\frac{cipknoev^3}{3} - \\cdots \\right)\\,dzdvmpqen \\\\\n&= \\int_0^1 e^{(zdvmpqen-1)cipknoev + \\log(1+cipknoev)}\\,dzdvmpqen \\\\\n&= \\int_0^1 (1+cipknoev) e^{(zdvmpqen-1)cipknoev}\\,dzdvmpqen \\\\\n&= \\frac{1}{cipknoev} (1-e^{-cipknoev}) (1+cipknoev).\n\\end{align*}\nExpanding the right side as a Taylor series and comparing coefficients\nyields the desired result.\n\n\\textbf{Fourth solution (sketch):}\n(by David Savitt)\nWe prove the identity of rational functions\n\\[\n\\sum_{mxrslfgh \\in bcsqodjv} \\frac{qzrnvxle(mxrslfgh)}{hbcejkta(mxrslfgh) + zdvmpqen}\n= \\frac{(-1)^{gplmyrwo+1} gplmyrwo! (zdvmpqen+gplmyrwo-1)}{zdvmpqen(zdvmpqen+1)\\cdots(zdvmpqen+gplmyrwo)}\n\\]\nby induction on $gplmyrwo$, which for $zdvmpqen=1$ implies the desired result.\n(This can also be deduced as in the other solutions, but in this argument\nit is necessary to formulate the strong induction hypothesis.)\n\nLet $R(gplmyrwo,zdvmpqen)$ be the right hand side of the above equation. It is\neasy to verify that\n\\begin{align*}\nR(gplmyrwo,zdvmpqen) &= R(zdvmpqen+1,gplmyrwo-1) + (gplmyrwo-1)! \\frac{(-1)^{gplmyrwo+1}}{zdvmpqen} \\\\\n&\\qquad + \\sum_{l=2}^{gplmyrwo-1} (-1)^{l-1}  \\frac{(gplmyrwo-1)!}{(gplmyrwo-l)!} R(zdvmpqen,gplmyrwo-l),\n\\end{align*}\nsince the sum telescopes. To prove the desired equality,\nit suffices to show that the left hand side satisfies the same\nrecurrence. This follows because we can classify each $mxrslfgh \\in bcsqodjv$\nas either fixing $gplmyrwo$, being a $gplmyrwo$-cycle, or having $gplmyrwo$ in an\n$l$-cycle for one of $l=2,\\dots,gplmyrwo-1$; writing the sum\nover these classes gives the desired recurrence.\n"
    },
    "kernel_variant": {
      "question": "Let $n\\ge 1$ be an integer and let $q\\in\\mathbb C\\setminus\\{0\\}$ be a (complex) parameter.  \nFor a permutation $\\pi\\in S_{n}$ denote by  \n\\[\n\\sigma(\\pi)=\n\\begin{cases}\n+1,&\\text{if $\\pi$ is even},\\\\[2pt]\n-1,&\\text{if $\\pi$ is odd},\n\\end{cases}\n\\qquad \n\\nu(\\pi)=\\#\\{\\text{fixed points of }\\pi\\}.\n\\]\n\nA)  Show that  \n\\[\n\\boxed{\\;\n\\sum_{\\pi\\in S_{n}}\n\\frac{\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}}{\\nu(\\pi)+1}\n\\;=\\;\n\\frac{(1-q)^{n}\\bigl(qn+1\\bigr)-(-q)^{n}\\,q n}{n+1}}\n\\tag{A}\n\\]\n\nB)  Establish the exponential generating function  \n\\[\n\\boxed{\\;\n\\sum_{n=0}^{\\infty}\n\\left(\n\\sum_{\\pi\\in S_{n}}\n\\frac{\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}}{\\nu(\\pi)+1}\n\\right)\\frac{t^{n}}{n!}\n=\n\\frac{(1+q t)\\bigl(e^{(1-q)t}-e^{-q t}\\bigr)}{t}}\n\\tag{B}\n\\]\n\n(N.B.\\ The summand with $n=0$ is required only in the generating function; both formulas remain valid for $n=0$.)\n\nSetting $q=2$ recovers the kernel variant, while $q=1$ yields the original exercise.",
      "solution": "Throughout we fix $q\\in\\mathbb C\\setminus\\{0\\}$ and write  \n\\[\nS_{n}(q):=\\sum_{\\pi\\in S_{n}}\\frac{\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}}{\\nu(\\pi)+1}.\n\\]\n\nStep 1 – Encoding the weight via the cycle index  \nFor $\\pi\\in S_{n}$ let $c_{k}(\\pi)$ be the number of $k$–cycles of $\\pi$.  Then  \n\\[\n\\sigma(\\pi)=\\prod_{k\\ge 1}\\bigl(-1\\bigr)^{(k-1)c_{k}(\\pi)},\n\\qquad\nn-\\nu(\\pi)=\\sum_{k\\ge 2}k\\,c_{k}(\\pi).\n\\]\nHence  \n\\[\n\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}\n=\n\\prod_{k\\ge 1}x_{k}^{c_{k}(\\pi)}\n\\quad\\text{with}\\quad\nx_{1}=x,\\; x_{k}=(-1)^{\\,k-1}q^{k}\\;(k\\ge 2),\n\\]\nwhere the auxiliary variable $x$ keeps track of the fixed points.  \nDefine\n\\[\nF_{n}(q,x):=\\sum_{\\pi\\in S_{n}}\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}x^{\\nu(\\pi)}\n             =Z_{n}\\bigl(x_{1},x_{2},\\dots,x_{n}\\bigr),\n\\]\nthe cycle index $Z_{n}$ specialised at the sequence $(x_{k})$ above.\n\nStep 2 – An exponential generating function in $t$  \nThe classical exponential formula gives\n\\[\n\\sum_{n=0}^{\\infty}F_{n}(q,x)\\frac{t^{n}}{n!}\n=\\exp\\!\\left(\\sum_{k\\ge 1}x_{k}\\frac{t^{k}}{k}\\right).\n\\]\nWith $x_{1}=x$, $x_{k}=(-1)^{\\,k-1}q^{k}$ $(k\\ge 2)$,  \n\\[\n\\sum_{k\\ge 1}x_{k}\\frac{t^{k}}{k}\n=\nx t + \\sum_{k\\ge 2}(-1)^{k-1}q^{k}\\frac{t^{k}}{k}\n=\nx t +\\log(1+q t)-q t ,\n\\]\nbecause $\\sum_{k\\ge 1}(-1)^{k-1}(q t)^{k}/k=\\log(1+q t)$.  Hence\n\\[\n\\boxed{\\;\n\\sum_{n=0}^{\\infty}F_{n}(q,x)\\frac{t^{n}}{n!}\n=(1+q t)\\,e^{(x-q)t}}\n\\tag{1}\n\\]\n\nStep 3 – Integration with respect to $x$  \nSince $\\displaystyle\\int_{0}^{1}x^{\\nu}\\,dx=\\frac{1}{\\nu+1}$,  \n\\[\nS_{n}(q)=\\int_{0}^{1}F_{n}(q,x)\\,dx .\n\\]\nDefine  \n\\[\nG_{q}(t):=\\sum_{n=0}^{\\infty}S_{n}(q)\\frac{t^{n}}{n!}.\n\\]\nIntegrating (1) termwise (legitimate because all series involved have infinite radius of convergence) yields\n\\[\n\\begin{aligned}\nG_{q}(t)\n&=\\int_{0}^{1}(1+q t)\\,e^{(x-q)t}\\,dx\\\\\n&=(1+q t)\\,e^{-q t}\\int_{0}^{1}e^{x t}\\,dx\\\\\n&=(1+q t)\\,e^{-q t}\\,\\frac{e^{t}-1}{t}\\\\\n&=\\frac{(1+q t)\\bigl(e^{(1-q)t}-e^{-q t}\\bigr)}{t}.\n\\end{aligned}\n\\]\nThis is precisely identity (B).\n\nStep 4 – Extraction of the coefficient of $t^{n}$  \nExpand\n\\[\ne^{(1-q)t}-e^{-q t}\n=\\sum_{k\\ge 0}\\frac{(1-q)^{k}-( -q)^{k}}{k!}\\,t^{k}.\n\\]\nThus  \n\\[\nG_{q}(t)\n=(1+q t)\\sum_{k\\ge 0}\\frac{(1-q)^{k}-(-q)^{k}}{k!}\\,t^{\\,k-1}.\n\\]\nSeparate the contributions of $1$ and $q t$:\n\n(i) The constant $1$ contributes the term with $k=n+1$:\n\\[\n\\frac{(1-q)^{n+1}-(-q)^{n+1}}{(n+1)!}.\n\\]\n\n(ii) The factor $q t$ contributes the term with $k=n$:\n\\[\nq\\,\\frac{(1-q)^{n}-(-q)^{n}}{n!}.\n\\]\n\nCombining and multiplying by $(n!)$ (since $[t^{n}]G_{q}(t)=S_{n}(q)/n!$) we obtain\n\\[\n\\boxed{\\;\nS_{n}(q)=\\frac{(1-q)^{n}(q n+1)-(-q)^{n}\\,q n}{n+1}}\n\\tag{2}\n\\]\nwhich is identity (A).\n\nStep 5 – Sanity check $q=2$  \nPutting $q=2$ in (2) gives  \n\\[\nS_{n}(2)=(-1)^{n+1}\\,\\frac{2^{\\,n+1}n-2n-1}{n+1},\n\\]\nthe formula stated in the kernel variant, confirming consistency.\n\nHence both parts (A) and (B) are proved rigorously.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.796970",
        "was_fixed": false,
        "difficulty_analysis": "• Two free variables instead of one:   \n  The weight now involves an arbitrary complex parameter q, so every step\n  (cycle-index specialisation, exponential formula, coefficient\n  extraction) must be carried out symbolically rather than with a single\n  numeric substitution (q=2 in the kernel variant).  \n\n• Full generating function required:  \n  Proving the closed form for all n is no longer sufficient; the solver\n  must also derive the entire exponential generating function (part B),\n  demanding mastery of analytic techniques and series manipulations\n  beyond those used in the original solutions.\n\n• Heavier algebraic manipulation:  \n  Handling the two competing exponentials e^{(1-q)t} and e^{–q t} and\n  reorganising their difference into explicit coefficients introduces an\n  extra layer of technical algebra absent from the kernel variant.\n\n• Broader conceptual scope:  \n  The solution makes essential use of the cycle index, the exponential\n  formula, integration of exponential generating functions, and careful\n  coefficient extraction—four distinct advanced tools that must now be\n  orchestrated simultaneously.\n\nThese additions raise the problem well above the difficulty of both the\noriginal and the kernel variant while preserving the central theme of\nsign-weighted permutation statistics."
      }
    },
    "original_kernel_variant": {
      "question": "Let $n\\ge 1$ be an integer and let $q\\in\\mathbb C\\setminus\\{0\\}$ be a (complex) parameter.  \nFor a permutation $\\pi\\in S_{n}$ denote by  \n\\[\n\\sigma(\\pi)=\n\\begin{cases}\n+1,&\\text{if $\\pi$ is even},\\\\[2pt]\n-1,&\\text{if $\\pi$ is odd},\n\\end{cases}\n\\qquad \n\\nu(\\pi)=\\#\\{\\text{fixed points of }\\pi\\}.\n\\]\n\nA)  Show that  \n\\[\n\\boxed{\\;\n\\sum_{\\pi\\in S_{n}}\n\\frac{\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}}{\\nu(\\pi)+1}\n\\;=\\;\n\\frac{(1-q)^{n}\\bigl(qn+1\\bigr)-(-q)^{n}\\,q n}{n+1}}\n\\tag{A}\n\\]\n\nB)  Establish the exponential generating function  \n\\[\n\\boxed{\\;\n\\sum_{n=0}^{\\infty}\n\\left(\n\\sum_{\\pi\\in S_{n}}\n\\frac{\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}}{\\nu(\\pi)+1}\n\\right)\\frac{t^{n}}{n!}\n=\n\\frac{(1+q t)\\bigl(e^{(1-q)t}-e^{-q t}\\bigr)}{t}}\n\\tag{B}\n\\]\n\n(N.B.\\ The summand with $n=0$ is required only in the generating function; both formulas remain valid for $n=0$.)\n\nSetting $q=2$ recovers the kernel variant, while $q=1$ yields the original exercise.",
      "solution": "Throughout we fix $q\\in\\mathbb C\\setminus\\{0\\}$ and write  \n\\[\nS_{n}(q):=\\sum_{\\pi\\in S_{n}}\\frac{\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}}{\\nu(\\pi)+1}.\n\\]\n\nStep 1 – Encoding the weight via the cycle index  \nFor $\\pi\\in S_{n}$ let $c_{k}(\\pi)$ be the number of $k$–cycles of $\\pi$.  Then  \n\\[\n\\sigma(\\pi)=\\prod_{k\\ge 1}\\bigl(-1\\bigr)^{(k-1)c_{k}(\\pi)},\n\\qquad\nn-\\nu(\\pi)=\\sum_{k\\ge 2}k\\,c_{k}(\\pi).\n\\]\nHence  \n\\[\n\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}\n=\n\\prod_{k\\ge 1}x_{k}^{c_{k}(\\pi)}\n\\quad\\text{with}\\quad\nx_{1}=x,\\; x_{k}=(-1)^{\\,k-1}q^{k}\\;(k\\ge 2),\n\\]\nwhere the auxiliary variable $x$ keeps track of the fixed points.  \nDefine\n\\[\nF_{n}(q,x):=\\sum_{\\pi\\in S_{n}}\\sigma(\\pi)\\,q^{\\,n-\\nu(\\pi)}x^{\\nu(\\pi)}\n             =Z_{n}\\bigl(x_{1},x_{2},\\dots,x_{n}\\bigr),\n\\]\nthe cycle index $Z_{n}$ specialised at the sequence $(x_{k})$ above.\n\nStep 2 – An exponential generating function in $t$  \nThe classical exponential formula gives\n\\[\n\\sum_{n=0}^{\\infty}F_{n}(q,x)\\frac{t^{n}}{n!}\n=\\exp\\!\\left(\\sum_{k\\ge 1}x_{k}\\frac{t^{k}}{k}\\right).\n\\]\nWith $x_{1}=x$, $x_{k}=(-1)^{\\,k-1}q^{k}$ $(k\\ge 2)$,  \n\\[\n\\sum_{k\\ge 1}x_{k}\\frac{t^{k}}{k}\n=\nx t + \\sum_{k\\ge 2}(-1)^{k-1}q^{k}\\frac{t^{k}}{k}\n=\nx t +\\log(1+q t)-q t ,\n\\]\nbecause $\\sum_{k\\ge 1}(-1)^{k-1}(q t)^{k}/k=\\log(1+q t)$.  Hence\n\\[\n\\boxed{\\;\n\\sum_{n=0}^{\\infty}F_{n}(q,x)\\frac{t^{n}}{n!}\n=(1+q t)\\,e^{(x-q)t}}\n\\tag{1}\n\\]\n\nStep 3 – Integration with respect to $x$  \nSince $\\displaystyle\\int_{0}^{1}x^{\\nu}\\,dx=\\frac{1}{\\nu+1}$,  \n\\[\nS_{n}(q)=\\int_{0}^{1}F_{n}(q,x)\\,dx .\n\\]\nDefine  \n\\[\nG_{q}(t):=\\sum_{n=0}^{\\infty}S_{n}(q)\\frac{t^{n}}{n!}.\n\\]\nIntegrating (1) termwise (legitimate because all series involved have infinite radius of convergence) yields\n\\[\n\\begin{aligned}\nG_{q}(t)\n&=\\int_{0}^{1}(1+q t)\\,e^{(x-q)t}\\,dx\\\\\n&=(1+q t)\\,e^{-q t}\\int_{0}^{1}e^{x t}\\,dx\\\\\n&=(1+q t)\\,e^{-q t}\\,\\frac{e^{t}-1}{t}\\\\\n&=\\frac{(1+q t)\\bigl(e^{(1-q)t}-e^{-q t}\\bigr)}{t}.\n\\end{aligned}\n\\]\nThis is precisely identity (B).\n\nStep 4 – Extraction of the coefficient of $t^{n}$  \nExpand\n\\[\ne^{(1-q)t}-e^{-q t}\n=\\sum_{k\\ge 0}\\frac{(1-q)^{k}-( -q)^{k}}{k!}\\,t^{k}.\n\\]\nThus  \n\\[\nG_{q}(t)\n=(1+q t)\\sum_{k\\ge 0}\\frac{(1-q)^{k}-(-q)^{k}}{k!}\\,t^{\\,k-1}.\n\\]\nSeparate the contributions of $1$ and $q t$:\n\n(i) The constant $1$ contributes the term with $k=n+1$:\n\\[\n\\frac{(1-q)^{n+1}-(-q)^{n+1}}{(n+1)!}.\n\\]\n\n(ii) The factor $q t$ contributes the term with $k=n$:\n\\[\nq\\,\\frac{(1-q)^{n}-(-q)^{n}}{n!}.\n\\]\n\nCombining and multiplying by $(n!)$ (since $[t^{n}]G_{q}(t)=S_{n}(q)/n!$) we obtain\n\\[\n\\boxed{\\;\nS_{n}(q)=\\frac{(1-q)^{n}(q n+1)-(-q)^{n}\\,q n}{n+1}}\n\\tag{2}\n\\]\nwhich is identity (A).\n\nStep 5 – Sanity check $q=2$  \nPutting $q=2$ in (2) gives  \n\\[\nS_{n}(2)=(-1)^{n+1}\\,\\frac{2^{\\,n+1}n-2n-1}{n+1},\n\\]\nthe formula stated in the kernel variant, confirming consistency.\n\nHence both parts (A) and (B) are proved rigorously.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.608331",
        "was_fixed": false,
        "difficulty_analysis": "• Two free variables instead of one:   \n  The weight now involves an arbitrary complex parameter q, so every step\n  (cycle-index specialisation, exponential formula, coefficient\n  extraction) must be carried out symbolically rather than with a single\n  numeric substitution (q=2 in the kernel variant).  \n\n• Full generating function required:  \n  Proving the closed form for all n is no longer sufficient; the solver\n  must also derive the entire exponential generating function (part B),\n  demanding mastery of analytic techniques and series manipulations\n  beyond those used in the original solutions.\n\n• Heavier algebraic manipulation:  \n  Handling the two competing exponentials e^{(1-q)t} and e^{–q t} and\n  reorganising their difference into explicit coefficients introduces an\n  extra layer of technical algebra absent from the kernel variant.\n\n• Broader conceptual scope:  \n  The solution makes essential use of the cycle index, the exponential\n  formula, integration of exponential generating functions, and careful\n  coefficient extraction—four distinct advanced tools that must now be\n  orchestrated simultaneously.\n\nThese additions raise the problem well above the difficulty of both the\noriginal and the kernel variant while preserving the central theme of\nsign-weighted permutation statistics."
      }
    }
  },
  "checked": true,
  "problem_type": "proof",
  "iteratively_fixed": true
}