# Combinatorics

> Counting and arrangement mathematics

- Skill: `ffsshhttiikk/combinatorics` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ffsshhttiikk/combinatorics`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ffsshhttiikk/combinatorics/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: ffsshhttiikk (https://skillmd.com/u/ffsshhttiikk)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ffsshhttiikk/combinatorics

---

## What I do
- Calculate permutations and combinations
- Apply binomial coefficients and Pascal's triangle
- Solve recurrence relations
- Count using inclusion-exclusion principle
- Generate combinatorial identities
- Apply generating functions

## When to use me
When counting possibilities, analyzing algorithms, or solving probability problems.

## Key Concepts
- **Permutations**: P(n,r) = n!/(n-r)! for ordered arrangements
- **Combinations**: C(n,r) = n!/(r!(n-r)!) for unordered selections
- **Binomial Theorem**: (x+y)^n = Σ C(n,k)x^{n-k}y^k
- **Pigeonhole Principle**: If n items into m boxes and n > m, some box has ≥2
- **Recurrence Relations**: a_n = f(a_{n-1}, a_{n-2}, ...) with initial conditions
- **Generating Functions**: G(x) = Σ a_n x^n encodes sequences

