Catalog/gt-multinomial-coefficient

Game Theory

Multinomial coefficient API

Computes the exact multinomial coefficient n!/(k1!·k2!···) for distinct arrangements of a multiset given group sizes. Answers 'How many distinct arrangements of the letters in MISSISSIPPI?', 'What is the multinomial coefficient?'.

Price$0.04per request
MethodPOST
Route/v1/gametheory/multinomial-coefficient
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
combinatoricsmultinomialmultisetarrangementsanagramcountingfactorialdiscrete
API URLhttps://x402.hexl.dev/v1/gametheory/multinomial-coefficient
Integration docs
Example request
{
  "counts": [
    1,
    4,
    4,
    2
  ]
}
Example response
{
  "counts": [
    1,
    4,
    4,
    2
  ],
  "total": 11,
  "coefficient": 34650,
  "coefficientExact": "34650",
  "isExactInteger": true,
  "notation": "11! / (1! · 4! · 4! · 2!)",
  "interpretation": "Number of distinct arrangements of 11 items with group sizes [1, 4, 4, 2] (e.g. distinct permutations of a multiset)."
}
Input schema
{
  "type": "object",
  "required": [
    "counts"
  ],
  "properties": {
    "counts": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0
      },
      "examples": [
        [
          1,
          4,
          4,
          2
        ]
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}