Combinaciones y permutaciones
combinatoricsCalcula las combinaciones nCr y permutaciones nPr exactas, con o sin repetición. Cuándo: un resultado numérico tiene que ser exacto o reproducible y no estimado. No para: realizar aritmética exacta de enteros grandes (bigint-calc). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Computes the exact nCr (combinations) and nPr (permutations), with or without repetition, for n ≤ 10,000. When: a numeric result has to be exact or reproducible instead of estimated. Not for: computing the exact arbitrary-precision integer arithmetic (bigint-calc). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"n": "<n>",
"r": "<r>"
},
"name": "combinatorics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | n (integer; required; min 0; max 10000). | |
| r | Yes | r (integer; required; min 0; max 10000). | |
| repetition | No | Allow repetition (boolean; optional; default false). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| combinations | No | ||
| permutations | No |