Let . The feasible probability simplex is a nonempty compact convex set, so the extreme value theorem guarantees a minimizer. Its Hessian matrix is diagonal with positive entries , making a strictly convex function. Hence the minimizer is unique.
Use the Lagrange multipliers for the sum constraint and for . The Lagrangian is
The KKT conditions are
A strictly positive feasible allocation exists, so the Slater condition holds. These conditions are necessary and sufficient for this convex optimization. At least one coordinate is positive, giving . Put . For a positive coordinate, complementary slackness gives . At a zero coordinate, stationarity gives , or . Thus
Here . This logarithmic water filling raises the smaller baseline values to a common level. The scalar left side is a continuous function and strictly increasing above , starts at zero, and tends to infinity, so exactly one solves it. One can find it by interval bisection, or sort the baseline values increasingly and find an index for which
using . Equality at the next baseline simply gives a zero allocation. Sorting and a running sum implement the water-filling algorithm in time.
Introduce nonnegative slack variables for the four dual inequalities. The initial simplex dictionary is
At the origin all four basic slacks are positive. Enter : the simplex ratio test compares bounds from and from , so leaves at . Entering initially would tie two limiting bounds and produce degeneracy in linear programming; the chosen pivot avoids this. The new simplex dictionary is
Only has positive objective coefficient. Enter it; the limiting bound is from , rather than from . Thus leaves, giving
Every nonbasic variable has nonpositive objective coefficient, so this feasible simplex basis is optimal. Setting the nonbasic variables to zero yields
Both new basic solutions have strictly positive basic coordinates; neither pivot is degenerate.
The first and fourth dual constraints have positive slacks and . Complementary slackness therefore requires . Since , the second and third primal constraints must be equalities:
Consequently
The first primal left side is , so the vector is feasible. Its value matches the feasible dual value, giving a linear programming optimality certificate.
For a minimum-cost flow with bounds , the capacitated flow optimality conditions consist of primal feasibility and network dual potentials whose network reduced costs obey
For a zero-capacity edge both bounds coincide and no sign restriction is needed; all capacities here are positive. These are the bound form of complementary slackness. To derive necessity directly, construct the residual network: a possible increase has original cost and a possible decrease has reverse cost . An optimal flow cannot admit a negative-cost directed cycle, since a positive step around it preserves flow balance and lowers cost. If there is no such cycle, connect a new source by zero-cost edges to every vertex and let be shortest-path distances. They exist because no negative cycle is reachable. For every residual edge , . Taking makes every residual network reduced cost nonnegative, exactly the displayed sign conditions: both directions exist for an interior edge.
Conversely, for any other feasible flow , equal flow balances give
Each summand is nonnegative at a lower or upper bound, and zero at an interior edge. Hence the sign conditions suffice for optimality as well.
For the final flow, use in the order . All four tree edges have zero network reduced cost, while have costs . More explicitly, every feasible flow satisfies
Our flow attains equality. This gives a direct cost certificate of 220. The strict signs also force , at any optimum; flow balance then fixes all remaining edges, so this flow is unique.
A useful form of the Lagrangian sufficiency theorem is as follows. For minimization of subject to and , form
If is feasible, , , and globally minimizes over the ambient domain for these fixed multipliers, then is a global constrained minimizer. Indeed, for every feasible ,
The first inequality uses multiplier signs; the last equality uses feasibility and complementary slackness. Equality constraints alone require no sign restriction on their multipliers. A stationary point of a differentiable convex Lagrangian is a global minimum, which is a common way to verify the theorem's hypothesis.
Here take
Stationarity gives . Feasibility then gives and . For that multiplier,
The Lagrangian has its unique global minimum at , so the sufficiency theorem proves
A kernel support vector machine constructs a large-margin classifier in a feature Hilbert space. Given training points and labels , choose a feature map and an affine score . Prediction is the sign of the score. Normalizing the functional margin to one makes the closest separating geometric margin , and the full margin between the two supporting hyperplanes is . Maximizing that margin therefore minimizes .
For separable data, the hard-margin support vector machine primal is
Noisy or nonseparable data use slack variables and the soft-margin support vector machine:
Eliminating gives the equivalent hinge loss objective . The parameter balances margin size against violations; it is not a hard bound on their number. The bias is unpenalized here, which determines the equality constraint in the dual.
Attach multipliers to and to . The Lagrangian is
Stationarity gives , and . Eliminating yields
where is a positive-definite kernel, meaning positive semidefinite Gram matrices. The hard-margin dual is the same objective with only , without the upper bound. Soft-margin strict feasibility follows by taking and all , so strong duality and the Karush-Kuhn-Tucker conditions apply. For separable hard-margin data a separator can be rescaled to give strict margins, supplying the analogous qualification. Although the feature space may be infinite dimensional, projecting onto the finite span of the training feature vectors preserves scores and cannot increase its norm, so this optimization reduces to a finite span.
The complementary slackness relations are
Points with are support vectors. If , then and ; such a point gives . A point with can lie inside the margin or be misclassified, while contributes no term to . If no coefficient lies strictly between the bounds, an admissible bias must be obtained from the KKT inequalities, rather than dividing by a nonexistent margin vector. Bias and dual coefficients can be nonunique even when the optimal feature-space weight is unique.
The kernel trick operates both during training and prediction. The dual optimization uses only the Gram matrix , so the feature vectors need not be formed. Prediction likewise uses
A nonlinear kernel therefore makes a linear separator in feature space represent a nonlinear boundary in input space. For example, on the degree-two polynomial kernel corresponds to . Gaussian kernels yield infinite-dimensional feature spaces. An arbitrary similarity is not automatically a valid kernel: for every finite collection and real coefficients , one needs . This makes the dual quadratic form positive semidefinite and the maximization concave.
Mercer's theorem gives a spectral realization under its additional analytic hypotheses. For a continuous symmetric positive-semidefinite kernel on a compact domain with a finite full-support measure, the integral operator is compact, self-adjoint and positive. The Mercer expansion is
with the standard uniform convergence conclusions under these hypotheses. Since , the nonlinear feature map
is well defined. This explains the connection of Mercer kernels to Hilbert space features, rather than treating the kernel trick as a purely formal substitution.
The finite-Gram positivity condition is more general than this compact-domain spectral theorem. Every such kernel generates a Reproducing-kernel Hilbert space: on finite sums of kernel sections define
quotient out zero-norm elements, and complete. The resulting space satisfies the reproducing property . Its canonical feature map is , whose inner product is exactly . A feature map need not be injective; calling it an embedding does not by itself prove distinct inputs remain distinct. The kernel support vector machine uses this geometry together with convex duality to fit and evaluate a maximum-margin classifier while accessing the geometry only through kernel evaluations.
For a maximization problem with and , use the optimization Lagrangian
The Lagrangian sufficiency theorem says: if is feasible, globally maximizes over its original domain, and complementary slackness holds, , then globally maximizes over the feasible set. Equality Lagrange multipliers have no sign restriction. For every feasible ,
which proves the theorem.
For a minimization problem, reverse the signs in the optimization Lagrangian: take , with . If a feasible globally minimizes this optimization Lagrangian and satisfies complementary slackness, then
The hypothesis is a global extremum of the Lagrangian. Merely solving its stationarity equations is insufficient; no convexity assumption is needed when the global extremum itself has been proved.
With and , the maximization optimization Lagrangian is
A finite unconstrained maximum requires to cancel the coefficient of . With , completing the square gives
Thus its global maximizers have and . The equality constraint holds, and complementary slackness with makes , giving . The Lagrangian sufficiency theorem certifies
Every feasible point has objective at most , so this is a global conclusion rather than just a stationary-point calculation.
For any feasible , increasing lowers the objective, so the additional upper bound makes . Feasibility then requires . The lowest feasible value of on the circle occurs at the lower intersection with . Solving gives the candidate
A global certificate avoids relying on the circle sketch. Introduce Lagrange multipliers for , and :
Choose
The coefficient of vanishes, and , . Therefore completing the square yields
The candidate minimizes globally and satisfies both active inequality constraints, so complementary slackness and the Lagrangian sufficiency theorem give
Choose the oriented incidence matrix convention with at an edge's tail and at its head. Let be net supply, so . The uncapacitated minimum-cost flow problem on a finite directed graph is
or . Negative denotes net demand. Costs may have either sign; the problem can be infeasible or unbounded.
For vertex network dual potentials , the optimization Lagrangian is
The infimum over is finite exactly when every network reduced cost is nonnegative. Thus the Lagrangian dual problem and complementary slackness are
A feasible flow and feasible network dual potentials satisfying these equalities have equal costs and are optimal by weak duality.
If the underlying undirected graph is connected, deleting one redundant balance row makes the oriented incidence matrix have rank . A set of independent edge columns is exactly a spanning tree. Set all non-tree flows to zero, solve the tree balances, and check nonnegativity to obtain a basic feasible solution. Basic tree edges may have zero flow, which is degeneracy in linear programming. Requiring on tree edges determines network dual potentials up to a common additive constant. If every non-tree network reduced cost is nonnegative, the tree flow is optimal. This is the basis of the network simplex algorithm. If the graph is disconnected, solve the balances separately in each component; each component must have total net supply zero and uses its own spanning tree.
On the dashed spanning tree, the nonzero flows are
with and all non-tree flows zero. The tree balances give supply four at vertex , demands one at and , and demand two at . Its cost is .
Choose and make the tree network reduced costs zero. The resulting network dual potentials are
For the non-tree edges, in the order , the network reduced costs are
Only has negative network reduced cost, so it enters the basis.
Adding this edge to the tree creates the graph cycle . Increasing its flow by adds on and subtracts on . These signed changes preserve every flow balance. The simplex ratio test allows , and the objective decreases by because the cycle's signed cost is .
Take and remove from the basis. The other tied edge remains a zero-flow basic edge; this is a legitimate degenerate tree basis and requires no extra pivot. The new flow is
Its cost is . For the new tree, choose
Every network reduced cost is nonnegative: the new non-tree costs for are . All positive-flow edges have zero network reduced cost, and the dual objective is . Thus complementary slackness gives
Figure 1.
Optimal network flow of cost 23, with vertex dual potentials
.
Apply positive affine payoff transformations, if necessary, so both payoff matrices have strictly positive entries. Such transformations preserve best responses and Nash equilibria. The Lemke-Howson algorithm uses unnormalized nonnegative strategy vectors and slack variables satisfying
Thus its two polytopes are and . A label occurs when or ; a label occurs when or . The complementary pivoting path drops one label from the artificial zero pair and resolves each duplicated label until all labels return.
Terminate at a completely labelled pair other than the artificial zero pair. This is equivalent to complementary slackness
A nonzero completely labelled pair has both vectors nonzero: if , then forces , and the converse is analogous. Normalize to mixed strategies
The inequalities imply that every row payoff against is at most , with equality on every row receiving positive probability in . Thus is a best response to . Likewise is a best response to using . Hence is a Nash equilibrium. Nondegeneracy of a bimatrix game ensures the usual complementary pivoting path has a unique continuation after the label choice.
Write for a route congestion price and for resource demand. A route with weighted logarithmic utility chooses , since its marginal utility equals its route congestion price. Each resource raises its price when and lowers it when ; controls the speed. This is a multiplicative resource-price dynamics model of supply-demand feedback.
For a well-defined finite network, assume positive capacities, nonempty routes, and strictly positive initial resource congestion prices. The relevant rank condition is full row rank, . Zero initial prices are invariant under the printed differential equation, so the unrestricted phrase “all trajectories” needs a qualification; a concrete counterexample is given below.
Define . On the domain with , direct differentiation gives
Thus is a concave function, and it is a strictly concave function when has full row rank. It has a maximum: as , its negative linear capacity term dominates its logarithmic terms, while on bounded sets if any route congestion price approaches zero. A maximizing price vector therefore exists with every , though some individual resource congestion prices may be zero. The Karush-Kuhn-Tucker conditions are
They express feasibility and complementary slackness: positively priced resources are fully used, and an underused resource has zero price. Full row rank gives uniqueness of this maximizing price vector.
To prove convergence, rather than merely monotonicity of , use the relative-entropy Lyapunov function for resource prices
where a summand with means . Every summand is nonnegative and vanishes only at its reference price. Along a positive-price trajectory,
The last equality follows by substituting , and complementary slackness removes .
A sublevel set of bounds every price from above and bounds every coordinate with away from zero. Each route contains at least one such coordinate, because . All route congestion prices consequently remain bounded away from zero, so the vector field is regular on the resulting compact set. Positive coordinates cannot hit zero in finite time, since their equations have the form times a bounded function. These bounds also give global existence.
The LaSalle invariance principle now applies. Equality in requires and . Then and , so every such point is an equilibrium satisfying the same Karush-Kuhn-Tucker conditions. If has full row rank, is injective, making this set the singleton . Thus
for every strictly positive initial price vector. This proves full-row-rank convergence of multiplicative resource prices.
If is row-rank deficient, all maximizing price vectors still have the same route-price vector: otherwise strict concavity of makes their midpoint improve . Consequently the limiting rates are unique, while individual prices may not be. Positive-price trajectories actually converge to a single point in that possibly non-singleton equilibrium set. To see this, choose any subsequential limit in it, and form the same with reference . It is nonincreasing, and along the chosen subsequence it tends to zero. Hence it tends to zero on the whole trajectory, forcing .
For example, two identical unit-capacity resources serving one route of weight one have . With , obeys , while is constant. The equilibrium prices can be any nonnegative pair with sum one, and positive initial values select the limiting split; the route rate always tends to one. Rank deficiency can, but need not, cause price nonuniqueness. This example also shows why full column rank alone is insufficient.
Finally, the zero-price qualification is essential even for an invertible matrix. Take
The vector has positive route congestion prices and rates . Resource one is balanced, but resource two is overloaded; its zero price keeps its derivative zero. This is a boundary equilibrium of multiplicative price dynamics, distinct from the optimizing equilibrium
Therefore full row rank gives the unique optimizing equilibrium and convergence from strictly positive prices; it does not give uniqueness of every equilibrium on the nonnegative orthant.
Introduce nonnegative slack variables and start the simplex algorithm at , with slacks . The objective's largest positive entering coefficient belongs to . Its ratio test is , , , so leaves and enters.
Solve that pivot row for and substitute into the other rows and the objective :
This is a feasible simplex dictionary at nonbasic variables . All their objective coefficients are negative, so no feasible increase can improve the objective. Thus
The negative reduced coefficients also prove uniqueness of this optimum.
The dual linear program, with nonnegative variables , is
The feasible choice has objective . Weak duality proves that it and the primal point are optimal. Complementary slackness also forces because the first two primal slacks are positive, and then the positive forces .
For a minimization problem over a domain with inequality constraints and equality constraints , let
The Lagrangian sufficiency theorem states: if is feasible, , , and globally minimizes on , then globally minimizes the constrained objective. Equality multipliers have no sign restriction.
For any feasible , the sign of the inequality multipliers gives . Feasibility and complementary slackness give . Therefore
This proves the theorem. No convexity is necessary if the global minimization of the Lagrangian is already known. In a differentiable convex optimization problem with convex inequalities and affine equalities, a stationary point of this convex Lagrangian is automatically a global minimizer, which gives the familiar sufficiency of the Karush-Kuhn-Tucker conditions.
Use a directed bipartite graph with one vertex for each job and one for each agent. Job vertices have supply and agent vertices demand . An arc from job to agent has cost and nonnegative flow ; an upper bound may be added, but is already implied by the balances. The minimum-cost flow formulation of the assignment problem is
Integer supplies and demands give an integral optimum by integrality of the transportation problem. Its positive arcs form a perfect matching, hence give one job per agent.
A network simplex algorithm basis for this connected -vertex network has tree arcs, whereas an integral assignment has only positive flows. For , at least basic tree arcs therefore carry zero flow. This unavoidable degeneracy in linear programming can cause zero-step pivots, extra bookkeeping and cycling unless an appropriate pivot rule is used. The Hungarian algorithm exploits the assignment structure directly rather than maintaining many zero-flow basic arcs.
Suppose the assignment dual potentials satisfy . For every feasible assignment ,
If the selected assignment uses only arcs with , its cost equals this lower bound. Weak duality and complementary slackness certify optimality. The PDF correctly denotes the feasible assignment by ; the TeX aid mistakenly replaces it with .
The Hungarian algorithm maintains feasible assignment dual potentials and a matching in a graph of zero reduced cost edges, where . Search for an augmenting path in a matching in this equality graph. If there is none, let be the reachable jobs and the reachable agents in the alternating search from unmatched jobs. Every agent in is matched to a job in . Set
Reduced costs from to its complement decrease by , those from outside into increase, and the remaining ones do not change. Thus feasibility and current matching equalities are preserved, while at least one new equality edge appears. Continue until an augmenting path in a matching increases the matching size. A perfect matching in the equality graph then has the same value as the dual linear program and is optimal.
For the example, start with the row minima and . The reduced cost matrix is
Match job to agent . Searching from both unmatched jobs gives and ; the minimum cost to an agent outside is . Update to and :
The new equality edge augments the matching. From unmatched job , the next alternating search reaches agent and its matched job , giving and . Now . The updated feasible assignment dual potentials and reduced costs are
The augmenting path in a matching uses job to agent , the reversed matched edge to job , then the new edge to agent . It gives the optimal assignment
The dual linear program value is , an independent optimality certificate.
The Lagrange sufficiency theorem for maximizing subject to and states that if a feasible point and multipliers satisfy complementary slackness and globally maximizes the Lagrangian function in constrained optimization
then globally maximizes on the feasible set.
For the equality constraint, take
The Lagrange multiplier equations give
so positivity and the constraint imply
For this multiplier, is a strictly concave function on the positive octant and its stationary point is its unique global maximum. The sufficiency theorem therefore proves that the constrained maximum is
For , use . The same point and multiplier satisfy feasibility, stationarity, , and complementary slackness, and they again globally maximize the Lagrangian. Hence the answer is unchanged. Equivalently, any point with strict inequality can be radially scaled outward, increasing all three positive coordinates and therefore increasing .
The Lagrangian sufficiency theorem for a maximization problem says the following. Suppose the constraints are and , and define
If a feasible satisfies complementary slackness and globally maximizes , then globally maximizes . Indeed, for every feasible ,
This proves the theorem. In a concave maximization problem, stationarity and the boundary optimality conditions ensure the required global maximum of the Lagrangian.
For the problem at hand, retain as the domain and attach a multiplier to the equality:
For , this is concave in on the domain. Its separate maximizers satisfy
while the term is . Thus may be positive only when ; when , its maximizing value is .
If
take . Then , , and feasibility fixes
The Lagrangian sufficiency theorem gives the maximum
If
then and . The equality constraint becomes
so
Consequently
The assumptions and ensure . At the stationary point , so the maximum value is
The two formulas agree at .
Introduce slack variables . In the initial simplex algorithm dictionary, has the largest positive objective coefficient. The ratio test gives
so enters and leaves. Solving the third constraint for gives
The objective becomes
Every reduced cost is now nonpositive, so the simplex optimality criterion gives
The other two slacks both equal one.
The dual linear program is
The vector
is dual feasible and has objective value . By weak duality, it and the displayed primal point are optimal; they also satisfy complementary slackness.