Breadth-first search explores a graph in successive distance layers from a starting vertex. Before two exploration branches meet, the explored edges form a tree.
Double counting proves an identity by counting the same finite set in two different ways.
The binomial coefficientcounts the -element subsets of an -element set. Equivalently, it counts strings containing copies of one symbol and copies of another.
Pascal's identity is
The central binomial coefficient is the largest coefficient in the expansion of :
For nonnegative integers with , the multinomial coefficientcounts arrangements of a multiset containing copies of symbol .
For a nonnegative integer ,
Combinatorics studies finite and discrete structures through counting, construction, and extremal arguments.
If square matrices and commute, thenThe usual proof works because commutativity allows words with the same numbers of and factors to be collected.
Coefficient extraction from gives
Splitting an alternating permutation at its maximum giveswhere counts up-down permutations and complementation identifies up-down with down-up permutations.
Two length- palindromes with distinct first-half digits cannot begin fewer than positions apart: the later first half would include the repeated middle pair of the earlier palindrome. At separation , their union has form .
The number of nonnegative integer solutions of is .
For finite sets , the cardinality of their union is the alternating sum of the cardinalities of their nonempty intersections.
A permutation of a set is a bijection from that set to itself.
A permutation of has displacement at most one when . Such a permutation is a disjoint collection of fixed points and adjacent transpositions, so independently swapping the pairs already gives uncountably many examples.
Codex Wiki