Catalog/gt-combinations-ncr

Game Theory

Combinations nCr API

Computes the exact binomial coefficient C(n,r) (BigInt-exact for huge n) plus notation and a plain-language reading. Answers 'How many ways to choose 5 cards from 52?', 'What is nCr exactly without overflow?'.

Price$0.02per request
MethodPOST
Route/v1/gametheory/combinations
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
combinatoricsncrbinomialchoosecombinationscountingprobabilitydiscrete
API URLhttps://x402.hexl.dev/v1/gametheory/combinations
Integration docs
Example request
{
  "n": 52,
  "r": 5
}
Example response
{
  "n": 52,
  "r": 5,
  "combinations": 2598960,
  "combinationsExact": "2598960",
  "isExactInteger": true,
  "notation": "C(52,5) = 52! / (5! · 47!)",
  "interpretation": "There are 2598960 ways to choose 5 items from 52 when order does not matter."
}
Input schema
{
  "type": "object",
  "required": [
    "n",
    "r"
  ],
  "properties": {
    "n": {
      "type": "integer",
      "minimum": 0,
      "examples": [
        52
      ]
    },
    "r": {
      "type": "integer",
      "minimum": 0,
      "examples": [
        5
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}