Skip to main content
WebsiteintermediateFree

The Inclusion-Exclusion Principle — cp-algorithms

cp-algorithms

Derives the principle in set-theoretic and probabilistic form, proves it with binomial coefficients, generalises to elements in exactly r sets, then works eleven applications including derangements, coprime counting, bounded integer equations and lattice paths, each with complexity analysis and C++ code.

Visit resource

More resources on Inclusion-Exclusion

WebsiteFree

Wolfram MathWorld

MathWorld is an online mathematics encyclopedia from Wolfram Research offering detailed, browsable articles on topics across the math spectrum, including algebra, geometry, calculus, and number theory. Each entry includes definitions, theorems, formulas, diagrams, worked examples, and links to further reading.

WebsiteFree

Art of Problem Solving Wiki

Community-maintained Art of Problem Solving wiki page stating the inclusion-exclusion principle and illustrating it with worked examples and competition problems. Readers learn to count the elements of overlapping sets without double-counting and apply the method to contest-style counting questions.

CourseFree

Mathematics for Computer Science (MIT 6.042J)

Discrete mathematics for computer science with an emphasis on definitions and proofs: logic, induction, sets and relations, graph theory, modular arithmetic, asymptotics, counting and discrete probability. 25 lecture videos, problem sets and exams with solutions build fluency in writing proofs.

BookPaid

Introductory Combinatorics (Classic Version), 5th Edition

The single printed reference worth owning for this topic. Chapter 6 of the standard junior-level combinatorics text states the inclusion-exclusion principle, then applies it to combinations with repetition, derangements, permutations with forbidden positions, and Möbius inversion on partially ordered sets, with graded exercises.

BookFree

Enumerative Combinatorics, Volume 1 (2nd edition, free author PDF)

Author-hosted PDF of the second edition. Chapter 2, Sieve Methods, develops inclusion-exclusion, permutations with restricted positions, Ferrers boards, involutions and determinantal formulas; Chapter 3 places the principle inside Möbius inversion on posets.

WebsiteFree

Applied Combinatorics — Chapter 7: Inclusion-Exclusion

Chapter of an open-source undergraduate combinatorics textbook. Proves the inclusion-exclusion formula, then applies it to enumerating surjections, derangements and the Euler phi-function, closing with a discussion section and a graded exercise set.

See all Inclusion-Exclusion resources →