Multinomial Coefficient

Count arrangements with the supplied nonnegative category counts using exact arithmetic; at most 128 categories and 2,000 total elements are admitted.

Description

A multinomial coefficient counts distinct arrangements of a multiset with specified category counts.

A multinomial coefficient counts distinct arrangements of a multiset with specified category counts. Equal items within a category are indistinguishable.1

The tool returns value. The indexing and output conventions below determine how to read these values.

When to use Multinomial Coefficient

Use this for the following task: Count arrangements with the supplied nonnegative category counts using exact arithmetic; at most 128 categories and 2,000 total elements are admitted. Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Multinomial Coefficient and understand its results

  1. Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
  2. Enter counts according to the field table, then run the tool.
  3. Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
  4. Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
Input fieldMeaningValue type and boundsRequirement
countsNonnegative category countslist of integer; minimum entries 0; maximum entries 128; each entry: minimum 0; maximum 2000Required

Accumulate the total category size and multiply successive binomial coefficients with BigInt. Accept at most 128 categories and require a combined total at most 2000.

coefficient = (Σcounts)!/Π(count!)

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
valueMultinomial arrangement countstring (integer/arbitrary)
json
{
  "input": {
    "counts": [
      2,
      3,
      1
    ]
  },
  "output": {
    "value": "60"
  }
}

Limitations and assumptions

Empty and all-zero count lists return one. This is an exact arrangement count, not a multinomial probability or generated dataset.

Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.

Alternative or Complementary methods

Choose Pascal Triangle Row when you need its operation: Return the zero-indexed nth row of Pascal’s triangle as exact decimal binomial coefficients; n is capped at 1,000 to bound the output. Choose Rencontres Number for the complementary operation: Count permutations of n labeled elements with exactly k fixed points using C(n,k)·D(n−k), returning zero for k>n; indices are capped at 1,000.

Background reference: Digital Library of Mathematical Functions, §26.4.

References

  1. Digital Library of Mathematical Functions, §26.4 — National Institute of Standards and Technology

Similar or alternative tools

  • Pascal Triangle Row

    Return the zero-indexed nth row of Pascal’s triangle as exact decimal binomial coefficients; n is capped at 1,000 to bound the output.

  • Rencontres Number

    Count permutations of n labeled elements with exactly k fixed points using C(n,k)·D(n−k), returning zero for k>n; indices are capped at 1,000.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies