combinatorics-calculator

Solid

Calculate combinatorial values with modular arithmetic

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
75
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Combinatorics Calculator Skill ## Purpose Calculate combinatorial values with modular arithmetic support for competitive programming applications. ## Capabilities - Factorial and inverse factorial precomputation - nCr, nPr with modular arithmetic - Catalan, Stirling, Bell numbers - Lucas theorem implementation - Inclusion-exclusion principle application - Generating functions ## Target Processes - combinatorics-counting - number-theory-algorithms - dp-pattern-matching ## Combinatorial Functions ### Basic Counting - Factorial: n! - Permutations: P(n,r) = n!/(n-r)! - Combinations: C(n,r) = n!/(r!(n-r)!) ### Special Numbers - Catalan numbers - Stirling numbers (first and second kind) - Bell numbers - Derangements ### Advanced Techniques - Lucas theorem (for large n, small p) - Inclusion-exclusion - Burnside's lemma - Generating functions ## Input Schema ```json { "type": "object", "properties": { "operation": { "type": "string", "enum": ["nCr", "nPr", "factorial", "catalan", "stirling", "lucas", "precompute"] }, "n": { "type": "integer" }, "r": { "type": "integer" }, "mod": { "type": "integer" }, "precomputeLimit": { "type": "integer" } }, "required": ["operation"] } ``` ## Output Schema ```json { "type": "object", "properties": { "success": { "type": "boolean" }, "result": { "type": "integer" }, "code": { "type": "string" }, "formula": { "type": "string" } }, "required": ["success"] } ```

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills