For every primal feasible solution , weak duality givesThus no primal feasible solution improves on . Similarly, for every dual feasible solution ,Therefore both candidates are optimal, with the same objective function value. Equality is a linear programming optimality certificate and does not require a separate existence argument.
After removing the two redundant inequalities, the feasible region isIts lower boundary consists of three line segments or rays: for , then for , then for . The feasible region is everything on or above this boundary in the first quadrant.
The boundary extreme points areAlong its three successive pieces, the objective function has respective slopes , and as increases. Thus it decreases to the middle extreme point and increases thereafter. For fixed , moving above the boundary only increases the objective function. HenceAs an algebraic check of the graphical answer, the active inequalities givewith equality at the stated extreme point.
At , the first three dual left sides are , and , strictly above their bounds , and . Thus complementary slackness forces . Both dual variables are positive, so both primal inequalities are equalities:Solving this linear system givesAll components are nonnegative, the two original upper bounds are met exactly, and the objective function equals the dual value. The weak duality bound therefore certifies optimality. The forced zero components and unique solution of the two remaining equalities also prove that the primal optimum is unique.
At an unconstrained local minimizer of a twice continuously differentiable objective function, the first-order optimality condition is . The second-order necessary condition is for every direction , so the Hessian matrix is positive semidefinite.
For the Euclidean norm, the unit steepest descent direction is when ; the algorithm usually uses the unnormalized direction . It is a descent direction because .
Two limitations of unpreconditioned steepest descent method in high-accuracy smooth optimization are its slow zigzagging on ill-conditioned valleys and its sensitivity to scaling of the coordinates. It uses no curvature information to correct those directions, so it can require many function and gradient evaluations compared with a suitable Newton or quasi-Newton method. These are reasons to prefer curvature-aware methods in that setting, rather than a claim that gradient-based methods are never useful.
Past exam of the optimisation for data science course of the University of Oxford 2023 1 a Solution 2026-10-25
Put and . The proximal operator for the L1 norm separates into independent scalar minimization problems:The subgradient optimality condition is . By the subgradient of the absolute value, a positive solution must satisfy , and a negative solution must satisfy . At zero, the subgradient optimality condition holds exactly when . The squared term makes the objective function a strictly convex function, so these cases give its unique minimiser.
Thus the proximal operator is the soft-thresholding operatorConsequently the requested proximal gradient mapping, rather than just the proximal operator, isThe corresponding proximal gradient method update is . Small coordinates are set exactly to zero. When , the soft-thresholding operator is the identity and the proximal gradient mapping reduces to .
Past exam of the optimisation for data science course of the University of Oxford 2023 1 c Solution 2026-10-25
Set , and . Here is the proximal gradient mapping, is a squared Euclidean distance, and because is a global minimizer. The update gives .
First use the supplied inequality (1) with :Thus the objective function values, and hence the errors , are nonincreasing. Next use (1) with :Expansion of the squared Euclidean norm givesso the last bound is exactly .
The telescoping sum over therefore givesSince each summand is at least , we obtain the proximal gradient objective error boundThe bound holds for the last iterate. The monotonicity of the objective function values is what converts an averaged estimate into this last-iterate estimate.
Past exam of the optimisation for data science course of the University of Oxford 2023 1 d Solution 2026-10-25
Fix , and write and . The supplied subgradient relation gives with . The evaluation point in is , whereas is a subgradient at the new point .
Apply the subgradient inequality at , with comparison point :The descent lemma for the -Lipschitz gradient of givesAdding these estimates proves the stronger, explicit inequalityIn particular, the objective function decreases for whenever the proximal gradient mapping is nonzero.
To justify the requested big O notation, we must check that , which depends on , stays bounded. Suppose is nonempty, and choose a fixed in this subdifferential. This holds for a finite-valued convex function on , including both norms in parts (a) and (b). By monotonicity of a convex subdifferential,Substituting and , and then using the Cauchy-Schwarz inequality, yieldsThus , uniformly in . This local boundedness of the proximal gradient mapping makes the remainder at most , soNo differentiability of is needed. If an proper extended-real function is allowed as the regularization term, the subdifferential condition at is a qualification for this uniform remainder; the preceding explicit descent inequality remains the useful statement whenever its quantities are finite.
Past exam of the optimisation for data science course of the University of Oxford 2023 2 b Solution 2026-10-25
For the linear least-squares problem objective function, direct expansion with givesIts gradient is , so the middle term equals .
Use the supplied thin singular value decomposition . Since , the linear map preserves the Euclidean norm. The square matrix is an orthogonal matrix, so . ConsequentlySubstitution into the expansion provesThus is a strongly convex function with modulus . This modulus is sharp: choose for an index attaining the smallest singular value. The Hessian matrix is , so the same conclusion says that its smallest eigenvalue is .
Past exam of the optimisation for data science course of the University of Oxford 2023 2 f Solution 2026-10-25
The printed distance needs a square. The native PDF, paper page 3, prints in the final bound, but the general conclusion from (5) contains . We first prove the corrected statement and then show that the printed version can fail.
Take the expectation in (5), use the tower property, and sum over . The squared Euclidean distances form a telescoping sum:Discard the final nonnegative squared Euclidean distance. The smallest of numbers is at most their arithmetic mean, soThis is an bound above the stochastic gradient noise floor for the best expected objective function value. By Jensen's inequality, it also bounds for the averaged iterate , because is a convex function.
To test the printed version, take one component function, , with , and . This convex quadratic function has , hence it has a -Lipschitz gradient. The stochastic gradient descent update is deterministic, its conditional variance is zero, and the assumed positive bound is valid. At , the new iterate is , soThus the printed inequality is false under its stated assumptions. The squared Euclidean distance in the corrected bound resolves the defect.
Past exam of the optimisation for data science course of the University of Oxford 2023 3 d Solution 2026-10-25
The supporting inequality in part 2(a) bounds below by an affine function plus a positive squared Euclidean norm, making it a coercive function. Its continuity gives a global minimizer , which is unique by strict convexity. Let , and . Here is the block size, so its role differs from the number of component functions in Question 2. Use randomized block coordinate descent with uniformly sampled blocks of size , independently at each update. Sampling uniformly from a fixed partition into equal-sized blocks gives the same calculation, since each coordinate has inclusion probability .
Let be a common upper bound on the block Lipschitz constants. Part (c) permits . With step size , part (a) givesSumming squared partial derivatives according to their inclusion probabilities,For a strongly convex function, part 2(a) also yields the strong convexity gradient inequalityIndeed, substitute into the supporting inequality and complete the square in : the expression is at least for every .
Combining the last three estimates gives a contraction in conditional expectation:By the tower property and repeated application,An optimization epoch counts coordinate partial derivative evaluations: it comprises block updates or one full gradient update. With sampling with replacement, an optimization epoch is this work measure; it need not visit every coordinate. Consequently the block method needsto bring the expected objective function gap below , for , up to integer rounding.
For the steepest descent method, use a global Lipschitz gradient constant . Part (c) with the full block permits . The descent lemma with step size , together with the strong convexity gradient inequality, givesAn exact line search along the negative gradient does at least as well in objective function decrease per update. Ignoring its additional work, the resulting epoch complexity isThe common coordinate-based guarantees favour blocks by a factor in epochs. In fact, with the conservative constants and , both methods have the same guaranteed contraction per update, while a block update uses only coordinate partial derivatives.
This compares the bounds justified by the given constants. For a particular objective function, sharper constants give the comparison against ; an actual speedup of is not universal. Computing a block coordinate gradient also need not cost exactly of a full gradient evaluation. The epoch complexity comparison assumes that coordinate partial derivative counts are a useful measure of work, and does not itself establish a wall-clock comparison.
The dual isweak duality says that any feasible primal and dual satisfy . Indeed,The first inequality uses and , and the second uses and . This proves the theorem. In particular, feasible solutions with equal objective function values are optimal for both problems.
The two primal constraints are equalities, so let the two dual variables be free. Primal feasibility restricts to the nonnegative orthant, givingThus the feasible region lies above all four lines:Its lower boundary follows the third line up to , the fourth line from there to , and then the first line. The second line never determines the envelope. Along these three pieces respectively has slopes , , and , so its unique minimum is at the first corner:
At this dual point the first two inequalities are strict, while the last two are equalities. complementary slackness therefore suggests . The remaining primal equations become , , giving . This is nonnegative and satisfies both equations. Its objective function is , equal to the feasible dual value. weak duality provesNo nonnegativity restriction was imposed on the dual variables; the negative- second corner is part of the feasible boundary, even though it is not optimal.
The dual lower envelope has its objective function minimum at the intersection of the third and fourth constraints
. Details. A nonconvex primal problem can have a positive duality gap even when both optima are attained. Choose the finite set , the objective function values , , , and the equality optimization constraint . The only feasible point is , so .
With unrestricted equality Lagrange multiplier , the three possible optimization Lagrangian values and their minimum areThe concave Lagrange dual function has unique maximizer , with . Thus the duality gap is . At the optimal Lagrange multiplier, both inner minimizers and violate the equality; the dual optimum does not recover a primal optimizer.
Why can no slope close the gap? Any affine function lying below the two endpoint costs obeys and . Adding gives , so its value at residual zero cannot reach the feasible cost . A convex combination of the endpoint cost-residual pairs with equal weights has residual zero and average cost zero. This averaged pair is unattainable: the actual decision costs . This geometry explains precisely what the dual bounds fail to distinguish. Nonconvexity does not force a positive duality gap: changing only to makes both optimal values zero on the same nonconvex domain.
Project scheduling 2026-10-13
Project scheduling asks how quickly a collection of dependent activities can finish. Adding their durations usually overestimates the answer, because independent activities can run together; taking only the longest single activity usually underestimates it, because some activities must wait. The critical path method identifies the chain of dependencies that determines the finish time. Its simplest model assumes known, fixed durations, unlimited parallel processing, and precedence requirements saying that each predecessor must finish before its successor starts. These are the assumptions of the basic model in Hendrickson, Project Management for Construction, §10.2.
Represent each activity by a vertex of a finite Directed acyclic graph; an edge means that activity waits for activity . Activity runs without interruption for duration , starting at . The optimization constraints and project finish time areThe objective function is to minimize . All durations and start times use the same time unit, and the project starts at time zero. The Directed acyclic graph assumption allows a topological order in which every predecessor is processed first.
Consider this small, abstract project:
Activities A and E may start together. After A finishes, B and C may run together, but D must wait for both. F must similarly wait for both D and E: a merge means all incoming requirements must hold. This activity-as-vertex convention keeps durations on the activities and uses arrows only to express precedence.
Unlimited parallel processing is essential to the equality between the longest graph path duration and the optimal finish time. For example, two independent chains, each containing two activities of duration 3, have longest graph path duration 6. Two processors can finish both chains in 6, but one processor needs 12 because all four activities must run sequentially. Thus with limited resources the longest graph path still gives a lower bound, but it need not be achievable. Such resource requirements belong to the broader subject of scheduling.
// Target: mathematical-optimization.bigb
Proximal gradient objective error bound 2026-10-25
For , with a convex function having an -Lipschitz gradient and a proper convex function with a well-defined proximal operator, the proximal gradient method with step size satisfies the displayed bound whenever a global minimizer exists. The one-step subgradient inequality and descent lemma giveThe objective function values are nonincreasing. A telescoping sum over , followed by comparison of the last error with the arithmetic mean of the errors, proves the result. The bound controls the last objective function error without requiring a strongly convex function or a unique minimizer.
Target: convex-optimization.bigb, under Proximal gradient method.Consider the minimization problemThe objective function is a strictly convex function with its unconstrained optimization minimum at . If , it decreases throughout the feasible set until the bound is reached. If , the feasible set already contains . HenceWith , the optimization Lagrangian and KKT conditions areSubstituting gives the unique inequality Lagrange multiplierFor , the active constraint has . For , there is strict slack and . At , the active constraint has zero Lagrange multiplier: the boundary happens to pass through the unconstrained optimum. Feasibility and complementary slackness must both be checked; solving only would allow infeasible candidates.
The same quadratic objective with active, just-touching and inactive upper bounds
. Details. An independent certificate follows by completing the square:The Lagrange dual function is a concave function of . Its maximum over occurs at and equals . Thus every case has an explicit lower bound attained by a feasible point; the KKT conditions provide a certificate that can be checked without searching all real numbers.
Randomized block coordinate descent 2026-10-25
A coordinate descent method that randomly selects a block and updates only its coordinates. Suppose each coordinate is selected with probability , every block has Lipschitz constant at most , and the objective function is a strongly convex function with modulus . The block descent lemma and the strong convexity gradient inequality giveFor uniform blocks of size in coordinates, updates constitute an optimization epoch, and the epoch complexity is . Here is the initial objective function gap, and the target is its expected gap at most . A coordinate-based common bound is ; actual constants can improve it.
Target: gradient-descent.bigb, under Gradient descent. Search direction 2026-10-31
A search direction is the nonzero vector used in the displayed optimization update. In a line search with positive step size, its orientation matters: a descent direction has negative directional derivative of the objective function. Minimization over a full line instead permits either sign of .
Second-order-cone optimality certificate 2026-10-14
A curved feasible set can have the same certificate structure. ConsiderWrite and use the second-order cone . In this coordinate ordering,Self-duality of a second-order cone makes . The equality forces and , leaving . Its dual objective function is , maximized at . Thus every feasible point satisfies , and attains that bound: .
A curved primal constraint and an interval of dual certificates
. The left panel is the slice of the second-order cone, so its boundary is . The right panel is the dual slice , : admissible form , and reaches at . The optimal slack variable and dual variable lie on different cone boundary rays with zero dot product. Details.The zero dot product is . Individual coordinate products need not be nonnegative here: the cancellation occurs across coordinates. The valid complementary slackness condition is cone-level orthogonality, rather than the coordinatewise interpretation of the nonnegative orthant.
Simulated annealing Created 2026-10-14 Updated 2026-10-18
Simulated annealing accepts worse feasible solutions to escape a local minimum. Minimize an objective function , analogous to energy. Effective temperature has the same units as , absorbing the Boltzmann constant; it controls exploration, rather than a material's thermodynamic temperature.[ref]
Optimization by Simulated Annealing by Scott Kirkpatrick and others. Printed pp. 672–673: effective temperature and cost as energy
Given current feasible point , draw from a proposal distribution . For a symmetric proposal distribution, , use the Metropolis–Hastings acceptance probabilityAccept with this conditional probability; on rejection retain . Every downhill or equal-cost proposal is accepted. Draw a fresh uniform random variable on and accept if . The off-diagonal transition probability includes proposing .[ref]
Optimization by Simulated Annealing by Scott Kirkpatrick and others. Printed p. 672: acceptance rule and rejected proposals
For a maximization problem with objective function , set : every improving proposed neighbor is accepted, and a worsening move of loss has conditional probability of acceptance, under the same symmetry assumption. Likelihood-power annealing uses precisely this sign convention for a log-likelihood. Retain the best feasible solution seen, since the current state can worsen even after a global minimum has been visited.
If the proposal distribution is asymmetric, use the full Metropolis–Hastings acceptance probability, for ,A missing reverse proposal gives zero acceptance. Even a downhill proposal need not be accepted with probability one in this case. Choosing uniformly among a variable number of neighbors is generally asymmetric: and give the correction , where is vertex degree.[ref]
The useful idea is to separate exploring from insisting on improvement: an uphill move can open a route to a better feasible solution. Its usefulness depends on the proposal distribution, the scale of the objective function, and the cooling schedule for simulated annealing. Finite practical schedules carry no general guarantee of finding a global minimum.





