HOME

TheInfoList



OR:

In
combinatorics Combinatorics is an area of mathematics primarily concerned with counting, both as a means and an end in obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many appl ...
, double counting, also called counting in two ways, is a
combinatorial proof In mathematics, the term ''combinatorial proof'' is often used to mean either of two types of mathematical proof: * A proof by double counting. A combinatorial identity is proven by counting the number of elements of some carefully chosen set in t ...
technique for showing that two expressions are equal by demonstrating that they are two ways of counting the size of one
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
. In this technique, which call "one of the most important tools in combinatorics", one describes a
finite set In mathematics, particularly set theory, a finite set is a set that has a finite number of elements. Informally, a finite set is a set which one could in principle count and finish counting. For example, :\ is a finite set with five elements. Th ...
from two perspectives leading to two distinct expressions for the size of the set. Since both expressions equal the size of the same set, they equal each other.


Examples


Multiplication (of natural numbers) commutes

This is a simple example of double counting, often used when teaching multiplication to young children. In this context, multiplication of
natural number In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country"). Numbers used for counting are called ''Cardinal n ...
s is introduced as repeated addition, and is then shown to be
commutative In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name o ...
by counting, in two different ways, a number of items arranged in a rectangular grid. Suppose the grid has n rows and m columns. We first count the items by summing n rows of m items each, then a second time by summing m columns of n items each, thus showing that, for these particular values of n and m, n \times m = m \times n.


Forming committees

One example of the double counting method counts the number of ways in which a committee can be formed from n people, allowing any number of the people (even zero of them) to be part of the committee. That is, one counts the number of
subset In mathematics, Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are ...
s that an n-element set may have. One method for forming a committee is to ask each person to choose whether or not to join it. Each person has two choices – yes or no – and these choices are independent of those of the other people. Therefore there are 2\times 2\times \cdots 2 = 2^n possibilities. Alternatively, one may observe that the size of the committee must be some number between 0 and n. For each possible size k, the number of ways in which a committee of k people can be formed from n people is the
binomial coefficient In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
. Therefore the total number of possible committees is the sum of binomial coefficients over k=0,1,2,\dots,n. Equating the two expressions gives the
identity Identity may refer to: * Identity document * Identity (philosophy) * Identity (social science) * Identity (mathematics) Arts and entertainment Film and television * ''Identity'' (1987 film), an Iranian film * ''Identity'' (2003 film), ...
\sum_^n = 2^n, a special case of the
binomial theorem In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial. According to the theorem, it is possible to expand the polynomial into a sum involving terms of the form , where the ...
. A similar double counting method can be used to prove the more general identity; ). \sum_^n = 2^


Handshaking lemma

Another theorem that is commonly proven with a double counting argument states that every
undirected graph In discrete mathematics, and more specifically in graph theory, a graph is a structure amounting to a set of objects in which some pairs of the objects are in some sense "related". The objects correspond to mathematical abstractions called '' v ...
contains an even number of vertices of odd
degree Degree may refer to: As a unit of measurement * Degree (angle), a unit of angle measurement ** Degree of geographical latitude ** Degree of geographical longitude * Degree symbol (°), a notation used in science, engineering, and mathematics ...
. That is, the number of vertices that have an odd number of incident edges must be even. In more colloquial terms, in a party of people some of whom shake hands, an even number of people must have shaken an odd number of other people's hands; for this reason, the result is known as the
handshaking lemma In graph theory, a branch of mathematics, the handshaking lemma is the statement that, in every finite undirected graph, the number of vertices that touch an odd number of edges is even. In more colloquial terms, in a party of people some of whom ...
. To prove this by double counting, let d(v) be the degree of vertex v. The number of vertex-edge incidences in the graph may be counted in two different ways: by summing the degrees of the vertices, or by counting two incidences for every edge. Therefore \sum_v d(v) = 2e where e is the number of edges. The sum of the degrees of the vertices is therefore an
even number In mathematics, parity is the property of an integer of whether it is even or odd. An integer is even if it is a multiple of two, and odd if it is not.. For example, −4, 0, 82 are even because \begin -2 \cdot 2 &= -4 \\ 0 \cdot 2 &= 0 \\ 41 ...
, which could not happen if an odd number of the vertices had odd degree. This fact, with this proof, appears in the 1736 paper of
Leonhard Euler Leonhard Euler ( , ; 15 April 170718 September 1783) was a Swiss mathematician, physicist, astronomer, geographer, logician and engineer who founded the studies of graph theory and topology and made pioneering and influential discoveries in ma ...
on the
Seven Bridges of Königsberg The Seven Bridges of Königsberg is a historically notable problem in mathematics. Its negative resolution by Leonhard Euler in 1736 laid the foundations of graph theory and prefigured the idea of topology. The city of Königsberg in Prussia (n ...
that first began the study of
graph theory In mathematics, graph theory is the study of ''graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conne ...
.


Counting trees

What is the number T_n of different
trees In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are u ...
that can be formed from a set of n distinct vertices?
Cayley's formula In mathematics, Cayley's formula is a result in graph theory named after Arthur Cayley. It states that for every positive integer n, the number of trees on n labeled vertices is n^. The formula equivalently counts the number of spanning tr ...
gives the answer T_n=n^. list four proofs of this fact; they write of the fourth, a double counting proof due to Jim Pitman, that it is "the most beautiful of them all." Pitman's proof counts in two different ways the number of different sequences of directed edges that can be added to an
empty graph In the mathematical field of graph theory, the term "null graph" may refer either to the order-zero graph, or alternatively, to any edgeless graph (the latter is sometimes called an "empty graph"). Order-zero graph The order-zero graph, , is th ...
on n vertices to form from it a
rooted tree In graph theory, a tree is an undirected graph in which any two vertices are connected by ''exactly one'' path, or equivalently a connected acyclic undirected graph. A forest is an undirected graph in which any two vertices are connected by ''a ...
. The directed edges point away from the root. One way to form such a sequence is to start with one of the T_n possible unrooted trees, choose one of its n vertices as root, and choose one of the (n-1)! possible sequences in which to add its n-1 (directed) edges. Therefore, the total number of sequences that can be formed in this way is T_n n(n-1)! = T_n n!. Another way to count these edge sequences is to consider adding the edges one by one to an empty graph, and to count the number of choices available at each step. If one has added a collection of n-k edges already, so that the graph formed by these edges is a rooted
forest A forest is an area of land dominated by trees. Hundreds of definitions of forest are used throughout the world, incorporating factors such as tree density, tree height, land use, legal standing, and ecological function. The United Nations' ...
with k trees, there are n(k-1) choices for the next edge to add: its starting vertex can be any one of the n vertices of the graph, and its ending vertex can be any one of the k-1 roots other than the root of the tree containing the starting vertex. Therefore, if one multiplies together the number of choices from the first step, the second step, etc., the total number of choices is \prod_^ n(k-1) = n^ (n-1)! = n^ n!. Equating these two formulas for the number of edge sequences results in Cayley's formula: \displaystyle T_n n!=n^n! and \displaystyle T_n=n^. As Aigner and Ziegler describe, the formula and the proof can be generalized to count the number of rooted forests with k trees, for any


See also


Additional examples

*
Vandermonde's identity In combinatorics, Vandermonde's identity (or Vandermonde's convolution) is the following identity for binomial coefficients: :=\sum_^r for any nonnegative integers ''r'', ''m'', ''n''. The identity is named after Alexandre-Théophile Vandermo ...
, another identity on sums of binomial coefficients that can be proven by double counting. *
Square pyramidal number In mathematics, a pyramid number, or square pyramidal number, is a natural number that counts the number of stacked spheres in a pyramid with a square base. The study of these numbers goes back to Archimedes and Fibonacci. They are part of a broa ...
. The equality between the sum of the first n
square number In mathematics, a square number or perfect square is an integer that is the square (algebra), square of an integer; in other words, it is the multiplication, product of some integer with itself. For example, 9 is a square number, since it equals ...
s and a cubic polynomial can be shown by double counting the triples of numbers x, y, and z where z is larger than either of the other two numbers. * Lubell–Yamamoto–Meshalkin inequality. Lubell's proof of this result on set families is a double counting argument on
permutation In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or proc ...
s, used to prove an
inequality Inequality may refer to: Economics * Attention inequality, unequal distribution of attention across users, groups of people, issues in etc. in attention economy * Economic inequality, difference in economic well-being between population groups * ...
rather than an equality. * Erdős–Ko–Rado theorem, an upper bound on intersecting families of sets, proven by
Gyula O. H. Katona Gyula O. H. Katona (born 16 March 1941 in Budapest) is a Hungarian mathematician known for his work in combinatorial set theory, and especially for the Kruskal–Katona theorem In algebraic combinatorics, the Kruskal–Katona theorem gives a co ...
using a double counting inequality. *
Proofs of Fermat's little theorem This article collects together a variety of proofs of Fermat's little theorem, which states that :a^p \equiv a \pmod p for every prime number ''p'' and every integer ''a'' (see modular arithmetic). Simplifications Some of the proofs of Fermat's l ...
. A
divisibility In mathematics, a divisor of an integer n, also called a factor of n, is an integer m that may be multiplied by some integer to produce n. In this case, one also says that n is a multiple of m. An integer n is divisible or evenly divisible by ...
proof by double counting: for any
prime A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
p and natural number A, there are A^p-A length-p words over an A-symbol alphabet having two or more distinct symbols. These may be grouped into sets of p words that can be transformed into each other by
circular shift In combinatorial mathematics, a circular shift is the operation of rearranging the entries in a tuple, either by moving the final entry to the first position, while shifting all other entries to the next position, or by performing the inverse oper ...
s; these sets are called
necklaces A necklace is an article of jewellery that is worn around the neck. Necklaces may have been one of the earliest types of adornment worn by humans. They often serve ceremonial, religious, magical, or funerary purposes and are also used as symbol ...
. Therefore, A^p-A=p\cdot(number of necklaces) and is divisible by p. * Proofs of quadratic reciprocity. A proof by Eisenstein derives another important number-theoretic fact by double counting lattice points in a triangle.


Related topics

*
Bijective proof In combinatorics, bijective proof is a proof technique for proving that two sets have equally many elements, or that the sets in two combinatorial classes have equal size, by finding a bijective function that maps one set one-to-one onto the othe ...
. Where double counting involves counting one set in two ways, bijective proofs involve counting two sets in one way, by showing that their elements correspond one-for-one. * The
inclusion–exclusion principle In combinatorics, a branch of mathematics, the inclusion–exclusion principle is a counting technique which generalizes the familiar method of obtaining the number of elements in the union of two finite sets; symbolically expressed as : , A \cup ...
, a formula for the size of a
union Union commonly refers to: * Trade union, an organization of workers * Union (set theory), in mathematics, a fundamental operation on sets Union may also refer to: Arts and entertainment Music * Union (band), an American rock group ** ''Un ...
of sets that may, together with another formula for the same union, be used as part of a double counting argument.


Notes


References

*. Double counting is described as a general principle on page 126; Pitman's double counting proof of Cayley's formula is on pp. 145–146; Katona's double counting inequality for the Erdős–Ko–Rado theorem is pp. 214–215. *. Reprinted and translated in . *. * *. *{{citation , last1 = van Lint, first1 = Jacobus H. , last2 = Wilson, first2 = Richard M. , title = A Course in Combinatorics , page = 4 , publisher = Cambridge University Press , year = 2001 , isbn = 978-0-521-00601-9. Enumerative combinatorics Articles containing proofs Mathematical proofs