Chernoff affinity 2026-10-14
For probability mass functions , their Chernoff affinity at is the sum . It weights pointwise agreement between the two laws. The weighted arithmetic-geometric mean inequality gives , hence . With positive common support, . Smaller affinity means a stronger separation at that weighting.
At , is the Bhattacharyya coefficient. The quantity is the Bhattacharyya distance. Allowing all weights gives Chernoff information at least this large. Symmetry under exchanging sends to , so Chernoff information is symmetric even though an optimizing weight need not be .
Let be the Bernoulli distribution with success probability and the Bernoulli distribution with success probability . For ,The two summands have product . Their arithmetic mean is at least their geometric mean, with equality at . ThusThe same argument gives for complementary parameters . At the laws agree and .
With equal prior probabilities, count the successes among observations. The likelihood ratio is , so choose when and when . If is even, either decision or a fair tie randomization gives the same average error at . Under , has the binomial distribution with parameters . Symmetry therefore gives the exact optimal average errorThe last term applies only for even ; it represents half the tie probability. Direct finite sums give , and . Twenty observations reduce the optimal average error to about 0.158%. The finite-sample Chernoff error bound at is , a guarantee rather than the exact error.
Exact repeated-coin error, the finite-sample Chernoff error bound, and the limiting error exponent
. Original finite-binomial calculations under two fixed independent coin laws with equal priors. The first panel uses a logarithmic scale. The normalized negative log error approaches ; finite-sample error need not equal the simple exponential. Details.Reducing the exact error from to illustrates the value of repeated evidence. The example assumes a single fixed coin law throughout the experiment. If repeated sensor readings share an unmodelled common error, increasing their number need not supply this much independent information.
Closed-form expression 2026-10-20
A mathematical expression given by a finite combination of specified operations and standard functions, rather than an unevaluated recurrence relation or an unbounded procedure. Which functions are admitted is part of the convention. For example, the sum of the first positive integers has the closed-form expression .
Coin-change counting 2026-10-20
Combining means of groups Created 2026-10-14 Updated 2026-10-25
Suppose disjoint nonempty groups have sizes and arithmetic means . The arithmetic mean of all observations isEach group contributes the sum ; add those totals before dividing by the overall count. This is exactly a weighted mean of group means with weights equal to group sizes. [ref]
Take a synthetic example with two observations equal to and eight equal to . The two group means are and , and the combined mean is . Giving the two groups equal weights instead produces , which summarizes the two group means with equal influence. To summarize all ten individuals with equal influence, use their group counts.
The group means and counts determine the combined arithmetic mean, but do not generally determine the combined variance. Variation within the groups is additional information.
Complex conjugate roots in Vieta's formulas 2026-10-18
For the quadratic polynomial , the discriminant is , so its roots of a polynomial are the complex conjugatesTheir sum is , and their product is , matching the constant coefficient divided by the leading coefficient. More revealingly, : the product is the square of a complex modulus. Coefficients in the real numbers therefore need not imply polynomial roots in the real numbers.
For any polynomial with coefficients in the real numbers, . Thus a nonreal root of a polynomial brings its complex conjugate along with the same multiplicity of a root. This follows by applying complex conjugation to the polynomial expression and its factors. It explains why sums of complex conjugate terms can produce coefficients in the real numbers.
Composite Simpson's rule 2026-10-18
Composite Simpson's rule applies Simpson's rule to consecutive pairs of equal subintervals. Choose a positive even integer , put , and take quadrature nodes for . There are subintervals, two-subinterval panels, and quadrature nodes. ThenThe second sum is empty when , recovering one panel. The quadrature weights, before multiplication by , are . Every interior even-indexed quadrature node is an endpoint of two panels, so its two endpoint contributions add to two; every odd-indexed quadrature node is a midpoint with weight four. An odd cannot be covered by these pairs. The displayed formula requires equal spacing.[ref]
5.6 Numerical integration. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; §5.6, equations 5.6.20–5.6.21: elementary and composite Simpson formulas
For the exponential function on the interval , the exact integral is . With , the formula gives , an overestimate of about . With , it gives , an overestimate of about . The figure shows the intermediate refinements and compares every computed absolute error with the error bound for composite Simpson's rule.
Computed composite Simpson errors for the exponential function on zero to one approach fourth-order convergence; the dashed curve is the rigorous bound e over 180 n to the fourth power
. Details. For this exponential function, a geometric series also gives a compact independent formula. With and , summing the panel contributions yieldsA Taylor series at givesThe Big O notation describes the remaining terms as tends to zero. Consequently tends to sixteen: the computed ratios increase from about to . Fourth-order truncation error is also obtained by Richardson extrapolation of the composite trapezoidal rule.[ref]
5.6 Numerical integration. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; §5.6.2, equations 5.6.14–5.6.15: Simpson extrapolation and fourth-order error
Composition of an integer Created 2026-10-14 Updated 2026-10-20
A composition of an integer is an ordered tuple of positive integers with sum . Its length counts the parts. For example, and are different compositions of an integer, though they give the same integer partition. Stars and bars counts compositions of an integer with fixed length. [ref]
https://math.mit.edu/~fgotti/docs/Courses/C.%20Combinatorial%20Analysis/6.%20Compositions/Compositions.pdf. Gotti, Lecture 6, definition of a composition
Constant-sum game 2026-10-25
In a two-player constant-sum game, the sum of the two payoffs is the same constant at every strategy profile. Replacing each player's payoff by gives a zero-sum game without changing best responses or Nash equilibria. If both players can guarantee , then any Nash equilibrium gives each that value. An equilibrium in pure strategies must use pure strategies with that guarantee: otherwise the opponent could improve on by a unilateral deviation.
For a deterministic binary operation on an abstract data type, let be its specified operation on abstract values and the implementation on concrete states. For every permitted valid input pair , require bothThe first condition preserves the representation invariant. The second makes a commutative diagram: either execute and then apply the abstraction function, or apply the abstraction function to both inputs and then execute the abstract operation ; both paths reach the same value. These conditions state functional correctness of a completed operation; termination is an additional obligation for algorithm correctness.[ref]
8.3 Module Documentation. Sections 8.3.3, Commutative Diagrams, and 8.3.4, Representation Invariants: matching abstract results and preservation of valid representations
For addition in the unreduced rational representation, chooseFor example, represents , precisely the sum of and . The short correctness argument uses nonzero denominators: and imply , preserving the representation invariant, and
Correct rational addition makes both paths agree; an invariant-preserving incorrect operation gives a different value
. Details. Now consider an incorrect implementation that uses addition on the numerators and multiplication on the denominators:It preserves the representation invariant for every valid input pair because its denominator is still . Yet represents , not the specified sum . Even perfect checks of the representation invariant before and after this call would miss the error: the result is a legal representation of the wrong rational number.
The incorrect operation also exposes an accidental dependence on representation. Replace by the equivalent state while keeping . The correct operation gives , still representing ; the incorrect operation gives , representing instead of its previous . A correct addition must yield the same abstract result for equivalent inputs, although its concrete outputs may differ. This is why checks against the formal specification should compare abstract values, including unreduced representations and representations with a negative denominator, rather than demand identical stored pairs.
The calculation assumes exact integers. An implementation with bounded storage must additionally specify how it handles products and sums outside its supported range; the mathematical argument alone does not establish its functional correctness. The bounded queue with encapsulation illustrates the corresponding need to account for returned status values and failed operations, alongside the abstract state transition.
Cycle lemma Created 2026-10-06 Updated 2026-10-13
The cycle lemma turns a constraint at every prefix into a choice of where to start reading a circular sequence. Think of a lattice path whose vertical increments record votes for two candidates: for one candidate and for the other. Its partial sums are the running lead. Rotating the increments preserves the final lead, but changes whether that lead stays strictly positive throughout. This makes rotation useful for counting lattice paths subject to prefix constraints; the sum-one cycle lemma also supplies the cyclic prefix condition in the cyclic Turán covering construction.
The sum-one form. Let be any nonempty sequence of integers with . A starting position means reading the rotated sequenceCall good when every nonempty partial sum of is strictly positive, including the full sum:The cycle lemma says there is exactly one good starting position. Negative entries, zero entries and positive entries larger than one are all allowed in this sum-one form. The empty partial sum is zero and is excluded from the positivity requirement. Douglas West's exercise 1.3.46(a) states a stronger result for arbitrary integer entries: take its case with all partial sums positive. [ref]
https://api.pageplace.de/preview/DT0400.9781108889520_A49236431/preview-9781108889520_A49236431.pdf#page=72. West, Combinatorial Mathematics, exercise 1.3.46(a), p. 50
A worked sum-one example. For , the partial sums starting at zero are . Starts fail: they have, respectively, a zero second partial sum, a negative first partial sum, and a zero first partial sum. Start reads and has nonempty partial sums , all positive. This example both allows an increment larger than one and shows why touching zero fails.
Why the last minimum works. Put and . Choose the last index attaining the minimum of the proper partial sums : include and exclude . After that index, later proper partial sums are strictly larger than ; also , since . Before wrapping, the new partial sums are therefore positive differences . After wrapping, they are . In the worked example the last minimum is at ; choosing the first minimum at would fail. Uniqueness takes one further observation: two good starts would split the circle into two nonempty arcs, each having a positive integer sum, yet their sum would be one.
Cycle lemma with increments at most one 2026-10-14
A standard positive-total form of the Dvoretzky-Motzkin cycle lemma uses a nonempty sequence of integers satisfyingExactly starting positions have every nonempty partial sum strictly positive, using the same rotation convention as the sum-one cycle lemma. Negative entries can be arbitrarily large in magnitude, and zero entries are allowed. Addario-Berry's proposition 2.2.1 gives an equivalent form with increments at least and negative total; reversing the sequence and changing all signs gives the form here. [ref]
https://problab.ca/louigi/notes/ssprob2021.pdf#page=39. Addario-Berry, Lecture notes: 2021 CRM-PIMS Probability Summer School, proposition 2.2.1, p. 39
Four starts, two successes. For , the sum is . Starts and give partial sums and , respectively. Start gives and touches zero; start gives and begins below zero. Thus exactly two starts are good. The rotated sequence has the same positive total, but its first start is bad: a positive final lead alone does not control earlier partial sums.
All four starts of : the cycle lemma with increments at most one counts precisely the two paths whose nonempty partial sums stay strictly above zero
. Details. Positions can give identical words. The sequence repeats a block of length three and has sum two. Its good starts are and , both giving the same word with partial sums . Starts and touch zero; starts and begin negatively. The cycle lemma with increments at most one counts two starting positions even though there is only one distinct good rotated word. Counting distinct words would lose the multiplicity that makes the statement true.
Six starting positions of the repeating sequence : starts and produce identical good words and count twice
. Details. The upper bound matters. The one-entry sequence has positive integer sum two, but only one starting position. Thus the sum- conclusion fails for arbitrary positive increments when . The sum-one cycle lemma above needs no such upper bound. Strict positivity also matters: counting paths that merely stay at or above zero would include additional starts in both diagrams.
From rotation to enumeration. For a fixed admissible sequence, a start chosen from a uniform distribution on a finite set of its positions is good with probability . More generally, let be any finite set of length- sequences satisfying the increment bound and total , closed under rotation. Double counting pairs consisting of a sequence and a good starting position givesFor each good output sequence and each of the positions, inverse rotation gives one such pair, even when several rotated words coincide. For example, the four sequences containing three votes and one vote have exactly vote orders with a strictly positive running lead: and . This is how the cycle lemma with increments at most one converts many prefix inequalities into a simple counting factor.
Suppose the support of a probability distribution consists of all consecutive integers from to , including both endpoints, with . Its cardinality is , and a discrete uniform distribution on it satisfiesFor a short derivation, set , whose possible values are . The finite sums giveand henceAdding shifts the expected value by and leaves the variance unchanged. For completeness, the first sum follows by pairing with . For the second, sum from to : the left side is , so inserting the first sum gives the stated result.
The edge case has : with probability one, expected value , and variance zero. On an arithmetic progression with , the same argument instead gives expected value and variance . Equal spacing is the extra hypothesis behind these formulas; the discrete uniform distribution on requires the general sums above.
Divide-and-conquer combination cost Created 2026-10-18 Updated 2026-10-20
The combination cost is the work needed to reconstruct an answer from the returned smaller answers. In a time complexity calculation, also count partitioning the input, preparing arguments, and other work outside recursive calls. Write their total as for a size- call. For an ideal balanced divide-and-conquer algorithm making calls of size , the recurrence relation iswhere is a fixed positive integer and is the base case cost. Take , a power of two, so the size becomes one after exactly divisions. This is a model of total sequential work: all smaller calls contribute, even if a machine could run some simultaneously.
At level , there are calls, each of size . Expanding the recurrence relation gives the exact identityThe first term counts the base cases; the sum stops before their level because describes work in nonterminal calls. This separates depth, number of calls, and local work. Merge sort has two smaller calls and a linear merge algorithm, giving in Big O notation. The MIT notes derive this by summing equal work across levels, and contrast it with the same two-way split followed by quadratic local work.[ref]
Lecture 3: Insertion sort, merge sort. 6.006 Introduction to Algorithms, Fall 2011, Lecture 3: slides 32–44, recurrence and equal work per level; slide 46, quadratic local work
The same halving tree can have linear or quadratic work at each call
. Original exact cost models with , two children per nonterminal call, and one unit per base case. For local work , every internal level costs 16 and the total is 80. For , internal levels cost 256, 128, 64, 32 and the total is 496. The tree shows instance sizes; the ledger counts work rather than execution order. Details.For the first constructed model, set , and . Every internal level costs , while the leaves cost . Thus , giving . If the same split instead has , then the finite geometric series givesso . The root alone already costs in this second model. Smaller arguments do not eliminate expensive reconstruction. These are stipulated operation counts, rather than measured running times or exact merge sort instruction counts.
Binary search has a different saving: after its comparison, only one half remains a candidate. With constant-cost indexed array access and comparisons, its worst-case time complexity satisfies an upper recurrence relation for , with . There is one continuing branch, rather than two. At most nonempty candidate ranges are inspected for . Copying the retained half into a fresh array on every step would add linear work at that step and lose this logarithmic bound. The shrinking range and its representation both matter.
Divisor sum Created 2026-09-24 Updated 2026-10-14
The divisor sum of an arithmetic function assigns to each positive integer the sumOnly positive integer divisors are included, so . The weights can count the integer divisors, measure their sizes, or record other arithmetic information: the constant-one arithmetic function gives the divisor function, whereas the identity arithmetic function gives the sum-of-divisors function.
Equivalently, , where is Dirichlet convolution and is the constant-one arithmetic function. If is a multiplicative function, then is a multiplicative function by Multiplicativity of Dirichlet convolution. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781 notes on floor and arithmetic functions, Proposition 2.4.2 and Theorem 2.6.1
Here is the mechanism. For positive coprime integers , every positive integer divisor of has a unique form with and ; moreover, are coprime integers. Thus a multiplicative function satisfiesAt a prime power, the divisor sum becomes . This turns a calculation over many integer divisors into short local calculations at prime powers.
Efron–Stein inequality Created 2026-09-24 Updated 2026-10-18
The Efron–Stein inequality bounds the variance of a complicated output by the effect of replacing one input at a time. Let be mutually independent random variables, not necessarily identically distributed, and for a measurable function , with . Take with having the same probability distribution as , all inputs mutually independent. DefineUse the same function , keeping every other input fixed. ThenThe expected value averages over both the original inputs and their replacements. An infinite right side gives a trivial bound; under the stated square-integrable condition every term is finite.[ref]
Lecture 7a: Efron Stein inequality by Purnamrita Sarkar. Lecture 7a: Efron Stein inequality, slides 1–2 and 7, PDF pp. 2–3 and 8: independent inputs, conditional-variance bound and independent-copy form
For a concrete four-state example, take independent Bernoulli random variables with and , and set . This output records whether either input is one. The states have respective probabilities , soReplacing changes only when and . A fresh Bernoulli draw can repeat the old value: the replacement is not a forced flip. By independence, the expected value of the squared change isSimilarly,Thus Efron–Stein inequality gives . The larger second contribution reflects both its replacement probability and how often the other input leaves the output sensitive to it.
Four weighted states explain the Efron–Stein inequality resampling contributions
. Original constructed model: independent Bernoulli random variables with parameters and , and . Each node shows its joint probability. Directed arrow labels are joint probabilities of the original state and replacement value, rather than conditional transition probabilities. Only solid edges change ; same-state replacements and the dashed edges contribute zero. Both directions count before the factor . Details.For the same inputs, consider instead . The variance of a sum of independent random variables givesHere and , so the Efron–Stein inequality is exact: . More generally, for with square-integrable summands, each contribution equals and these variances add exactly.
Independence is essential. Let for a single Bernoulli random variable with parameter , and take . Its variance is one. If each coordinate is nevertheless replaced by an independent draw from its marginal Bernoulli distribution, each squared-change expected value is , giving the false proposed upper bound . Replacement now creates off-diagonal states and that the original input never visits. The original coordinates fail the hypothesis of Efron–Stein inequality.
The Efron–Stein inequality can be loose, exact, or inapplicable when independence fails
. Exact enumeration in three constructed models: the four-state maximum has variance and bound ; the weighted sum on the same independent inputs has variance and bound ; the dependent model has variance one but marginal replacement produces , which is not a valid bound. Stacked contributions are half the squared-change expected values. The third panel deliberately violates the theorem's assumption. Details.The attraction is local calculation: a function may involve many inputs, yet changing one can have a simple effect. Each half squared-change expected value supplies a coordinate's contribution to an upper budget for the total variance. Applying Chebyshev's inequality then bounds a tail probability using that budget. These contributions need not partition the actual variance, as the maximum example shows.
The name commemorates Bradley Efron and Charles M. Stein. Their 1981 paper The Jackknife Estimate of Variance appeared in The Annals of Statistics, volume 9, issue 3, pp. 586–596.[ref]
Bradley Efron's Profile, Stanford University. Publications: The Jackknife Estimate of Variance, Efron and Stein, 1981, 9(3), 586–596
Egyptian fraction 2026-10-25
An Egyptian fraction expresses a nonnegative rational number as a finite sum of positive unit fractions. A computational representation may permit repeated denominators, while the classical distinct-denominator convention adds a further requirement. The empty sum represents zero. For example, ; each denominator is a positive integer. A representation that permits repetition also has the simple expansion for nonnegative integers and positive .
Empty sum 2026-10-14
An empty sum has no terms and is defined to be zero, the identity element for addition. This keeps the rule for combining sums valid when one index set is empty. In a Galton-Watson process, an empty generation contributes an empty sum of offspring counts, so the next generation is empty too. The corresponding convention for multiplication is the empty product, which equals one.
Equality in Hölder's inequality 2026-10-18
For and nonzero factors in their respective Lp spaces, equality in the product-integral bound holds precisely whenIn other words, the normalized powers match. Zero factors give the trivial equality separately. For real vectors, equality for the signed finite sum also needs the nonzero coordinate products to have a common sign; otherwise the preceding triangle inequality loses information.
For and on , with , ,Changing only to gives , and both sides become . The factors need not be equal: their conjugate powers are what must agree after normalization.
The proof outline makes the equality condition natural. Normalize and . The Young inequality gives ; integration yields . Equality requires almost everywhere. The endpoint proof uses the essential supremum directly, so it does not need division by at .
Euclid-Euler theorem 2026-10-14
An even integer is a perfect number if and only ifThis forces to be a prime number, as shown under Mersenne number. It does not say that every prime exponent works, nor classify possible odd integers.[ref]
Perfect numbers and Mersenne primes by Keith Conrad. Theorem 1.1, pp. 1–2: even-number equivalence and proof
For the forward direction, put and use coprimality of and . Multiplicativity of the sum-of-divisors function and the finite geometric series giveThe prime number hypothesis makes ; replacing it with a composite number changes this factor.











