A matrix of nonnegative rational numbers with integer row and column sums can be rounded entrywise up or down while preserving all those sums. Let and be its floor and fractional part. The residual row and column sums and are nonnegative integers. Build a flow network with source-to-row flow network edge capacities , row-to-column flow network edge capacities one where , and column-to-sink flow network edge capacities . The fractional parts supply a feasible flow saturating all source arcs. The integral max-flow theorem supplies an integral one of the same total value. If its middle-arc flows are , with where , then is the required matrix. This is a constructive polynomial-time algorithm; no multiplication by a common denominator is required.
Maximum likelihood estimation Created 2026-09-24 Updated 2026-10-14
Maximum likelihood estimation is a method of statistical estimation: within a specified statistical model, choose the statistical parameter values that maximize the likelihood function of the observed data. For a parameter set and observations , its exact requirement is
The equality requires an attained, finite maximum; a supremum approached only at an excluded boundary is not enough. The resulting rule is a maximum-likelihood estimator. The likelihood function uses a probability mass function for discrete data and a probability density function for continuous data. See MIT 18.05, Reading 10b, sections 3 and 3.2.
The direction of the comparison is the interesting part: hold the observations fixed and vary the statistical parameter. Ten independent Bernoulli trials with eight successes and two failures give the maximum-likelihood estimate , as derived in log-likelihood. This chooses the member of the statistical model that assigns the greatest mass to that outcome. It does not assert an posterior probability that this parameter value is true. Bayesian statistics combines the same likelihood function with a prior distribution to obtain a posterior distribution; maximum a posteriori estimation maximizes that posterior mass or density instead.
The method turns many fitting tasks into one maximization problem. In the normal distribution model with known variance, it recovers the sample mean and ordinary least squares, while binomial regression and Poisson regression use different sampling assumptions to build their own likelihood functions. The log-likelihood turns independent contributions into a sum, exposing score equations and observed information. A peak's location gives an estimate; its shape records how much the observed data distinguish nearby parameter values.
Existence, uniqueness, bias, and statistical consistency are separate questions. Normal mean and variance maximum-likelihood estimators include a variance estimate with bias, likelihood supremum at an excluded boundary gives nonexistence, and the Neyman-Scott incidental parameter problem gives inconsistency. The usual asymptotic normality of a maximum likelihood estimator requires assumptions: a consistent estimator at an interior true parameter in a fixed finite-dimensional model with identifiability, sufficient smoothness and control of log-likelihood derivatives, and finite nonsingular Fisher information. A common parameter-independent support of a probability distribution is part of a standard sufficient framework; see Rigollet, MIT 18.650, Maximum Likelihood Estimation, slides 22-23. This is a description of the regular setting, not a complete theorem's hypotheses. The exact endpoint limit for a shifted exponential distribution shows why changing support can produce a different rate and a nonnormal limit. These properties do not follow just from maximizing a function.
In his 1922 paper in the Royal Society's Philosophical Transactions A, R. A. Fisher explicitly distinguished likelihood from probability and described choosing the parameter values with greatest likelihood. Section 6 also discusses comparing likelihoods after giving the maximum value one, the convention used in the figures here. See Fisher, On the Mathematical Foundations of Theoretical Statistics, section 6, pp. 326-328, DOI 10.1098/rsta.1922.0009.
Maximum-likelihood estimator Created 2026-09-24 Updated 2026-10-14
A maximum-likelihood estimator is an estimator whose value maximizes the likelihood function for each sample where a finite maximizer exists. Before observation, is a random variable (the choice of maximizer must be a measurable function); after observation, is the numerical maximum-likelihood estimate. A formula must specify the allowed parameter set, including whether its endpoints belong to it.
For ten independent Bernoulli trials, write . On the closed parameter interval , the binomial proportion maximum-likelihood estimator is . Eight successes give the estimate . If , the likelihood is and has its unique maximum at ; if , it is and has its unique maximum at . On the open interval these two samples have no maximum-likelihood estimate: the supremum is one, but it is not attained. This is the same issue as likelihood supremum at an excluded boundary.
A complete continuous example uses independent and identically distributed random variables with unknown mean and known standard deviation one. Their likelihood function and log-likelihood are
The sum of squared deviations separates as
because . The first term is fixed in , so the unique maximum-likelihood estimator is the sample mean . This also proves the equivalence with ordinary least squares for this model. With the constructed observations , the sample mean is one and the residual sum of squares is ten; hence
At or , the log-likelihood is two below its peak, so the likelihood ratio to the fitted value is . The absolute likelihood at the peak is , a joint density value, not the probability of observing exactly those four real numbers.
The following figure compares that sample with a constructed sixteen-observation sample consisting of four repetitions of the displayed four values, modeled as sixteen independent draws. Both fits have sample mean one, but
Thus the observed information is four times as large for as for . The distance from the peak at relative height decreases from one to : the width scales as . This is a comparison of two stipulated samples; merely copying recorded observations would not create new independent evidence.
Figure 1.
Known-variance normal mean: the same fitted mean with different likelihood curvature
. Details.
Even uniqueness needs checking. If the Bernoulli distribution success parameter is written with , eight successes give two maximum-likelihood estimates, , because both give the same probability distribution. The problem is a failure of identifiability. The special cases below show other ways an MLE can have bias or fail the usual asymptotic normality.
For an order ideal in a finite rectangular grid with coordinatewise partial order, occupied cells in each row form a left prefix. Their lengths form a nonincreasing sequence . Conversely, any nonincreasing sequence of valid row lengths specifies exactly one such order ideal, giving an abstraction function with no redundant per-cell information.
Removing all occupied cells with and replaces by for and leaves earlier rows unchanged. The new lengths remain nonincreasing: affected rows preserve their mutual order, and the first affected row only decreases. For a legal removal, the boundary immediately below it was already at least . A cached sum of row lengths can be updated by subtracting the decreases. This yields constant-time membership and count queries, linear storage, and an update linear in the number of affected rows.
Multiplication Created 2026-09-24 Updated 2026-10-13
Multiplication combines two factors into their product of numbers. For a natural number , is the sum of copies of ; with no copies the result is zero. This repeated-addition interpretation directly explains integer grouping, while multiplication of arbitrary real numbers also describes scaling by noninteger factors.
A rectangle of side lengths and has area . Split the second side into lengths and . The two areas are and , giving the visible identity
Rotating the same rectangle interchanges the sides without changing its area, explaining . These pictures illustrate distributivity and commutativity for ordinary positive numbers; matrix multiplication and other operations require their own rules.
Figure 1.
Partitioning a rectangle explains distributivity; partitioning a unit square gives an exact product of fractions
. Details.
For a fractional example, take of a quantity and then of that result: the combined scale is . The two fractions are multiplicative inverses. In the unit square on the right, the overlap of a strip occupying of the width with one occupying of the height contains six of twelve equal cells. Its area is . The product stays exact even though the decimal expansion of repeats. [ref]
Choose distinct squares of an chessboard so that no chosen pair has absolute coordinate differences or . One constraint satisfaction problem representation has square-valued variables, requiring distinctness and pairwise nonattack. Another has one Boolean variable per square, a cardinality constraint fixing their sum to , and one mutual-exclusion constraint for every edge of the knight attack graph. The first has fewer variables when is small but represents each unlabelled placement up to times; the second uses only binary constraint domains and sparse local attack restrictions.
Normalized Banzhaf index 2026-10-25
The normalized Banzhaf index rescales the probabilistic Banzhaf indices to sum to the grand-coalition value, whenever the denominator is nonzero. It preserves cooperative-game symmetry and assigns zero to a null player, but generally fails cooperative-game additivity. For example, add the three-player majority game to a dictatorship of player one. Their normalized indices are and , whereas the sum game has normalized index , not their vector sum. The sum game has grand-coalition value two, which must be retained in the normalization.
Opposite parity 2026-10-20
Two integers have opposite parity when one is an even number and the other is an odd number. Their sum is then an odd number.
p-adic absolute value Created 2026-09-24 Updated 2026-10-14
Fix a prime number . Write a nonzero rational number as , where and the nonzero integers are not divisible by . The exponent is uniquely determined. Its P-adic valuation is this signed exponent : equivalently, for any nonzero integer numerator and denominator ,
Factors of in the numerator decrease the p-adic absolute value; factors in the denominator increase it. For the computations are:
Rational number FactorizationP-adic valuation 2-adic absolute value
Not applicable by convention
This is an absolute value on a field measuring divisibility, rather than the magnitude on a real number number line. It satisfies
The proof comes directly from P-adic valuations: exponents add in a product of numbers, and extracting a common power of from a sum gives . If the two P-adic valuations differ, the remaining term with smaller exponent cannot cancel modulo , so equality holds. Thus the p-adic absolute value is a Non-Archimedean absolute value. [ref]
The metric makes two rational numbers close when their difference contains a high power of . This packages successive modular congruences into a numerical error estimate, allowing convergence in a metric space and convergent series to encode exact arithmetic information.
Reverse the finite list of sequence terms and add it to the original list. At position ,
Every position therefore contributes the same value. Reversal preserves the sum, giving and the stated formula. The symmetry explains why the endpoint average represents the whole list; one does not need to add each entry separately.
Figure 1.
An arithmetic progression and its reverse make eight equal pairs, each of value thirty-five
. Original positive-value example . Blue bars show the original entries; yellow bars show the reversed entries. The combined sum is , twice the original sum . The algebraic argument also applies when some entries are negative. Details.
The reversal argument works for both even and odd lengths. For , the two outer pairs each total sixteen and the middle entry is eight. Adding the list to its reverse counts that middle entry twice too, giving and . No half-entry is required for an odd number of entries.
Partial correctness Created 2026-10-18 Updated 2026-10-24
Partial correctness means that every terminating execution begun in a program state satisfying the precondition finishes in a program state satisfying the postcondition . For a sequential program , the usual Hoare triple notation is
Here the notation expresses partial correctness; it makes no promise that finishes. The precondition and postcondition describe permitted starting circumstances and required final circumstances, rather than tests performed automatically by the program.[ref]
For a sharp example, take the precondition and the following sequential program over mathematical integers:
i = 0
s = 0
while i < n:
    i = i
The condition remains true, so execution never reaches the instruction after the loop. Consequently its partial correctness claim holds for the postcondition , and even for the impossible postcondition : there is no terminating execution with a wrong final result. This is vacuous truth, not evidence that the loop computes a sum. The same program fails total correctness for this permitted input.
The distinction is useful in a proof: first show that an answer, whenever produced, is right; then establish algorithm termination. The summation loop verification supplies both arguments for a loop that actually progresses. Its finite trace illustrates one execution, while its loop invariant covers every permitted input.
Sometimes a sum does not initially look like a difference of neighboring entries. A partial fraction decomposition can reveal the cancellation. For the original example
subtract the two reciprocals:
Thus
For , direct addition gives . For , the six positive entries add to . The partial sums approach , and the exact series remainder is
This formula answers an accuracy question as well as a summation question. To make the remaining positive series remainder smaller than , solve . The result is , so the smallest permitted integer is . At , the error is ; at , it is .
Partial sum Created 2026-09-24 Updated 2026-10-14
The th partial sum of a series with terms is the finite sum . It records the accumulated total after additions. The terms and their partial sums are different sequences: the terms of the harmonic series get small, while their partial sums grow without bound.
For the telescoping series with terms , the first three partial sums are
By contrast, the harmonic series gives , , and , where is the harmonic number. Computing more partial sums approximates an infinite sum only when a limit of a sequence exists, and the tail of a telescoping reciprocal series shows how an error estimate can certify the approximation.
Use the unitary discrete Fourier transform
The transformed operators obey . The hopping terms contribute to the number coefficient. In the pairing sum, the odd sine part cancels between and . Thus
where
The factor one half in the full momentum sum avoids counting an anomalous pair twice. For , for every allowed momentum. Set
Real even angles ensure consistency between opposite momenta, and preserves the canonical commutation relations. The anomalous coefficient becomes . Normal ordering then gives
with
The field-polarized planar ferromagnetic spin wave has energy gap . The momenta run over the whole Brillouin zone once, including the self-inverse momenta and, for even , ; these use single-mode squeezing rather than introducing an extra independent partner.
The zero-field case has a zero-mode obstruction to bosonic Bogoliubov diagonalization. Its nonzero-momentum modes have , but , so no finite squeezing angle exists for the uniform mode. With , its Hamiltonian is , not an identically zero oscillator. For example, its matrix element between the vacuum and the two-boson number state is , whereas would vanish. Consequently the requested oscillator diagonalization is literal for nonzero field; at zero field treat the collective orientation separately or introduce a field regulator before taking a limit.
For nonzero field, the spin-wave ground state is the vacuum of all . The inverse Bogoliubov transformation gives and vanishing one-point oscillator averages. Translational invariance therefore gives the depletion
Rotating back to the physical axes yields, to the retained spin-wave order,
The zero transverse components also follow from rotation by about the physical axis in a symmetry-preserving ground state. The nonzero depletion describes zero-point quantum fluctuations: the original boson vacuum is not the ground state because the anomalous terms create pairs. It is nonnegative and must satisfy for the expansion to be reliable. At strong field it tends to zero, with in the infinite-chain limit.
For fixed , the momentum sum has a finite thermodynamic limit obtained by . At zero field the uniform mode already has no oscillator vacuum, as explained in part d. Even after removing that mode, the nonzero modes behave as
Thus assigning a finite ordered moment by simply setting in the infinite momentum sum is invalid. The divergence indicates failure of this expansion about a fixed planar orientation; it is not a negative physical magnetization. At finite size an exact zero-field state chosen to have definite total has zero planar one-point magnetization by the continuous rotation symmetry. Establishing its full correlations requires a treatment beyond the divergent ordered-state approximation.
With no pairing, the Hamiltonian is diagonal in the fermionic occupation numbers. The Pauli exclusion principle allows each momentum mode to be either empty or occupied once. Without a fixed fermion number constraint, occupying a mode lowers the energy precisely when its single-particle energy is negative. Therefore, with the Fock vacuum, a ground state is
Choose a fixed ordering of the fermionic creation operators; changing it alters only the overall phase. Any zero-energy modes may be occupied or empty without changing the ground-state energy.
To identify the occupied modes, complete the square:
Here is the dispersion parameter, not inverse temperature. If , every mode has positive energy and the unique ground state is the Fock vacuum, with . If , there are still no negative-energy modes, but have zero energy if they lie on the allowed momentum grid. Each such mode doubles the ground-state degeneracy.
For , define
Both are positive, and the occupied Fermi sea consists of the two intervals . With , the requested finite-size ground-state energy is explicitly
The factor two counts opposite momenta. Endpoints are excluded from this sum because they have zero energy; when an endpoint is allowed, its optional occupation adds ground-state degeneracy. A narrow negative-energy interval can contain no allowed finite-size momenta, in which case the sum is empty. The zero-momentum mode is always empty since .
Since every quasiparticle energy is positive, the ground state is the vacuum of all the annihilation operators, including . Its zero-momentum mode is therefore empty. For each positive momentum, the inverse Bogoliubov transformation gives
Both annihilate the normalized pair state . For example, applying produces the two cancelling terms . Thus
The factors have even fermion parity and commute for disjoint momentum pairs. Each normalized factor is a superposition of zero and two fermions, whose pair-occupation probability is . Therefore
There is no zero-mode contribution. For fixed , the sum converges since .
A normalized simple excited state is for . Its excitation energy is , and its total momentum is : both terms in add momentum . Acting on the pair gives
The affected pair now contains exactly one fermion instead of mean number ; all other pairs are unchanged. Consequently
This is the fermion number of a Bogoliubov excitation. Its change in mean fermion number lies between zero and one for , with the value one at . The Bogoliubov quasiparticle coherently mixes adding a fermion and removing the opposite-momentum fermion; it is not an eigen-excitation of the original fermion number operator. Indeed,
so fermion number is not conserved when , while fermion parity is conserved. The generally noninteger change is an expectation value in a coherent paired background, rather than a fractional eigenvalue of the fermion number operator. In the weak-pairing limit at fixed , it tends to one, as expected for an ordinary added fermion.
Put and let be the largest length. Expanding sums over all strings of source symbols, where is the total code length. By unique decodability, the concatenations of length in this sum are all distinct, so there are at most of them. Since ,
Taking th roots and sending to infinity proves the Kraft–McMillan inequality
Now is a probability distribution. With base-two logarithms, Gibbs inequality gives
Terms with contribute zero. Therefore
The normalization by is important: the raw numbers need not sum to one.
For the nontrivial case , every and
The probability ordering makes . At a dyadic number, choose the terminating binary expansion followed by zeros. Let be the first bits of , and let
be its binary cylinder interval.
Suppose and were a prefix of . Since , the numbers and would have the same first bits, so both would lie in . In particular . But
a contradiction. A later word cannot be a shorter prefix of an earlier word because the lengths are nondecreasing; equal-length coincidences were also excluded. Thus the cumulative Shannon code is a prefix code.
The ceiling inequalities give
Multiply by and sum to obtain
For a one-symbol deterministic source the displayed construction assigns the empty word and gives . This zero-bit convention is valid when the number of source emissions is supplied separately. It is not an unframed uniquely decodable code: concatenating different numbers of empty words gives the same bit string. If positive-length unframed words are required, the shortest deterministic code has length , so the strict upper bound requires the nontrivial-source assumption.
Let the input law again be . The second output symbol has probability regardless of the input, and the two remaining output probabilities sum to . Hence
with equality when the first and third output symbols each have probability . The row entropies are , so
Take and . The output is and both bounds are attained. Therefore
The equality conditions also show uniqueness of the optimum input law. The middle row is the average of the outer rows and carries extra conditional entropy without introducing a new output law; removing a redundant input symbol from a channel explains why it need not be used.
Figure 1.
Mutual information along symmetric input distributions for the three channels
. The first two channels attain log2(3/2) at uniform input, while the third attains one half bit by omitting its middle input. Details.