Concepts318
Category
Catalan Numbers
Catalan numbers count many 'non-crossing' and 'well-formed' structures like balanced parentheses, binary trees, Dyck paths, and triangulations of a convex polygon.
Stirling Numbers of Second Kind
Stirling numbers of the second kind S(n,k) count how many ways to split n labeled items into k non-empty, unlabeled groups.
Derangements
A derangement is a permutation with no element left in its original position, often written as !n or D(n).
Lucas' Theorem
Lucas' Theorem lets you compute C(n, k) modulo a prime p by working digit-by-digit in base p.
Inclusion-Exclusion Principle
The Inclusion-Exclusion Principle (IEP) corrects overcounting by alternately adding and subtracting sizes of intersections of sets.
Linear Diophantine Equations
A linear Diophantine equation ax + by = c has integer solutions if and only if gcd(a, b) divides c.
Binomial Theorem and Identities
The binomial theorem expands (x + y)^n into a sum of terms using binomial coefficients that count how many ways to choose k items from n.
Stars and Bars
Stars and Bars counts the ways to distribute n identical items into k distinct bins using combinations.
Primitive Roots
A primitive root modulo n is a number g that cycles through all units modulo n when you repeatedly multiply by g, so its multiplicative order equals \(\varphi(n)\).
Discrete Logarithm
The discrete logarithm problem asks for x such that g^x β‘ h (mod p) in a multiplicative group modulo a prime p.
Pollard's Rho Factorization
Pollard's Rho is a randomized algorithm that finds a non-trivial factor of a composite integer by walking a pseudorandom sequence modulo n and extracting a factor with a gcd.
Miller-Rabin Primality Test
MillerβRabin is a fast primality test that uses modular exponentiation to detect compositeness with very high reliability.