Combinatorics Fundamentals

Core counting principles and combinatorial formulas.

  • Mathematics
  • 21 entries
  • 7 sections
  • CC0 — public domain

The data

0

Principle
Product Rule
Description
If task A has m ways and task B has n ways, both can be done in m * n ways.
Formula
m * n

1

Principle
Sum Rule
Description
If tasks are mutually exclusive with m and n ways, total is m + n.
Formula
m + n

2

Principle
Permutations
Description
Ordered arrangements of r elements from n items.
Formula
P(n,r) = n! / (n - r)!

3

Principle
Combinations
Description
Unordered selections of r elements from n items.
Formula
C(n,r) = n! / (r!(n-r)!)

4

Principle
Permutations with Repetition
Description
Arrangements when some elements are identical.
Formula
n! / (n1! * n2! * ... * nk!)

5

Principle
Pigeonhole Principle
Description
If n items are placed into m containers and n > m, some container has >= 2 items.
Formula
ceil(n/m)

6

Principle
Binomial Theorem
Description
Expansion of (a + b)^n.
Formula
(a+b)^n = Sum C(n,k) * a^(n-k) * b^k

Fetch the same bytes

The static files are identical to what the API returns, but with no rate limit and no server round trip. Use the API when you want a query and a content type; use the files when you want to cache one document.

curl "https://yjtoon.com/api/dataset/combinatorics-fundamentals?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/combinatorics-fundamentals.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • math
  • combinatorics
  • counting
  • permutations
  • combinations