{
  "id": "multinomial-coefficient",
  "title": "Multinomial coefficient",
  "lang": "en",
  "source_lang": "en",
  "summary": "A multinomial coefficient counts arrangements with prescribed category counts and gives the corresponding coefficient in a power of a sum.",
  "category": "mathematics",
  "subcategory": "discrete-logic",
  "type": "concept",
  "aliases": [],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/multinomial-coefficient/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/multinomial-coefficient/",
      "json": "https://aiwiki.page/zh/multinomial-coefficient.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A multinomial coefficient is a nonnegative integer that counts how many ways \\(n\\) distinct objects can be divided among labeled groups of specified sizes, or how many distinct sequences have specified numbers of occurrences of each symbol. It generalizes the binomial coefficient from two groups to any finite number of groups. Multinomial coefficients appear in combinatorics, in expansions of powers of sums, and in probability calculations involving several possible outcomes."
    },
    {
      "heading": "Definition and notation",
      "text": "For nonnegative integers \\(n_1,\\ldots,n_k\\) satisfying\n\n\\[n_1+\\cdots+n_k=n,\\]\n\nthe multinomial coefficient is\n\n\\[\\binom{n}{n_1,n_2,\\ldots,n_k} =\\frac{n!}{n_1!n_2!\\cdots n_k!},\\]\n\nwhere \\(m!\\) denotes the factorial of \\(m\\), with \\(0!=1\\).\n\nThe upper argument is the total number of objects or positions; the lower arguments specify their category counts. Some notation omits the upper argument because it is determined by the lower arguments.\n\nFor two categories,\n\n\\[\\binom{n}{r,n-r}=\\binom{n}{r}.\\]\n\nFor one category, the coefficient is \\(1\\). If \\(n=0\\), all category counts are zero and the coefficient is also \\(1\\), corresponding to the unique empty arrangement.\n\nThe factorial definition assumes that all lower arguments are nonnegative and sum to the upper argument. In recurrences and coefficient formulas, it is often convenient to extend the definition by assigning the value zero to integer tuples that violate these conditions."
    },
    {
      "heading": "Counting interpretations",
      "text": "Dividing distinct objects into labeled groups\n\nSuppose \\(n\\) distinct objects are assigned to \\(k\\) labeled groups, with group \\(i\\) required to contain exactly \\(n_i\\) objects. The number of assignments is\n\n\\[\\binom{n}{n_1,\\ldots,n_k}.\\]\n\nTo see this, arrange all \\(n\\) objects in a row, then cut the row into consecutive blocks of lengths \\(n_1,\\ldots,n_k\\). There are \\(n!\\) initial arrangements. Rearranging the objects within any block does not change the group assignment, so every assignment is counted \\(n_1!\\cdots n_k!\\) times.\n\nThe group labels matter. If groups are instead unlabeled, the counting problem becomes one about set partitions, and additional adjustments may be required. For example, dividing \\(n=kr\\) distinct objects into \\(k\\) unlabeled groups, all of positive size \\(r\\), gives\n\n\\[\\frac{n!}{(r!)^k k!}.\\]\n\nArrangements of repeated symbols\n\nThe same coefficient counts distinct sequences of length \\(n\\) containing \\(n_i\\) copies of symbol \\(i\\). This is often described as counting permutations of a multiset.\n\nFor example, the word BANANA contains three copies of A, two of N, and one of B. Its distinct letter arrangements number\n\n\\[\\binom{6}{3,2,1} =\\frac{6!}{3!\\,2!\\,1!} =60.\\]\n\nAlthough repeated symbols are indistinguishable, their positions in the sequence are distinct. Choosing which positions receive each symbol is equivalent to assigning the positions to labeled groups.\n\nLattice paths\n\nConsider paths from the origin to \\((n_1,\\ldots,n_k)\\) in an integer lattice, where each step increases exactly one coordinate by \\(1\\). Every path contains \\(n_i\\) steps in coordinate direction \\(i\\), so the number of paths is\n\n\\[\\binom{n_1+\\cdots+n_k}{n_1,\\ldots,n_k}.\\]\n\nThis interpretation applies when no additional restrictions, such as forbidden vertices or boundary constraints, are imposed."
    },
    {
      "heading": "The multinomial theorem",
      "text": "The multinomial theorem states that\n\n\\[(x_1+\\cdots+x_k)^n = \\sum_{\\substack{n_1,\\ldots,n_k\\geq0\\\\ n_1+\\cdots+n_k=n}} \\binom{n}{n_1,\\ldots,n_k} x_1^{n_1}\\cdots x_k^{n_k}.\\]\n\nThus, the multinomial coefficient is the coefficient of the indicated monomial in the expanded polynomial. For \\(k=2\\), this is the binomial theorem.\n\nThe formula follows by viewing the power as a product of \\(n\\) identical sums. To obtain \\(x_1^{n_1}\\cdots x_k^{n_k}\\), one must choose \\(x_i\\) from exactly \\(n_i\\) of the factors. The number of such choices is the multinomial coefficient.\n\nFor example,\n\n\\[(x+y+z)^3 =x^3+y^3+z^3 +3x^2y+3x^2z+3xy^2 +3y^2z+3xz^2+3yz^2+6xyz.\\]\n\nThe coefficient of \\(xyz\\) is\n\n\\[\\binom{3}{1,1,1}=6.\\]\n\nThe theorem holds for commuting variables, including elements of a commutative ring. It does not apply in this form to arbitrary noncommuting quantities: terms such as \\(xy\\) and \\(yx\\) need not coincide."
    },
    {
      "heading": "Identities and recurrences",
      "text": "Symmetry and successive selection\n\nPermuting the lower arguments leaves the coefficient unchanged:\n\n\\[\\binom{n}{n_1,\\ldots,n_k} = \\binom{n}{n_{\\sigma(1)},\\ldots,n_{\\sigma(k)}}\\]\n\nfor every permutation \\(\\sigma\\) of the category indices.\n\nA multinomial coefficient can also be written as a product of binomial coefficients:\n\n\\[\\binom{n}{n_1,\\ldots,n_k} = \\prod_{i=1}^{k} \\binom{n-\\sum_{j<i}n_j}{n_i}.\\]\n\nThis corresponds to choosing the first group, then the second from the remaining objects, and continuing. It also establishes that the factorial ratio is an integer.\n\nPascal-type recurrence\n\nFor \\(n\\geq1\\),\n\n\\[\\binom{n}{n_1,\\ldots,n_k} = \\sum_{\\substack{1\\leq i\\leq k\\\\n_i>0}} \\binom{n-1}{n_1,\\ldots,n_i-1,\\ldots,n_k}.\\]\n\nThis recurrence relation follows by classifying sequences according to their final symbol. It generalizes Pascal’s recurrence for binomial coefficients.\n\nSum of all coefficients\n\nSetting every variable equal to \\(1\\) in the multinomial theorem gives\n\n\\[\\sum_{\\substack{n_1+\\cdots+n_k=n\\\\n_i\\geq0}} \\binom{n}{n_1,\\ldots,n_k} =k^n.\\]\n\nCombinatorially, both sides count all length-\\(n\\) sequences over an alphabet of \\(k\\) symbols.\n\nThe number of count vectors in this sum is\n\n\\[\\binom{n+k-1}{k-1}.\\]\n\nThis counts possible category-count patterns, rather than sequences, and should not be confused with the individual multinomial coefficients."
    },
    {
      "heading": "Probability and statistics",
      "text": "Suppose \\(n\\) independent trials each have \\(k\\) possible outcomes, with fixed probabilities \\(p_1,\\ldots,p_k\\) satisfying\n\n\\[p_i\\geq0,\\qquad \\sum_{i=1}^{k}p_i=1.\\]\n\nLet the random variable \\(N_i\\) count how many trials produce outcome \\(i\\). The count vector has a multinomial distribution, whose probability mass function is\n\n\\[\\Pr(N_1=n_1,\\ldots,N_k=n_k) = \\binom{n}{n_1,\\ldots,n_k} \\prod_{i=1}^{k}p_i^{n_i}.\\]\n\nWhen a category has both probability and count zero, its factor is interpreted as \\(1\\).\n\nEvery particular outcome sequence with these counts has probability \\(\\prod_i p_i^{n_i}\\). The multinomial coefficient counts how many such sequences contribute to the event.\n\nFor example, in six independent rolls of a fair die, the probability that every face occurs exactly once is\n\n\\[\\binom{6}{1,1,1,1,1,1}\\left(\\frac16\\right)^6 =\\frac{6!}{6^6}.\\]\n\nFor two outcomes, the multinomial distribution reduces to the binomial distribution. In maximum likelihood estimation from a fixed count vector, the multinomial coefficient is constant with respect to the unknown probabilities. It can therefore be omitted when locating the maximizing parameters, though it remains part of the probability mass function."
    },
    {
      "heading": "Computation and asymptotic size",
      "text": "Directly evaluating factorials can produce very large intermediate values. Exact calculations can instead use the successive-binomial product, with arbitrary-precision integer arithmetic when necessary.\n\nFor approximate calculations, especially when only a logarithm is needed,\n\n\\[\\log\\binom{n}{n_1,\\ldots,n_k} = \\log\\Gamma(n+1)-\\sum_{i=1}^{k}\\log\\Gamma(n_i+1),\\]\n\nwhere \\(\\Gamma\\) is the gamma function. Logarithmic evaluation avoids the overflow associated with explicitly forming large factorials, although cancellation and rounding can still affect accuracy.\n\nStirling’s approximation describes the coefficient’s growth. Write \\(q_i=n_i/n\\). For fixed \\(k\\), with all proportions bounded away from zero as \\(n\\) increases,\n\n\\[\\binom{n}{n_1,\\ldots,n_k} \\sim \\frac{\\exp\\!\\bigl(nH(q)\\bigr)} {(2\\pi n)^{(k-1)/2}\\sqrt{q_1\\cdots q_k}},\\]\n\nwhere\n\n\\[H(q)=-\\sum_{i=1}^{k}q_i\\log q_i\\]\n\nis information entropy using natural logarithms.\n\nThis formula connects category-count arrangements with information theory: the leading exponential growth rate is determined by entropy. If some counts remain small or are zero, the stated approximation does not apply directly to those categories.\n\nFor fixed \\(n\\) and \\(k\\), the largest coefficients occur when the counts differ by at most one. Indeed, if \\(n_i\\geq n_j+2\\), moving one unit from \\(n_i\\) to \\(n_j\\) multiplies the coefficient by\n\n\\[\\frac{n_i}{n_j+1}>1.\\]\n\nRepeatedly balancing unequal counts therefore increases the coefficient until the counts are as equal as possible."
    }
  ],
  "links": [
    "binomial-coefficient",
    "combinatorics",
    "probability",
    "factorial",
    "set-partition",
    "permutation",
    "polynomial",
    "binomial-theorem",
    "recurrence-relation",
    "statistical-independence",
    "random-variable",
    "probability-mass-function",
    "binomial-distribution",
    "maximum-likelihood-estimation",
    "gamma-function",
    "stirlings-approximation",
    "information-entropy",
    "information-theory"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}