Binomial coefficient Created 2026-09-24 Updated 2026-10-13
For nonnegative integers and , the binomial coefficientcounts the -element subsets of an -element set. To obtain the formula, first choose an ordered list of different members in ways. Each subset appears in exactly orders, so divide by that factorial. The cases and each have one selection, the empty set and the whole set. For integer outside , the combinatorial convention is .
For , , the calculation is . The left-hand panel lists all ten subsets of . Marking an included member with one and an excluded member with zero gives a bijection with length-five binary strings containing exactly two ones. More generally, this makes selection, binary encoding, and coefficients in a binomial theorem three descriptions of the same count.
For a uniformly chosen two-person team, a specified person belongs to four of the ten teams, so the probability of their inclusion is . Uniform selection of a -element subset similarly gives inclusion probability for each member when , as the double counting identity shows.
Binomial theorem Created 2026-09-24 Updated 2026-10-20
For a nonnegative integer and commuting quantities ,In expanding the factors, obtain by selecting the positions that contribute . There are such choices. For example,The coefficients are row five of Pascal's triangle, in reverse order under the displayed convention; the row is symmetric. Setting gives , the number of subsets of a five-element set. Each member has two inclusion choices, agreeing with the rule of product and the cardinality of the power set.
Hockey-stick identity 2026-10-06
For nonnegative integers , the binomial coefficients satisfyThe identity follows by mathematical induction: adding the next term combines two adjacent binomial coefficients through Pascal's identity. An equivalent form is , a diagonal sum in Pascal's triangle. It provides closed forms for sums of binomial coefficients without expanding individual factorials.
Pascal's rule Created 2026-10-13 Updated 2026-10-18
For an integer and any integer , Pascal's rule holds with the convention outside . The boundary values are , including . Initialize row zero separately: the recurrence relation does not require binomial coefficients with top index .[ref]
Discrete Mathematics: An Open Introduction (3rd edition) by Oscar Levin. §1.2, Recurrence relation for binomial coefficients and Pascal's Triangle: edge values and the two-parent rule
Proof by a marked element. Count the -element subsets of , marking the element as special. Those omitting are exactly the -element subsets of . From those containing , delete to obtain the -element subsets of that same smaller set; adjoining reverses this operation. The rule of sum adds these two disjoint counts. The proof includes and because the impossible class contributes zero.
For an original worked instance, choose three labels from and mark . Omitting it gives selections. Including it leaves two labels to choose from the other six, giving . Therefore . Under the bijection with north-east lattice paths to , membership of position seven says whether the final step is north: the marked-element split becomes the last-step split.
This makes Pascal's rule useful beyond an algebraic identity. A counting problem may have an obvious yes-or-no decision even when its factorial formula is obscure; splitting at that decision exposes a recurrence relation. When the smaller counts are shared between many cases, dynamic programming reuses them. The beauty of Pascal's triangle is that one local addition rule simultaneously organizes subsets, binary strings, north-east lattice paths, and the binomial theorem.
Pascal's triangle Created 2026-10-06 Updated 2026-10-18
Row of Pascal's triangle consists of the binomial coefficients , beginning with row . Boundary entries are one, and Pascal's identity says each interior entry is the sum of the two entries above it. The hockey-stick identity evaluates sums along its diagonals.
The highlighted entry in the binomial coefficient illustration is . Split two-person teams according to whether they contain the fifth person: six choose both members from the other four, and four contain the fifth person together with one of those four. Thus . All entries can be generated by the same local rule, so a large table of counts needs no repeated enumeration of its subsets.
Reading row seven. Label the entries in each row from on the left through on the right. Rows zero through seven are shown below. The highlighted entry comes from and . Starting with row zero , the edges remain one and Pascal's rule determines every interior entry, so mathematical induction uniquely determines the whole array.
Rows zero through seven of Pascal's triangle, with
. The index increases from left to right in each row; it counts north steps in the north-east lattice path interpretation. Each row index counts all steps. Details.The triangular and rectangular layouts describe the same entries. For a north-east lattice path ending at , set and , so . The predecessor has indices , while has indices . Thus the grid's west and south arrivals are exactly the triangle's two parents. This change of indices explains why the north-east lattice path recurrence and Pascal's rule agree.
There is also a global check on the local construction: row sums to . Every subset of an -element set appears exactly once among the classes of sizes , and each element has two inclusion choices by the rule of product. In row seven, . Replacing every subset by its complement reverses the row, explaining . The binomial theorem packages the whole row as the coefficients of .
Blaise Pascal's Traité du triangle arithmétique, published in 1665, presents an arithmetic array and connects it to combinations, games of chance, and powers of binomial expressions. This makes the connection between a counting table and several applications visible in the original work. [ref]
https://archive.org/details/bub_gb_UqgUAAAAQAAJ. Pascal, Traité du triangle arithmétique, 1665 edition
The University of Cambridge's account of the treatise explains its 1654 composition and the organization of these applications. [ref]https://api.repository.cam.ac.uk/server/api/core/bitstreams/9bfbc9c8-fa56-4694-b96d-fc18db0f562f/content. Cambridge University Library, account of Pascal's treatise
Represent Pascal's triangle by an infinite outer lazy list, each of whose elements is one finite row. Pad the preceding row with zero on its left and on its right, then add corresponding entries:
pascal :: [[Integer]]
pascal = iterate next [1]
where
-- Padding supplies the two boundary entries as well as the interior sums.
next :: [Integer] -> [Integer]
next row = zipWith (+) (0 : row) (row ++ [0])Here
iterate next [1] begins [[1],[1,1],[1,2,1],[1,3,3,1],...]. Every call to next receives a finite row, so its final zero is reachable. Lazy evaluation produces any requested finite prefix without trying to finish the infinite outer list.Indexing rows and columns from zero, Pascal's rule saysTake out-of-range binomial coefficients to be zero. The seed is the zeroth row, and the padded addition implements this identity at every position, including the two boundaries. Mathematical induction therefore proves every generated row correct. Using unbounded integers prevents overflow. Generating rows zero through takes arithmetic operations, with additional bit costs as the binomial coefficients grow.
Generate each row of Pascal's triangle from its predecessor, padding at opposite ends before adding corresponding entries:
pascal :: Num a => [[a]]
pascal = iterate next [1]
where
next :: Num a => [a] -> [a]
next row = zipWith (+) (0:row) (row ++ [0])The boundary sums are the old endpoint plus zero, and the interior sums satisfy Pascal's rule. Induction on the iteration number therefore gives the rows of binomial coefficients. The outer lazy list is infinite, with each finite row available on demand. Instantiate
a as Integer for exact arbitrarily large entries; bounded machine integers eventually overflow.
