{
  "index": "2016-B-4",
  "type": "COMB",
  "tag": [
    "COMB",
    "ALG"
  ],
  "difficulty": "",
  "question": "Let $A$ be a $2n \\times 2n$ matrix, with entries chosen independently at random. Every entry is chosen to be 0 or 1, each with probability $1/2$. Find the expected value of $\\det(A-A^t)$ (as a function of $n$), where $A^t$ is the transpose of $A$.",
  "solution": "The expected value equals\n\\[\n\\frac{(2n)!}{4^n n!}.\n\\]\n\\noindent\n\\textbf{First solution:}\n\nWrite the determinant of $A-A^t$ as the sum over permutations $\\sigma$ of $\\{1,\\dots,2n\\}$ of the product\n\\[\n\\sgn(\\sigma)\n\\prod_{i=1}^{2n}\n(A-A^t)_{i \\sigma(i)} \n=\n\\sgn(\\sigma) \\prod_{i=1}^{2n} (A_{i \\sigma(i)} - A_{\\sigma(i) i});\n\\]\nthen the expected value of the determinant is the sum over $\\sigma$ of the expected value of this product, which we denote by $E_\\sigma$. \n\nNote that if we partition $\\{1,\\dots,2n\\}$ into orbits for the action of $\\sigma$, then partition the factors of the product accordingly, then no entry of $A$ appears in more than one of these factors; consequently, these factors are independent random variables. This means that we can compute $E_\\sigma$ as the product of the expected values of the individual factors.\n\nIt is obvious that any orbit of size 1 gives rise to the zero product, and hence the expected value of the corresponding factor is zero. For an orbit of size $m \\geq 3$, the corresponding factor contains $2m$ distinct matrix entries, so again we may compute the expected value of the factor as the product of the expected values of the individual terms $A_{i \\sigma(i)} - A_{\\sigma(i) i}$. However, the distribution of this term is symmetric about 0, so its expected value is 0.\n\nWe conclude that $E_\\sigma = 0$ unless $\\sigma$ acts with $n$ orbits of size 2. To compute $E_\\sigma$ in this case, assume without loss of generality that the orbits of $\\sigma$ are\n$\\{1,2\\}, \\dots, \\{2n-1,2n\\}$; note that $\\sgn(\\sigma) = (-1)^n$. Then $E_\\sigma$ is the expected value of\n$\\prod_{i=1}^n -(A_{(2i-1)2i} - A_{2i(2i-1)})^2$, which is $(-1)^n$ times the $n$-th power\nof the expected value of $(A_{12} - A_{21})^2$. Since $A_{12} - A_{21}$ takes the values $-1, 0, 1$ with probabilities $\\frac{1}{4}, \\frac{1}{2}, \\frac{1}{4}$, its square takes the values\n$0,1$ with probabilities $\\frac{1}{2}, \\frac{1}{2}$; we conclude that\n\\[\nE_\\sigma = 2^{-n}.\n\\]\nThe permutations $\\sigma$ of this form correspond to unordered partitions of $\\{1,\\dots,2n\\}$ into $n$ sets of size 2, so there are\n\\[\n\\frac{(2n)!}{n!(2!)^n}\n\\]\nsuch permutations. Putting this all together yields the claimed result.\n\n\\noindent\n\\textbf{Second solution:}\n(by Manjul Bhargava)\nNote that the matrix $A-A^t$ is skew-symmetric: \n\\[\n(A-A^t)^t = A^t-A = -(A-A^t).\n\\]\nThe determinant of a $2n \\times 2n$ skew-symmetric matrix $M$ is the square of the {\\it Pfaffian} of $M$, which is a polynomial of degree $n$ in the entries of $M$ defined as follows. Define a {\\it perfect matching} of $\\{1,\\ldots,2n\\}$ to be a permutation of $\\{1,\\ldots,2n\\}$ that is the product of $n$ disjoint transpositions. Then the Pfaffian of $M$ is given by\n\\begin{equation}\\label{pfaffeq}\n\\sum_{\\alpha} \\sgn(\\alpha) M_{i_1,j_1}\\cdots M_{i_n,j_n}\n\\end{equation}\nwhere the sum is over perfect matchings $\\alpha=(i_1,j_1)\\cdots(i_n,j_n)$,\nand $\\sgn(\\alpha)$ denotes the sign of the permutation\n$\\left(\\begin{smallmatrix}\n1&2&3&4&\\cdots & (2n-1)&2n \\\\\ni_1&j_1&i_2&j_2& \\cdots & i_n & j_n\n\\end{smallmatrix} \\right)$.\nThe determinant of $M$ is then the square of \\eqref{pfaffeq}, i.e.,\n\\begin{equation}\\label{deteq} \\det(M)=\\sum_{\\alpha,\\beta} \\sgn(\\alpha)\\sgn(\\beta) M_{i_1,j_1}\\cdots M_{i_n,j_n}M_{i'_1,j'_1}\\cdots M_{i'_n,j'_n}\n\\end{equation}\nwhere the sum is now over ordered pairs $$(\\alpha=(i_1,j_1)\\cdots(i_n,j_n),\\beta=(i'_1,j'_1)\\cdots(i'_n,j'_n))$$ of perfect matchings.\n\nTaking $M = A - A^t$, so that $M_{ij} = A_{ij} - A_{ji}$,\nwe wish to find the expected value of \\eqref{deteq}; again, this is the sum of the expected values of each summand in \\eqref{deteq}. Note that each $M_{ij}$ with $i < j$ is an independent random variable taking the values $-1,0,1$ with probabilities $\\frac14,\\frac12,\\frac14$, respectively.\n\nConsider first a summand in \\eqref{deteq} with $\\alpha\\neq \\beta$. Then some factor $M_{ij}$  occurs with exponent 1; since the distribution of $M_{ij}$ is symmetric about 0, any such summand has expected value 0.\n\nConsider next a summand in \\eqref{deteq} with $\\alpha= \\beta$. This summand is a product of distinct factors of the form $M_{ij}^2$; from the distributions of the $M_{ij}$, we see that the expected value of each of these terms is $1/2^n$.\n\nSince the total number of perfect matchings $\\alpha$ is $(2n)!/(2^nn!)$, the expected value of $(\\ref{deteq})$ is therefore $(2n)!/(2^nn!)\\cdot 1/2^n=(2n)!/(4^nn!)$, as desired.",
  "vars": [
    "A",
    "A_ij",
    "M",
    "M_ij",
    "i",
    "j",
    "\\\\sigma",
    "\\\\alpha",
    "\\\\beta",
    "E_\\\\sigma"
  ],
  "params": [
    "n"
  ],
  "sci_consts": [],
  "variants": {
    "descriptive_long": {
      "map": {
        "A": "randommatrix",
        "A_ij": "randomentry",
        "M": "skewmatrix",
        "M_ij": "skewentry",
        "j": "columnindex",
        "\\sigma": "permutation",
        "\\alpha": "firstmatching",
        "\\beta": "secondmatching",
        "E_\\sigma": "permutationexpect",
        "n": "halfdimension"
      },
      "question": "Let $randommatrix$ be a $2\\halfdimension \\times 2\\halfdimension$ matrix, with entries chosen independently at random. Every entry is chosen to be 0 or 1, each with probability $1/2$. Find the expected value of $\\det(randommatrix-randommatrix^t)$ (as a function of $\\halfdimension$), where $randommatrix^t$ is the transpose of $randommatrix$.",
      "solution": "The expected value equals\n\\[\n\\frac{(2\\halfdimension)!}{4^\\halfdimension \\halfdimension!}.\n\\]\n\\noindent\n\\textbf{First solution:}\n\nWrite the determinant of $randommatrix-randommatrix^t$ as the sum over permutations $permutation$ of $\\{1,\\dots,2\\halfdimension\\}$ of the product\n\\[\n\\sgn(permutation)\n\\prod_{i=1}^{2\\halfdimension}\n(randommatrix-randommatrix^t)_{i\\,permutation(i)}\n=\n\\sgn(permutation) \\prod_{i=1}^{2\\halfdimension} (randommatrix_{i\\,permutation(i)} - randommatrix_{permutation(i) i});\n\\]\nthen the expected value of the determinant is the sum over $permutation$ of the expected value of this product, which we denote by $permutationexpect$.\n\nNote that if we partition $\\{1,\\dots,2\\halfdimension\\}$ into orbits for the action of $permutation$, then partition the factors of the product accordingly, then no entry of $randommatrix$ appears in more than one of these factors; consequently, these factors are independent random variables. This means that we can compute $permutationexpect$ as the product of the expected values of the individual factors.\n\nIt is obvious that any orbit of size 1 gives rise to the zero product, and hence the expected value of the corresponding factor is zero. For an orbit of size $m \\geq 3$, the corresponding factor contains $2m$ distinct matrix entries, so again we may compute the expected value of the factor as the product of the expected values of the individual terms $randommatrix_{i\\,permutation(i)} - randommatrix_{permutation(i) i}$. However, the distribution of this term is symmetric about 0, so its expected value is 0.\n\nWe conclude that $permutationexpect = 0$ unless $permutation$ acts with $\\halfdimension$ orbits of size 2. To compute $permutationexpect$ in this case, assume without loss of generality that the orbits of $permutation$ are\n$\\{1,2\\}, \\dots, \\{2\\halfdimension-1,2\\halfdimension\\}$; note that $\\sgn(permutation) = (-1)^\\halfdimension$. Then $permutationexpect$ is the expected value of\n$\\prod_{i=1}^{\\halfdimension} -(randommatrix_{(2i-1)\\,2i} - randommatrix_{2i\\,(2i-1)})^2$, which is $(-1)^\\halfdimension$ times the $\\halfdimension$-th power\nof the expected value of $(randommatrix_{12} - randommatrix_{21})^2$. Since $randommatrix_{12} - randommatrix_{21}$ takes the values $-1, 0, 1$ with probabilities $\\frac{1}{4}, \\frac{1}{2}, \\frac{1}{4}$, its square takes the values\n$0,1$ with probabilities $\\frac{1}{2}, \\frac{1}{2}$; we conclude that\n\\[\npermutationexpect = 2^{-\\halfdimension}.\n\\]\nThe permutations $permutation$ of this form correspond to unordered partitions of $\\{1,\\dots,2\\halfdimension\\}$ into $\\halfdimension$ sets of size 2, so there are\n\\[\n\\frac{(2\\halfdimension)!}{\\halfdimension!(2!)^{\\halfdimension}}\n\\]\nsuch permutations. Putting this all together yields the claimed result.\n\n\\noindent\n\\textbf{Second solution:}\n(by Manjul Bhargava)\nNote that the matrix $randommatrix-randommatrix^t$ is skew-symmetric:\n\\[\n(randommatrix-randommatrix^t)^t = randommatrix^t-randommatrix = -(randommatrix-randommatrix^t).\n\\]\nThe determinant of a $2\\halfdimension \\times 2\\halfdimension$ skew-symmetric matrix $skewmatrix$ is the square of the \\emph{Pfaffian} of $skewmatrix$, which is a polynomial of degree $\\halfdimension$ in the entries of $skewmatrix$ defined as follows. Define a \\emph{perfect matching} of $\\{1,\\ldots,2\\halfdimension\\}$ to be a permutation of $\\{1,\\ldots,2\\halfdimension\\}$ that is the product of $\\halfdimension$ disjoint transpositions. Then the Pfaffian of $skewmatrix$ is given by\n\\begin{equation}\\label{pfaffeq}\n\\sum_{firstmatching} \\sgn(firstmatching) \\, skewmatrix_{i_1,\\columnindex_1}\\cdots skewmatrix_{i_{\\halfdimension},\\columnindex_{\\halfdimension}}\n\\end{equation}\nwhere the sum is over perfect matchings $firstmatching=(i_1,\\columnindex_1)\\cdots(i_{\\halfdimension},\\columnindex_{\\halfdimension})$, and $\\sgn(firstmatching)$ denotes the sign of the permutation\n\\[\n\\left(\\begin{smallmatrix}\n1&2&3&4&\\cdots & (2\\halfdimension-1)&2\\halfdimension \\\\\n i_1&\\columnindex_1&i_2&\\columnindex_2& \\cdots & i_{\\halfdimension} & \\columnindex_{\\halfdimension}\n\\end{smallmatrix}\\right).\n\\]\nThe determinant of $skewmatrix$ is then the square of \\eqref{pfaffeq}, i.e.,\n\\begin{equation}\\label{deteq}\n\\det(skewmatrix)=\\sum_{firstmatching,secondmatching} \\sgn(firstmatching)\\sgn(secondmatching) \\, skewmatrix_{i_1,\\columnindex_1}\\cdots skewmatrix_{i_{\\halfdimension},\\columnindex_{\\halfdimension}} \\, skewmatrix_{i'_1,\\columnindex'_1}\\cdots skewmatrix_{i'_{\\halfdimension},\\columnindex'_{\\halfdimension}}\n\\end{equation}\nwhere the sum is now over ordered pairs\n$$(firstmatching=(i_1,\\columnindex_1)\\cdots(i_{\\halfdimension},\\columnindex_{\\halfdimension}),\\; secondmatching=(i'_1,\\columnindex'_1)\\cdots(i'_{\\halfdimension},\\columnindex'_{\\halfdimension}))$$\nof perfect matchings.\n\nTaking $skewmatrix = randommatrix - randommatrix^t$, so that $skewmatrix_{i\\,\\columnindex} = randommatrix_{i\\,\\columnindex} - randommatrix_{\\columnindex i}$, we wish to find the expected value of \\eqref{deteq}; again, this is the sum of the expected values of each summand in \\eqref{deteq}. Note that each $skewmatrix_{i\\,\\columnindex}$ with $i < \\columnindex$ is an independent random variable taking the values $-1,0,1$ with probabilities $\\frac14,\\frac12,\\frac14$, respectively.\n\nConsider first a summand in \\eqref{deteq} with $firstmatching \\neq secondmatching$. Then some factor $skewmatrix_{i\\,\\columnindex}$ occurs with exponent 1; since the distribution of $skewmatrix_{i\\,\\columnindex}$ is symmetric about 0, any such summand has expected value 0.\n\nConsider next a summand in \\eqref{deteq} with $firstmatching = secondmatching$. This summand is a product of distinct factors of the form $skewmatrix_{i\\,\\columnindex}^2$; from the distributions of the $skewmatrix_{i\\,\\columnindex}$, we see that the expected value of each of these terms is $1/2^{\\halfdimension}$.\n\nSince the total number of perfect matchings $firstmatching$ is $(2\\halfdimension)!/(2^{\\halfdimension}\\,\\halfdimension!)$, the expected value of \\eqref{deteq} is therefore $(2\\halfdimension)!/(2^{\\halfdimension}\\,\\halfdimension!) \\cdot 1/2^{\\halfdimension} = (2\\halfdimension)!/(4^{\\halfdimension}\\,\\halfdimension!)$, as desired."
    },
    "descriptive_long_confusing": {
      "map": {
        "A": "shoreline",
        "A_ij": "shorelinepiece",
        "M": "lighthouse",
        "M_ij": "lighthousepiece",
        "i": "cedarwood",
        "j": "mineralogy",
        "\\sigma": "compassrose",
        "\\alpha": "wanderlust",
        "\\beta": "starfishy",
        "E_\\sigma": "energycompass",
        "n": "marshland"
      },
      "question": "Let $shoreline$ be a $2marshland \\times 2marshland$ matrix, with entries chosen independently at random. Every entry is chosen to be 0 or 1, each with probability $1/2$. Find the expected value of $\\det(shoreline-shoreline^t)$ (as a function of $marshland$), where $shoreline^t$ is the transpose of $shoreline$.",
      "solution": "The expected value equals\n\\[\n\\frac{(2marshland)!}{4^{marshland} marshland!}.\n\\]\n\\noindent\n\\textbf{First solution:}\n\nWrite the determinant of $shoreline-shoreline^t$ as the sum over permutations $compassrose$ of $\\{1,\\dots,2marshland\\}$ of the product\n\\[\n\\sgn(compassrose)\n\\prod_{cedarwood=1}^{2marshland}\n(shoreline-shoreline^t)_{cedarwood\\, compassrose(cedarwood)} \n=\n\\sgn(compassrose) \\prod_{cedarwood=1}^{2marshland} (shoreline_{cedarwood\\, compassrose(cedarwood)} - shoreline_{compassrose(cedarwood)\\, cedarwood});\n\\]\nthen the expected value of the determinant is the sum over $compassrose$ of the expected value of this product, which we denote by $energycompass$. \n\nNote that if we partition $\\{1,\\dots,2marshland\\}$ into orbits for the action of $compassrose$, then partition the factors of the product accordingly, then no entry of $shoreline$ appears in more than one of these factors; consequently, these factors are independent random variables. This means that we can compute $energycompass$ as the product of the expected values of the individual factors.\n\nIt is obvious that any orbit of size 1 gives rise to the zero product, and hence the expected value of the corresponding factor is zero. For an orbit of size $m \\geq 3$, the corresponding factor contains $2m$ distinct matrix entries, so again we may compute the expected value of the factor as the product of the expected values of the individual terms $shoreline_{cedarwood\\, compassrose(cedarwood)} - shoreline_{compassrose(cedarwood)\\, cedarwood}$. However, the distribution of this term is symmetric about 0, so its expected value is 0.\n\nWe conclude that $energycompass = 0$ unless $compassrose$ acts with $marshland$ orbits of size 2. To compute $energycompass$ in this case, assume without loss of generality that the orbits of $compassrose$ are\n$\\{1,2\\}, \\dots, \\{2marshland-1,2marshland\\}$; note that $\\sgn(compassrose) = (-1)^{marshland}$. Then $energycompass$ is the expected value of\n$\\prod_{cedarwood=1}^{marshland} -(shoreline_{(2cedarwood-1)\\, 2cedarwood} - shoreline_{2cedarwood\\, (2cedarwood-1)})^2$, which is $(-1)^{marshland}$ times the $marshland$-th power\nof the expected value of $(shoreline_{12} - shoreline_{21})^2$. Since $shoreline_{12} - shoreline_{21}$ takes the values $-1, 0, 1$ with probabilities $\\frac{1}{4}, \\frac{1}{2}, \\frac{1}{4}$, its square takes the values\n$0,1$ with probabilities $\\frac{1}{2}, \\frac{1}{2}$; we conclude that\n\\[\nenergycompass = 2^{-marshland}.\n\\]\nThe permutations $compassrose$ of this form correspond to unordered partitions of $\\{1,\\dots,2marshland\\}$ into $marshland$ sets of size 2, so there are\n\\[\n\\frac{(2marshland)!}{marshland!(2!)^{marshland}}\n\\]\nsuch permutations. Putting this all together yields the claimed result.\n\n\\noindent\n\\textbf{Second solution:}\n(by Manjul Bhargava)\nNote that the matrix $shoreline-shoreline^t$ is skew-symmetric: \n\\[\n(shoreline-shoreline^t)^t = shoreline^t-shoreline = -(shoreline-shoreline^t).\n\\]\nThe determinant of a $2marshland \\times 2marshland$ skew-symmetric matrix $lighthouse$ is the square of the {\\it Pfaffian} of $lighthouse$, which is a polynomial of degree $marshland$ in the entries of $lighthouse$ defined as follows. Define a {\\it perfect matching} of $\\{1,\\ldots,2marshland\\}$ to be a permutation of $\\{1,\\ldots,2marshland\\}$ that is the product of $marshland$ disjoint transpositions. Then the Pfaffian of $lighthouse$ is given by\n\\begin{equation}\\label{pfaffeq}\n\\sum_{wanderlust} \\sgn(wanderlust) lighthouse_{cedarwood_1, mineralogy_1}\\cdots lighthouse_{cedarwood_{marshland}, mineralogy_{marshland}}\n\\end{equation}\nwhere the sum is over perfect matchings $wanderlust=(cedarwood_1,mineralogy_1)\\cdots(cedarwood_{marshland},mineralogy_{marshland})$,\nand $\\sgn(wanderlust)$ denotes the sign of the permutation\n$\\left(\\begin{smallmatrix}\n1&2&3&4&\\cdots & (2marshland-1)&2marshland \\\\\ncedarwood_1&mineralogy_1&cedarwood_2&mineralogy_2& \\cdots & cedarwood_{marshland} & mineralogy_{marshland}\n\\end{smallmatrix} \\right)$.  The determinant of $lighthouse$ is then the square of \\eqref{pfaffeq}, i.e.,\n\\begin{equation}\\label{deteq} \\det(lighthouse)=\\sum_{wanderlust,starfishy} \\sgn(wanderlust)\\sgn(starfishy) lighthouse_{cedarwood_1,mineralogy_1}\\cdots lighthouse_{cedarwood_{marshland},mineralogy_{marshland}}lighthouse_{cedarwood'_1,mineralogy'_1}\\cdots lighthouse_{cedarwood'_{marshland},mineralogy'_{marshland}}\n\\end{equation}\nwhere the sum is now over ordered pairs $$(wanderlust=(cedarwood_1,mineralogy_1)\\cdots(cedarwood_{marshland},mineralogy_{marshland}), starfishy=(cedarwood'_1,mineralogy'_1)\\cdots(cedarwood'_{marshland},mineralogy'_{marshland}))$$ of perfect matchings.\n\nTaking $lighthouse = shoreline - shoreline^t$, so that $lighthouse_{cedarwood mineralogy} = shoreline_{cedarwood mineralogy} - shoreline_{mineralogy cedarwood}$,\nwe wish to find the expected value of \\eqref{deteq}; again, this is the sum of the expected values of each summand in \\eqref{deteq}. Note that each $lighthouse_{cedarwood mineralogy}$ with $cedarwood < mineralogy$ is an independent random variable taking the values $-1,0,1$ with probabilities $\\frac14,\\frac12,\\frac14$, respectively.\n\nConsider first a summand in \\eqref{deteq} with $wanderlust\\neq starfishy$. Then some factor $lighthouse_{cedarwood mineralogy}$  occurs with exponent 1; since the distribution of $lighthouse_{cedarwood mineralogy}$ is symmetric about 0, any such summand has expected value 0.\n\nConsider next a summand in \\eqref{deteq} with $wanderlust= starfishy$. This summand is a product of distinct factors of the form $lighthouse_{cedarwood mineralogy}^2$; from the distributions of the $lighthouse_{cedarwood mineralogy}$, we see that the expected value of each of these terms is $1/2^{marshland}$.\n\nSince the total number of perfect matchings $wanderlust$ is $(2marshland)!/(2^{marshland}marshland!)$, the expected value of $(\\ref{deteq})$ is therefore $(2marshland)!/(2^{marshland}marshland!)\\cdot 1/2^{marshland}=(2marshland)!/(4^{marshland}marshland!)$, as desired."
    },
    "descriptive_long_misleading": {
      "map": {
        "A": "stablematrix",
        "A_ij": "stableentry",
        "M": "symmatrix",
        "M_ij": "symentry",
        "i": "elementvar",
        "j": "contentvar",
        "\\sigma": "constantmap",
        "\\alpha": "mismatchper",
        "\\beta": "mismatchsec",
        "E_\\sigma": "errorconstantmap",
        "n": "infinitum"
      },
      "question": "Let $stablematrix$ be a $2\\infinitum \\times 2\\infinitum$ matrix, with entries chosen independently at random. Every entry is chosen to be 0 or 1, each with probability $1/2$. Find the expected value of $\\det(stablematrix-stablematrix^t)$ (as a function of $\\infinitum$), where $stablematrix^t$ is the transpose of $stablematrix$.",
      "solution": "The expected value equals\n\\[\n\\frac{(2\\infinitum)!}{4^{\\infinitum}\\,\\infinitum!}.\n\\]\n\\noindent\n\\textbf{First solution:}\n\nWrite the determinant of $stablematrix-stablematrix^t$ as the sum over permutations $constantmap$ of $\\{1,\\dots,2\\infinitum\\}$ of the product\n\\[\n\\sgn(constantmap)\n\\prod_{elementvar=1}^{2\\infinitum}\n(stablematrix-stablematrix^t)_{elementvar\\,constantmap(elementvar)} \n=\n\\sgn(constantmap) \\prod_{elementvar=1}^{2\\infinitum} (stablematrix_{elementvar\\,constantmap(elementvar)} - stablematrix_{constantmap(elementvar)\\,elementvar});\n\\]\nthen the expected value of the determinant is the sum over $constantmap$ of the expected value of this product, which we denote by $errorconstantmap$.\n\nNote that if we partition $\\{1,\\dots,2\\infinitum\\}$ into orbits for the action of $constantmap$, then partition the factors of the product accordingly, then no entry of $stablematrix$ appears in more than one of these factors; consequently, these factors are independent random variables. This means that we can compute $errorconstantmap$ as the product of the expected values of the individual factors.\n\nIt is obvious that any orbit of size 1 gives rise to the zero product, and hence the expected value of the corresponding factor is zero. For an orbit of size $m \\geq 3$, the corresponding factor contains $2m$ distinct matrix entries, so again we may compute the expected value of the factor as the product of the expected values of the individual terms $stablematrix_{elementvar\\,constantmap(elementvar)} - stablematrix_{constantmap(elementvar)\\,elementvar}$. However, the distribution of this term is symmetric about 0, so its expected value is 0.\n\nWe conclude that $errorconstantmap = 0$ unless $constantmap$ acts with $\\infinitum$ orbits of size 2. To compute $errorconstantmap$ in this case, assume without loss of generality that the orbits of $constantmap$ are\n$\\{1,2\\}, \\dots, \\{2\\infinitum-1,2\\infinitum\\}$; note that $\\sgn(constantmap) = (-1)^{\\infinitum}$. Then $errorconstantmap$ is the expected value of\n$\\prod_{elementvar=1}^{\\infinitum} -(stablematrix_{(2elementvar-1)2elementvar} - stablematrix_{2elementvar(2elementvar-1)})^2$, which is $(-1)^{\\infinitum}$ times the $\\infinitum$-th power\nof the expected value of $(stablematrix_{12} - stablematrix_{21})^2$. Since $stablematrix_{12} - stablematrix_{21}$ takes the values $-1, 0, 1$ with probabilities $\\tfrac14, \\tfrac12, \\tfrac14$, its square takes the values\n$0,1$ with probabilities $\\tfrac12, \\tfrac12$; we conclude that\n\\[\nerrorconstantmap = 2^{-\\infinitum}.\n\\]\nThe permutations $constantmap$ of this form correspond to unordered partitions of $\\{1,\\dots,2\\infinitum\\}$ into $\\infinitum$ sets of size 2, so there are\n\\[\n\\frac{(2\\infinitum)!}{\\infinitum!(2!)^{\\infinitum}}\n\\]\nsuch permutations. Putting this all together yields the claimed result.\n\n\\noindent\n\\textbf{Second solution:}\n(by Manjul Bhargava)\nNote that the matrix $stablematrix-stablematrix^t$ is skew-symmetric: \n\\[\n(stablematrix-stablematrix^t)^t = stablematrix^t-stablematrix = -(stablematrix-stablematrix^t).\n\\]\nThe determinant of a $2\\infinitum \\times 2\\infinitum$ skew-symmetric matrix $symmatrix$ is the square of the {\\it Pfaffian} of $symmatrix$, which is a polynomial of degree $\\infinitum$ in the entries of $symmatrix$ defined as follows. Define a {\\it perfect matching} of $\\{1,\\ldots,2\\infinitum\\}$ to be a permutation of $\\{1,\\ldots,2\\infinitum\\}$ that is the product of $\\infinitum$ disjoint transpositions. Then the Pfaffian of $symmatrix$ is given by\n\\begin{equation}\\label{pfaffeq}\n\\sum_{mismatchper} \\sgn(mismatchper) symentry_{elementvar_1,contentvar_1}\\cdots symentry_{elementvar_{\\infinitum},contentvar_{\\infinitum}}\n\\end{equation}\nwhere the sum is over perfect matchings $mismatchper=(elementvar_1,contentvar_1)\\cdots(elementvar_{\\infinitum},contentvar_{\\infinitum})$,\nand $\\sgn(mismatchper)$ denotes the sign of the permutation\n$\\left(\\begin{smallmatrix}\n1&2&3&4&\\cdots & (2\\infinitum-1)&2\\infinitum \\\\\nelementvar_1&contentvar_1&elementvar_2&contentvar_2& \\cdots & elementvar_{\\infinitum} & contentvar_{\\infinitum}\n\\end{smallmatrix} \\right)$.\nThe determinant of $symmatrix$ is then the square of \\eqref{pfaffeq}, i.e.,\n\\begin{equation}\\label{deteq} \\det(symmatrix)=\\sum_{mismatchper,mismatchsec} \\sgn(mismatchper)\\sgn(mismatchsec) symentry_{elementvar_1,contentvar_1}\\cdots symentry_{elementvar_{\\infinitum},contentvar_{\\infinitum}}symentry_{elementvar'_1,contentvar'_1}\\cdots symentry_{elementvar'_{\\infinitum},contentvar'_{\\infinitum}}\n\\end{equation}\nwhere the sum is now over ordered pairs $$(mismatchper=(elementvar_1,contentvar_1)\\cdots(elementvar_{\\infinitum},contentvar_{\\infinitum}),\\,mismatchsec=(elementvar'_1,contentvar'_1)\\cdots(elementvar'_{\\infinitum},contentvar'_{\\infinitum}))$$ of perfect matchings.\n\nTaking $symmatrix = stablematrix - stablematrix^t$, so that $symentry_{elementvar\\,contentvar} = stablematrix_{elementvar\\,contentvar} - stablematrix_{contentvar\\,elementvar}$,\nwe wish to find the expected value of \\eqref{deteq}; again, this is the sum of the expected values of each summand in \\eqref{deteq}. Note that each $symentry_{elementvar\\,contentvar}$ with $elementvar < contentvar$ is an independent random variable taking the values $-1,0,1$ with probabilities $\\tfrac14,\\tfrac12,\\tfrac14$, respectively.\n\nConsider first a summand in \\eqref{deteq} with mismatchper$\\neq$ mismatchsec. Then some factor $symentry_{elementvar\\,contentvar}$ occurs with exponent 1; since the distribution of $symentry_{elementvar\\,contentvar}$ is symmetric about 0, any such summand has expected value 0.\n\nConsider next a summand in \\eqref{deteq} with mismatchper = mismatchsec. This summand is a product of distinct factors of the form $symentry_{elementvar\\,contentvar}^2$; from the distributions of the $symentry_{elementvar\\,contentvar}$, we see that the expected value of each of these terms is $1/2^{\\infinitum}$.\n\nSince the total number of perfect matchings mismatchper is $(2\\infinitum)!/(2^{\\infinitum}\\,\\infinitum!)$, the expected value of $(\\ref{deteq})$ is therefore $(2\\infinitum)!/(2^{\\infinitum}\\,\\infinitum!)\\cdot 1/2^{\\infinitum}=(2\\infinitum)!/(4^{\\infinitum}\\,\\infinitum!)$, as desired."
    },
    "garbled_string": {
      "map": {
        "A": "qzxwvtnp",
        "A_ij": "rufmqtas",
        "M": "kdzsroub",
        "M_ij": "wpexchyl",
        "i": "hqvzyfdo",
        "j": "nobxfqrc",
        "\\sigma": "xzglvkon",
        "\\alpha": "ubpqeida",
        "\\beta": "nyczwohm",
        "E_\\sigma": "sgvmhrkw",
        "n": "bajtufle"
      },
      "question": "Let $qzxwvtnp$ be a $2bajtufle \\times 2bajtufle$ matrix, with entries chosen independently at random. Every entry is chosen to be 0 or 1, each with probability $1/2$. Find the expected value of $\\det(qzxwvtnp-qzxwvtnp^t)$ (as a function of $bajtufle$), where $qzxwvtnp^t$ is the transpose of $qzxwvtnp$.",
      "solution": "The expected value equals\n\\[\n\\frac{(2bajtufle)!}{4^{bajtufle} bajtufle!}.\n\\]\n\\noindent\n\\textbf{First solution:}\n\nWrite the determinant of $qzxwvtnp-qzxwvtnp^t$ as the sum over permutations $xzglvkon$ of $\\{1,\\dots,2bajtufle\\}$ of the product\n\\[\n\\sgn(xzglvkon)\n\\prod_{hqvzyfdo=1}^{2bajtufle}\n(qzxwvtnp-qzxwvtnp^t)_{hqvzyfdo\\, xzglvkon(hqvzyfdo)} \n=\n\\sgn(xzglvkon) \\prod_{hqvzyfdo=1}^{2bajtufle} (qzxwvtnp_{hqvzyfdo\\, xzglvkon(hqvzyfdo)} - qzxwvtnp_{xzglvkon(hqvzyfdo)\\, hqvzyfdo});\n\\]\nthen the expected value of the determinant is the sum over $xzglvkon$ of the expected value of this product, which we denote by sgvmhrkw. \n\nNote that if we partition $\\{1,\\dots,2bajtufle\\}$ into orbits for the action of $xzglvkon$, then partition the factors of the product accordingly, then no entry of $qzxwvtnp$ appears in more than one of these factors; consequently, these factors are independent random variables. This means that we can compute sgvmhrkw as the product of the expected values of the individual factors.\n\nIt is obvious that any orbit of size 1 gives rise to the zero product, and hence the expected value of the corresponding factor is zero. For an orbit of size $m \\geq 3$, the corresponding factor contains $2m$ distinct matrix entries, so again we may compute the expected value of the factor as the product of the expected values of the individual terms $qzxwvtnp_{hqvzyfdo\\, xzglvkon(hqvzyfdo)} - qzxwvtnp_{xzglvkon(hqvzyfdo)\\, hqvzyfdo}$. However, the distribution of this term is symmetric about 0, so its expected value is 0.\n\nWe conclude that sgvmhrkw = 0 unless $xzglvkon$ acts with bajtufle orbits of size 2. To compute sgvmhrkw in this case, assume without loss of generality that the orbits of $xzglvkon$ are\n$\\{1,2\\}, \\dots, \\{2bajtufle-1,2bajtufle\\}$; note that $\\sgn(xzglvkon) = (-1)^{bajtufle}$. Then sgvmhrkw is the expected value of\n$\\prod_{hqvzyfdo=1}^{bajtufle} -(qzxwvtnp_{(2hqvzyfdo-1)2hqvzyfdo} - qzxwvtnp_{2hqvzyfdo(2hqvzyfdo-1)})^2$, which is $(-1)^{bajtufle}$ times the bajtufle-th power\nof the expected value of $(qzxwvtnp_{12} - qzxwvtnp_{21})^2$. Since $qzxwvtnp_{12} - qzxwvtnp_{21}$ takes the values $-1, 0, 1$ with probabilities $\\frac{1}{4}, \\frac{1}{2}, \\frac{1}{4}$, its square takes the values\n$0,1$ with probabilities $\\frac{1}{2}, \\frac{1}{2}$; we conclude that\n\\[\nsgvmhrkw = 2^{-bajtufle}.\n\\]\nThe permutations $xzglvkon$ of this form correspond to unordered partitions of $\\{1,\\dots,2bajtufle\\}$ into bajtufle sets of size 2, so there are\n\\[\n\\frac{(2bajtufle)!}{bajtufle!(2!)^{bajtufle}}\n\\]\nsuch permutations. Putting this all together yields the claimed result.\n\n\\noindent\n\\textbf{Second solution:}\n(by Manjul Bhargava)\nNote that the matrix $qzxwvtnp-qzxwvtnp^t$ is skew-symmetric: \n\\[\n(qzxwvtnp-qzxwvtnp^t)^t = qzxwvtnp^t-qzxwvtnp = -(qzxwvtnp-qzxwvtnp^t).\n\\]\nThe determinant of a $2bajtufle \\times 2bajtufle$ skew-symmetric matrix $kdzsroub$ is the square of the {\\it Pfaffian} of $kdzsroub$, which is a polynomial of degree bajtufle in the entries of $kdzsroub$ defined as follows. Define a {\\it perfect matching} of $\\{1,\\ldots,2bajtufle\\}$ to be a permutation of $\\{1,\\ldots,2bajtufle\\}$ that is the product of bajtufle disjoint transpositions. Then the Pfaffian of $kdzsroub$ is given by\n\\begin{equation}\\label{pfaffeq}\n\\sum_{ubpqeida} \\sgn(ubpqeida) kdzsroub_{hqvzyfdo_1,nobxfqrc_1}\\cdots kdzsroub_{hqvzyfdo_{bajtufle},nobxfqrc_{bajtufle}}\n\\end{equation}\nwhere the sum is over perfect matchings $ubpqeida=(hqvzyfdo_1,nobxfqrc_1)\\cdots(hqvzyfdo_{bajtufle},nobxfqrc_{bajtufle})$,\nand $\\sgn(ubpqeida)$ denotes the sign of the permutation\n$\\left(\\begin{smallmatrix}\n1&2&3&4&\\cdots & (2bajtufle-1)&2bajtufle \\\\\n hqvzyfdo_1&nobxfqrc_1&hqvzyfdo_2&nobxfqrc_2& \\cdots & hqvzyfdo_{bajtufle} & nobxfqrc_{bajtufle}\n\\end{smallmatrix} \\right)$. The determinant of $kdzsroub$ is then the square of \\eqref{pfaffeq}, i.e.,\n\\begin{equation}\\label{deteq} \\det(kdzsroub)=\\sum_{ubpqeida,nyczwohm} \\sgn(ubpqeida)\\sgn(nyczwohm) kdzsroub_{hqvzyfdo_1,nobxfqrc_1}\\cdots kdzsroub_{hqvzyfdo_{bajtufle},nobxfqrc_{bajtufle}}kdzsroub_{hqvzyfdo'_1,nobxfqrc'_1}\\cdots kdzsroub_{hqvzyfdo'_{bajtufle},nobxfqrc'_{bajtufle}}\n\\end{equation}\nwhere the sum is now over ordered pairs $$(ubpqeida=(hqvzyfdo_1,nobxfqrc_1)\\cdots(hqvzyfdo_{bajtufle},nobxfqrc_{bajtufle}),nyczwohm=(hqvzyfdo'_1,nobxfqrc'_1)\\cdots(hqvzyfdo'_{bajtufle},nobxfqrc'_{bajtufle}))$$ of perfect matchings.\n\nTaking $kdzsroub = qzxwvtnp - qzxwvtnp^t$, so that $kdzsroub_{hqvzyfdo nobxfqrc} = qzxwvtnp_{hqvzyfdo nobxfqrc} - qzxwvtnp_{nobxfqrc hqvzyfdo}$,\nwe wish to find the expected value of \\eqref{deteq}; again, this is the sum of the expected values of each summand in \\eqref{deteq}. Note that each $kdzsroub_{hqvzyfdo nobxfqrc}$ with $hqvzyfdo < nobxfqrc$ is an independent random variable taking the values $-1,0,1$ with probabilities $\\frac14,\\frac12,\\frac14$, respectively.\n\nConsider first a summand in \\eqref{deteq} with $ubpqeida\\neq nyczwohm$. Then some factor $kdzsroub_{hqvzyfdo nobxfqrc}$  occurs with exponent 1; since the distribution of $kdzsroub_{hqvzyfdo nobxfqrc}$ is symmetric about 0, any such summand has expected value 0.\n\nConsider next a summand in \\eqref{deteq} with $ubpqeida= nyczwohm$. This summand is a product of distinct factors of the form $kdzsroub_{hqvzyfdo nobxfqrc}^2$; from the distributions of the $kdzsroub_{hqvzyfdo nobxfqrc}$, we see that the expected value of each of these terms is $1/2^{bajtufle}$.\n\nSince the total number of perfect matchings $ubpqeida$ is $(2bajtufle)!/(2^{bajtufle}bajtufle!)$, the expected value of $(\\ref{deteq})$ is therefore $(2bajtufle)!/(2^{bajtufle}bajtufle!)\\cdot 1/2^{bajtufle}=(2bajtufle)!/(4^{bajtufle}bajtufle!)$, as desired."
    },
    "kernel_variant": {
      "question": "Fix a positive integer n and split the index set  \n{1,2,…,4n} into two equal “colour-classes’’  \nR = {1,…,2n} (red) and B = {2n+1,…,4n} (blue).  \n\nFor every ordered pair (i,j) with i≠j let the random variables  \n\n X_{ij} (i,j ∈ R ∪ B, i≠j)\n\nbe mutually independent and distributed according to the rule\n\n • If {i,j}⊂R or {i,j}⊂B (same colour) then  \n  P(X_{ij}=−3)=1/4 and P(X_{ij}= 3)=3/4.\n\n • If i and j have different colours  (cross-colour) then  \n  P(X_{ij}=−1)=P(X_{ij}= 1)=1/2.\n\nDefine the (skew–symmetric) random matrix  \n\n M = X^t − X, so M_{ij}=X_{ji}−X_{ij}, M_{ji}=−M_{ij}, M_{ii}=0.\n\nCompute the exact expected value  \n\n  E[ det (M) ]                         (1)\n\nas an explicit function of n.",
      "solution": "Step 1.  Basic facts about det (M).  \nBecause M is 4n×4n and skew-symmetric, det (M) = Pf (M)^2, where the Pfaffian Pf (M) is a polynomial of degree 2n in the entries M_{ij} (i<j).  Writing  \n\n Pf (M)=∑_{α} sgn(α) ∏_{(p,q)∈α} M_{pq},                (2)\n\nthe sum ranges over all perfect matchings  \nα = {(p₁,q₁),…,(p_{2n},q_{2n})} of {1,…,4n}.  \nHence  \n\n det (M)=∑_{α,β} sgn(α) sgn(β) ∏_{(p,q)∈α} M_{pq} ∏_{(r,s)∈β} M_{rs}.    (3)\n\nStep 2.  Vanishing of almost all expectations.  \nTaking expectation in (3), independence of the entries implies that a monomial contributes only when every individual M_{ij} appears with an even exponent.  That happens exactly when α = β.  Therefore  \n\n E[det (M)]=∑_{α} E[ ∏_{(p,q)∈α} M_{pq}^2 ].                    (4)\n\nStep 3.  Second moments of the entries.  \nWrite v_s for the variance of a same-colour difference and v_c for the variance of a cross-colour difference:\n\n If (p,q) are the same colour then  \n  M_{pq}=X_{qp}−X_{pq},  X_{qp},X_{pq}  i.i.d. with  \n   P(−3)=1/4, P(3)=3/4, E[X]=−3/4+9/4=3/2  \n   E[X²]=9(1/4+3/4)=9, Var(X)=9−(3/2)²=9−9/4=27/4  \n  ⇒ v_s=Var(M_{pq})=Var(X_{qp})+Var(X_{pq})=2·27/4 = 27/2.  \n\n If (p,q) have different colours then  \n  X_{pq},X_{qp} take ±1 with probability 1/2, so Var(X)=1  \n  ⇒ v_c=Var(M_{pq})=2·1 = 2.\n\nThus  \n E[M_{pq}^2]=v_s whenever {p,q}⊂R or {p,q}⊂B,  \n E[M_{pq}^2]=v_c whenever p∈R, q∈B or vice-versa.            (5)\n\nStep 4.  Classifying a perfect matching by the number of cross-colour edges.  \nLet a perfect matching α contain 2k cross-colour edges (necessarily k=0,1,…,n); the remaining 2n−2k edges are within one colour.  Because of (5),\n\n E[ ∏_{(p,q)∈α} M_{pq}^2 ] = v_c^{2k} · v_s^{2n−2k}.             (6)\n\nHence (4) becomes  \n\n E[det(M)] = ∑_{k=0}^{n}  N_k · v_c^{2k} · v_s^{2n−2k},          (7)\n\nwhere N_k is the number of perfect matchings on {1,…,4n} having exactly 2k cross-colour edges.\n\nStep 5.  Counting N_k.  \nChoose 2k reds and 2k blues to form the cross edges, match them bipartitely, then match the remaining vertices inside each colour class.\n\n(i) Choosing vertices: C(2n,2k) ways for reds and the same for blues.  \n(ii) Bipartite matching of 2k red to 2k blue vertices: (2k)! possibilities.  \n(iii) Matching the remaining 2(n−k) reds among themselves:  \n (2(n−k))! / [2^{\\,n−k}(n−k)!].  \n(iv) Similarly for the remaining blues.\n\nTherefore  \n\n N_k = C(2n,2k)^2 · (2k)! · (2(n−k))!^2 / [2^{\\,2(n−k)} (n−k)!^2].    (8)\n\nStep 6.  Inserting v_s and v_c.  \nFrom Step 3, v_s = 27/2 and v_c = 2.  Combining (7) and (8) gives\n\n E[det(M)] =\n  ∑_{k=0}^{n}\\!\n   \\binom{2n}{2k}^{\\!2}\\,\n   \\frac{(2k)!\\,[2(n-k)]!^{\\,2}}{2^{\\,2(n-k)}(n-k)!^{\\,2}}\\;\n   \\bigl(2\\bigr)^{2k}\\!\\!\n   \\bigl(\\tfrac{27}{2}\\bigr)^{\\,2n-2k}.             (9)\n\nThat explicitly evaluates (1) for every positive integer n.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T19:09:31.844585",
        "was_fixed": false,
        "difficulty_analysis": "1.  Heterogeneous variances.  The matrix entries come from two different distributions, forcing the expectation to depend on where each edge of a perfect matching lies.  Unlike the original problems, one can no longer factor out a single global second moment.\n\n2.  Weighted combinatorics of matchings.  Because the weights v_s and v_c differ, we must enumerate perfect matchings by the exact number of cross-colour edges.  This requires a careful multistage counting argument (Step 5) rather than merely recognising the double-factorial count (2n)!/(2^n n!).\n\n3.  Multiple interacting concepts.  The solver must blend facts about Pfaffians, moment computations for non-centred distributions, and detailed combinatorics of coloured matchings.\n\n4.  Substantially longer solution path.  The final formula (9) emerges only after six conceptual steps, each deeper than anything needed for the original or the previous kernel variant.\n\n5.  No quick symmetry kill.  Because odd moments vanish but even moments differ by colour, simple “everything cancels but one term’’ arguments break down; instead the survivor sum is a non-trivial weighted series."
      }
    },
    "original_kernel_variant": {
      "question": "Fix a positive integer n and split the index set  \n{1,2,…,4n} into two equal “colour-classes’’  \nR = {1,…,2n} (red) and B = {2n+1,…,4n} (blue).  \n\nFor every ordered pair (i,j) with i≠j let the random variables  \n\n X_{ij} (i,j ∈ R ∪ B, i≠j)\n\nbe mutually independent and distributed according to the rule\n\n • If {i,j}⊂R or {i,j}⊂B (same colour) then  \n  P(X_{ij}=−3)=1/4 and P(X_{ij}= 3)=3/4.\n\n • If i and j have different colours  (cross-colour) then  \n  P(X_{ij}=−1)=P(X_{ij}= 1)=1/2.\n\nDefine the (skew–symmetric) random matrix  \n\n M = X^t − X, so M_{ij}=X_{ji}−X_{ij}, M_{ji}=−M_{ij}, M_{ii}=0.\n\nCompute the exact expected value  \n\n  E[ det (M) ]                         (1)\n\nas an explicit function of n.",
      "solution": "Step 1.  Basic facts about det (M).  \nBecause M is 4n×4n and skew-symmetric, det (M) = Pf (M)^2, where the Pfaffian Pf (M) is a polynomial of degree 2n in the entries M_{ij} (i<j).  Writing  \n\n Pf (M)=∑_{α} sgn(α) ∏_{(p,q)∈α} M_{pq},                (2)\n\nthe sum ranges over all perfect matchings  \nα = {(p₁,q₁),…,(p_{2n},q_{2n})} of {1,…,4n}.  \nHence  \n\n det (M)=∑_{α,β} sgn(α) sgn(β) ∏_{(p,q)∈α} M_{pq} ∏_{(r,s)∈β} M_{rs}.    (3)\n\nStep 2.  Vanishing of almost all expectations.  \nTaking expectation in (3), independence of the entries implies that a monomial contributes only when every individual M_{ij} appears with an even exponent.  That happens exactly when α = β.  Therefore  \n\n E[det (M)]=∑_{α} E[ ∏_{(p,q)∈α} M_{pq}^2 ].                    (4)\n\nStep 3.  Second moments of the entries.  \nWrite v_s for the variance of a same-colour difference and v_c for the variance of a cross-colour difference:\n\n If (p,q) are the same colour then  \n  M_{pq}=X_{qp}−X_{pq},  X_{qp},X_{pq}  i.i.d. with  \n   P(−3)=1/4, P(3)=3/4, E[X]=−3/4+9/4=3/2  \n   E[X²]=9(1/4+3/4)=9, Var(X)=9−(3/2)²=9−9/4=27/4  \n  ⇒ v_s=Var(M_{pq})=Var(X_{qp})+Var(X_{pq})=2·27/4 = 27/2.  \n\n If (p,q) have different colours then  \n  X_{pq},X_{qp} take ±1 with probability 1/2, so Var(X)=1  \n  ⇒ v_c=Var(M_{pq})=2·1 = 2.\n\nThus  \n E[M_{pq}^2]=v_s whenever {p,q}⊂R or {p,q}⊂B,  \n E[M_{pq}^2]=v_c whenever p∈R, q∈B or vice-versa.            (5)\n\nStep 4.  Classifying a perfect matching by the number of cross-colour edges.  \nLet a perfect matching α contain 2k cross-colour edges (necessarily k=0,1,…,n); the remaining 2n−2k edges are within one colour.  Because of (5),\n\n E[ ∏_{(p,q)∈α} M_{pq}^2 ] = v_c^{2k} · v_s^{2n−2k}.             (6)\n\nHence (4) becomes  \n\n E[det(M)] = ∑_{k=0}^{n}  N_k · v_c^{2k} · v_s^{2n−2k},          (7)\n\nwhere N_k is the number of perfect matchings on {1,…,4n} having exactly 2k cross-colour edges.\n\nStep 5.  Counting N_k.  \nChoose 2k reds and 2k blues to form the cross edges, match them bipartitely, then match the remaining vertices inside each colour class.\n\n(i) Choosing vertices: C(2n,2k) ways for reds and the same for blues.  \n(ii) Bipartite matching of 2k red to 2k blue vertices: (2k)! possibilities.  \n(iii) Matching the remaining 2(n−k) reds among themselves:  \n (2(n−k))! / [2^{\\,n−k}(n−k)!].  \n(iv) Similarly for the remaining blues.\n\nTherefore  \n\n N_k = C(2n,2k)^2 · (2k)! · (2(n−k))!^2 / [2^{\\,2(n−k)} (n−k)!^2].    (8)\n\nStep 6.  Inserting v_s and v_c.  \nFrom Step 3, v_s = 27/2 and v_c = 2.  Combining (7) and (8) gives\n\n E[det(M)] =\n  ∑_{k=0}^{n}\\!\n   \\binom{2n}{2k}^{\\!2}\\,\n   \\frac{(2k)!\\,[2(n-k)]!^{\\,2}}{2^{\\,2(n-k)}(n-k)!^{\\,2}}\\;\n   \\bigl(2\\bigr)^{2k}\\!\\!\n   \\bigl(\\tfrac{27}{2}\\bigr)^{\\,2n-2k}.             (9)\n\nThat explicitly evaluates (1) for every positive integer n.",
      "metadata": {
        "replaced_from": "harder_variant",
        "replacement_date": "2025-07-14T01:37:45.646847",
        "was_fixed": false,
        "difficulty_analysis": "1.  Heterogeneous variances.  The matrix entries come from two different distributions, forcing the expectation to depend on where each edge of a perfect matching lies.  Unlike the original problems, one can no longer factor out a single global second moment.\n\n2.  Weighted combinatorics of matchings.  Because the weights v_s and v_c differ, we must enumerate perfect matchings by the exact number of cross-colour edges.  This requires a careful multistage counting argument (Step 5) rather than merely recognising the double-factorial count (2n)!/(2^n n!).\n\n3.  Multiple interacting concepts.  The solver must blend facts about Pfaffians, moment computations for non-centred distributions, and detailed combinatorics of coloured matchings.\n\n4.  Substantially longer solution path.  The final formula (9) emerges only after six conceptual steps, each deeper than anything needed for the original or the previous kernel variant.\n\n5.  No quick symmetry kill.  Because odd moments vanish but even moments differ by colour, simple “everything cancels but one term’’ arguments break down; instead the survivor sum is a non-trivial weighted series."
      }
    }
  },
  "checked": true,
  "problem_type": "calculation",
  "iteratively_fixed": true
}