Adder 2026-10-25
A Boolean circuit computing the sum of binary representations, possibly including input and output carry bits. Its delay depends on how carries are propagated; specifying an adder does not by itself imply constant circuit depth as the input width grows.
Addition Created 2026-09-24 Updated 2026-10-13
Addition combines two numbers into their sum. For natural numbers, joining disjoint collections of sizes gives a collection of size . On a number line, adding shifts a starting position by : rightward when and leftward when .
Starting at and adding reaches . Starting there and adding returns to , because . Additive inverses turn this return move into an algebraic rule. With real numbers, addition is commutative and associative: exchanging two shifts or grouping several shifts differently leaves the final position unchanged.
Addition shifts positions on a number line, while a negative multiplication factor changes both scale and direction
. Details. The bottom panel applies . Input becomes , and input becomes . Multiplication by a negative real number rescales distances from zero and reverses direction, giving a reflection in mathematics as well as a scale change. This is a different operation from shifting every input by one fixed amount.
Addition chain 2026-10-20
An addition chain for a positive integer is , where each is the sum of two earlier entries, which may coincide. It computes in multiplications by reusing previously computed powers. For example, computes in five multiplications.
Additive valuation 2026-10-24
A bundle-value function for which an agent's value for a set of items is the sum of its item values. Different agents may assign different values to the same item. With nonnegative item values, a bundle containing no positively valued item has value zero. The formula excludes interactions such as a pair of items being valuable only when held together.
Affine combination Created 2026-10-14 Updated 2026-10-14
An affine combination is a weighted point with . The coefficients can be negative. The sum is meaningful in an affine space without selecting a preferred origin: relative to any point , it means . Affine maps preserve these weighted points. [ref]
For an original example in the Euclidean plane, take , and . Then lies inside their triangle. Its coefficients are nonnegative, making it a convex combination. In contrast, is beyond : it is an affine combination but not a convex combination of these three points. Negative weights allow extrapolation, rather than only interpolation inside the convex hull.
For the affine map , the same weights produce from , and produce from . Thus one can compute a weighted point before transforming the vertices or afterwards, obtaining exactly the same point.
This is useful whenever an object is built from weighted control points: its construction commutes with an affine map, so transforming the control points transforms the constructed object as well. The sum of the weights is the essential condition; no assumption about lengths or angles is needed.
Keep the basis fixed and replace the origin by a point with old coordinates . Each point's coordinates change from to . For coefficients with sum one, the weighted coordinates becomeAdding the new origin gives the original point. This proves origin independence rather than asserting that the coordinate tuples themselves stay unchanged.
The requirement cannot be omitted. In the example , , blindly treating as a point gives in the old coordinates. If the new origin is , the two coordinates become and ; adding them and restoring instead gives . The coefficients sum to two, so this procedure has no origin-independent interpretation as a weighted point.
Affine maps preserve affine combinations Created 2026-10-14 Updated 2026-10-31
For coefficients with sum one, the defining identity follows from linearity:The translation appears once on both sides precisely because . In particular, midpoints map to midpoints, and a parameterized line segment , , maps to . A whole line has the same formula with ; its image is a line if , and a single point otherwise.
Amicable number 2026-10-20
Two distinct positive integers are amicable when the sum of the proper divisors of is and the sum of the proper divisors of is . The pair is an example. Iterating the proper-divisor sum can also produce longer directed cycles.
Arithmetic mean Created 2026-09-24 Updated 2026-10-14
For a nonempty finite list of real numbers , the arithmetic mean isIt is the weighted mean with equal weights, giving each observation equal influence. For , the sum is and the arithmetic mean is . Replacing every value by retains the same total. The residuals sum to zero, so the mean is also the balancing point of these equally weighted observations.
The arithmetic mean minimizes the sum of squared deviations by the weighted mean minimizes squared deviations identity with all weights one. A large input can consequently have a substantial effect: replacing by changes the mean to , while the median remains . The choice of summary depends on what aspect of the data matters.
The direct divisor summatory function formula evaluates floor divisions. Its balanced Dirichlet hyperbola method formula evaluates floor divisions and reuses their sum for the other strip, followed by doubling and square-overlap subtraction. Thus it uses arithmetic operations, with big O notation, in a model that counts each division, addition and multiplication as one operation. At , the division counts for these two formulas are and .
The balanced Dirichlet hyperbola method reduces floor divisions from to ; for , two sequences of partial sums reach the same exact answer 35
. Details. For a general Dirichlet convolution, the asymmetric formula has outer terms; evaluating and has an additional cost. Under , equal thresholds minimize , but an asymmetric split can be useful if the two partial sums have different evaluation costs. The balanced divisor summatory function gains the further reuse because its two arithmetic functions are identical.
These are arithmetic operation counts, rather than counts of elementary operations on binary digits: the integers grow with , and division of longer integers costs more in that model of computational complexity theory. Computing also requires an exact integer square root, or checking and correcting a numerical square root until holds.
Associativity of matrix multiplication 2026-10-31
For dimension-compatible matrices, . In coordinates both sides have entry ; distributing and regrouping the finite sums proves equality. This permits accumulating a product left to right even when a recursive algorithm groups the same transformations from the right. It does not permit changing factor order, because matrix multiplication is generally not commutative.
Basel problem Created 2026-09-24 Updated 2026-10-14
The Basel problem asks for the exact sum of the reciprocal squares of the positive integers. The answer isThe integral test proves that the series converges, but does not identify this exact value. The Euler evaluation of even zeta values does: the equally spaced poles of cotangent connect reciprocal integer powers to Bernoulli numbers and . This separates three different questions: whether a sum exists, how well a partial sum approximates it, and what its exact value is.
For example, the ten-term partial sum is about , while the exact value is about . The zeta series truncation error bounds the missing amount between and ; it is much larger than the first omitted term . More terms improve the approximation, but a numerical coincidence with would not prove the identity.
In On the sums of series of reciprocals by Leonhard Euler, §2 identifies the reciprocal-square sum with one-sixth of the squared circumference of a unit-diameter circle. The translation's publication note dates the presentation to 5 December 1735 and publication to 1740.[ref]
On the sums of series of reciprocals by Leonhard Euler. English translation, p. 1, §2 and publication note
The cotangent coefficient proof of the even zeta values gives a short modern outline, while zeta series truncation error addresses the distinct approximation question. Binary addition in logarithmic space 2026-10-31
For canonical positive binary numeral system inputs, a logspace transducer can emit the canonical representation of their sum most significant digit first. Count the operand lengths, compute the final arithmetic carry to determine output length, and then compute each requested result digit by restarting the least-significant-first column recurrence. Each pass uses only a fixed number of -bit indices and one arithmetic carry. The binary-addition carry invariant proves correctness. Logspace composition by recomputation consequently permits any L property of the resulting digit string, including being a binary palindrome, to be tested without storing the sum.
Binary array sum by recursion 2026-10-18
Keep an array unchanged, and sum entries in the half-open integer interval of array indices . The precondition requires integers and exact, terminating integer addition. An empty range returns the empty sum zero; a one-entry range returns that entry. Every longer range splits at its middle array index:For the original array , call . The left half returns , the right half returns , and the original invocation returns . The right half's left endpoint increases from zero to two: what decreases is range length , not every argument. Negative entries affect the answer but do not affect algorithm termination.
S(A, l, r):
require integer indices with 0 <= l <= r <= length(A)
size = r - l
if size == 0:
return 0
if size == 1:
return A[l]
middle = l + floor(size / 2)
left_sum = S(A, l, middle)
right_sum = S(A, middle, r)
return left_sum + right_sumSeven calls compute an array sum with only three frames active at once
. Original binary tree of invocations for , with integer intervals labeling ranges and upward arrows labeling returned sums. Small numbers give the order in which invocations begin when the left child runs first. The highlighted graph path contains the three active stack frames while the entry is read; the result from the completed left sibling is retained by its parent. Details.For range length , the children have lengths and , both positive and strictly less than . The floor function chooses the split; the ceiling function gives the other length. Algorithm termination follows by this natural number measure. For algorithm correctness, apply mathematical induction on : the two base cases return the specified sum; for a larger range, the two disjoint child ranges cover every original array index exactly once, so addition of their correct sums gives the required sum.
For , the invocation tree is a full binary tree with leaves, one per array entry. If is its number of nonleaf vertices, counting edges gives , so . Thus the total invocation count is , and there are combining additions. Here gives seven calls and three combining additions. For , there is one call and no combining addition; for , there is also one call and no combining addition, but no entry leaf, so the formula does not apply.
The call stack holds the active branch, rather than the entire invocation tree. Execute the left child completely before the right child, retaining the left result in the parent stack frame. The maximum number of active stack frames is for , and one for . Balanced splitting therefore needs frames for , compared with the frames of the factorial recursive process. Assuming constant-cost array access, index operations and addition, its time complexity is and its auxiliary space complexity is machine words for , excluding the stored input. Pass the same array with different endpoints, rather than copying slices. These bounds require all stored indices and partial sums to fit in a constant number of machine words; exact unbounded integer addition and storage require a separate bit cost analysis.
Birthday collision count 2026-10-14
The birthday collision count counts equal-label unordered pairs. Write it as a sum of indicator random variables:This uses linearity of expectation; mutual independence of the pair indicators is unnecessary. For 23 uniform calendar labels, , whereas . A configuration with three equal labels contributes three pairs, so counting pairs and recording whether any pair exists are different random variables.
Treating every pair event as mutually independent would give the wrong exact formula. For three draws, and force . The probability that all three equalities hold is , while the product of their individual probabilities is for . This distinguishes independence of the original label draws from mutual independence of events built from overlapping draws.
Boundary limits of telescoping series 2026-10-18
For a real sequence , the partial sum of is exactly . Consequently it is a convergent series if and only if has a finite limit , and its sum is . Cancellation takes place inside each finite partial sum; taking a limit is a separate step.[ref]
5.2 Infinite Series. Calculus Volume 2, §5.2 Telescoping Series: general boundary sequence, finite partial sums and finite-limit convergence criterion
The partial fraction telescoping example has and therefore limit . In contrast, let . Its first entry is , so . The even partial sums are zero and the odd partial sums are negative two. Both finite cancellations are correct, but the sequence has no single limit, giving a divergent series.
Exact cancellation can leave a convergent or an oscillating boundary term
. Original calculated partial sums. Top: approaches , with known series remainder . Bottom: alternates between zero and negative two. The dots are finite partial sums, not observed data. Details.It is also essential to keep the two contributions paired. For example, is a convergent series with sum one, as its finite partial sum is . Writing it instead as asks to subtract two divergent series. The permitted finite cancellation does not define that separate subtraction. Working through partial sums keeps the indices aligned and the operation meaningful.
Cancellation in an exponential sum 2026-10-06
Cancellation occurs when different complex numbers in an exponential sum have directions that reduce the absolute value of their sum. For example, the orthogonality of roots of unity makes for every integer , despite all terms having absolute value one.
Cardinality constraint Created 2026-10-25 Updated 2026-10-31
A cardinality constraint restricts how many members of a specified collection are selected or satisfy a property. For Boolean variables, exactly selected entries gives the displayed sum; upper and lower bounds give at-most and at-least variants. Constraint propagation can maintain the number already selected and the number still available. A requirement involving many variables is a global constraint, even when it has a compact arithmetic description.
Catastrophic cancellation 2026-10-14
Catastrophic cancellation occurs when subtraction of nearly equal approximations removes their matching leading digits and exposes earlier roundoff error. The subtraction can itself be exact on the stored operands: the information may already have been lost while obtaining them. Goldberg distinguishes this from cancellation of accurately known quantities, which can be harmless.[ref]
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html. Goldberg, 1991, §Cancellation
For , consider the single real-valued functionThe rationalization of a square-root difference proves equality in exact arithmetic. The two evaluations use the same input , but the direct version first forms a value near one and then subtracts one. The rearranged version keeps the small input in its numerator and divides by a denominator near two.
Direct and rationalized evaluation of a small square-root difference against a high-precision reference for the same binary64 inputs
. Details. For binary64
x = 1e-16, the rounded sum 1.0 + x is one, so sqrt(1.0 + x) - 1.0 is zero. The rationalized evaluation returns approximately . A 100-digit Decimal calculation using the exact stored input gives relative errors of one and about respectively. At x = 1e-12, the direct result is about , with relative error ; the rearranged result is about , with relative error .The plot uses
Decimal.from_float(x) to preserve the binary input exactly, computes at 100 decimal digits, and verifies the reference at 160 digits. Exact conversion of a stored binary value is documented by Python.[ref]https://docs.python.org/3.14/library/decimal.html#decimal.Decimal.from_float. Python 3.14 documentation, Decimal.from_float
Each error is , with the computed result converted exactly to Decimal before comparison. Hence the curves measure evaluation error for one common input, rather than a mixture of input conversion error and evaluation error. The plotted interval is far above the subnormal number range.The original problem is well conditioned with respect to relative changes in . Using the derivative and rationalization of a square-root difference, its relative condition number isIt tends to one as tends to zero. The direct evaluation instead introduces the intermediate difference with ; an error of order unit roundoff in is large relative to . This is a failure of the chosen algorithm's accuracy despite a small condition number for the same real-valued function. The rationalized evaluation avoids that intermediate catastrophic cancellation, retaining relative accuracy near the unit roundoff scale throughout the plotted interval. Recognizing this structure can improve a calculation far more than merely printing extra digits.
Character sum of a Dirichlet character Created 2026-10-06 Updated 2026-10-07
A character sum of a Dirichlet character is a finite sum such as or the weighted sum . Orthogonality of Dirichlet characters converts residue class restrictions to these sums.






