For a partial assignment problem, add its fixed cost to the sum, over remaining tasks, of each task's cheapest available machine cost. This is a lower bound because it relaxes the requirement that different tasks use distinct machines. It is an admissible bound for branch and bound, even though the minimizing choices may assign the same machine repeatedly.
Minimizing over binary variables with one outgoing and one incoming edge at every graph vertex, and , is an assignment problem. Its feasible solutions are cycle covers of a directed graph, whereas a travelling salesman problem requires one Hamiltonian cycle. The relaxed minimum is therefore a lower bound on the tour cost. If its optimum contains a proper subtour , every tour omits at least one edge of . Branching into subproblems that respectively forbid each edge of preserves every possible tour. Solving each child assignment problem and pruning those whose bounds exceed the best tour yields a finite branch and bound algorithm. Equality also permits pruning when only one optimum is wanted.
Best-bound search 2026-10-14
For minimization, best-bound search expands the active branch and bound node with smallest lower bound. A feasible completed assignment supplies an incumbent upper bound. Nodes with lower bound at least that incumbent can be discarded when only one optimum is needed. Search ends with an optimality certificate when no active node can improve the incumbent.
// Target: combinatorics.bigb
At a regular differentiable interior nearest point of a parametric curve, the displacement from the query point is perpendicular to the tangent vector. A branch and bound search uses distances to certified enclosing bounding volumes as lower bounds, and evaluated limit points as upper bounds. Refine the most promising restricted pieces until the upper bound differs from the global lower bound by the chosen distance tolerance. Safeguarded Newton root-finding iteration accelerates local candidates, but endpoints, nonregular points, ties and other stationary branches must not be omitted.
A robust intersection search applies branch and bound to pairs of subdivision surface patches. Certified bounding volumes reject disjoint pairs, and refinement reduces unresolved pairs. Limit evaluation, tangent data and controlled approximation bounds produce and correct local intersection arcs, then patch adjacency joins them. Bounds must enclose the limit, not merely the current mesh. Flat polygon intersections are approximations and can miss tiny components or tangencies unless the associated geometric and transversality conditions are verified.
For disjoint compact bodies, the minimum occurs on their boundaries. Patch bounding volumes give certified lower bounds and evaluated limit-point pairs give upper bounds. A branch and bound search refines promising patch pairs until the global bounds differ by the tolerance. Boundary distance alone cannot detect containment; touching, crossing or nested solid bodies have ordinary set distance zero. Negative overlap values require an additional convention such as translational penetration depth.
Suppose in a search problem, with at dead ends. Every finite bounds some reachable solution cost from above, so their running minimum is at least the global optimum . Every node of an optimal path has , and therefore survives the displayed strict pruning rule. Ordinary A-star search can continue to a selected goal without receiving a path witnessing .
Equality pruning is unsafe without a stored incumbent solution: when , it could delete every optimal continuation. A numerical upper bound does not by itself provide a plan to return. This distinguishes an upper-bound certificate from a constructed solution in branch and bound.
Parallel-machine makespan with sequence-dependent setups Created 2026-10-14 Updated 2026-10-25
Partition jobs between machines and choose an ordering on each machine. Machine has load equal to its processing times, initial setup and internal changeovers; the completion time of all jobs is the maximum of these loads. Minimize a variable subject to for every machine. Branch and bound can combine machine-assignment decisions with route bounds; heuristic moves relocate jobs between machines, swap jobs, and reorder blocks. Minimizing the sum of route costs alone does not generally minimize the makespan.
Maintain a certified solution-cost ceiling and prune only search nodes whose lower bound strictly exceeds it. Initially let , or set at the root when that value is finite. Whenever a search node is generated, update
Run ordinary A-star search with and a goal test when removing a search node from the search frontier. Discard a generated search node, or a queued search node encountered after a later bound improvement, if
This is branch and bound using a lower bound and an upper bound . A finite certifies that some goal is reachable from within that remaining-cost ceiling; for a dead end, forces too. Every finite quantity is consequently at least the global optimum .
On an optimal solution path, admissible heuristic estimates ensure . Hence no search node of that path is pruned. The finite-branching factor and positive step-cost hypotheses from (a) still ensure completeness, and the usual A-star search argument makes the first selected goal optimal. A smaller bound can remove branches earlier; it need not improve every instance.
The strict inequality matters: is only a numerical bound and need not provide an actual stored solution path. If , pruning at could remove every optimal continuation. Nor may the algorithm return a path merely because its lower bound meets when no witnessing path has been constructed. With an actual incumbent solution, the familiar equality-pruning variant can instead retain and return that incumbent.
An efficient parametric curve interrogation interface should provide the parameter domain and open/closed status, point evaluation, one-sided endpoint enquiries, first and second derivatives wherever defined, and information about knots or singular parameters. It should also restrict a curve to an interval and subdivide it without changing its limit, return a certified bounding volume for that restriction, and supply derivative or chord error bounds when supported. These enquiries allow cheap geometric rejection before expensive exact evaluation. For a subdivision curve, limit evaluation is distinct from returning a vertex of a finite refined control polygon; the latter is usually an approximation.
For a query point , minimize . At a differentiable interior minimizer,
At a regular curve point this says that the query displacement is perpendicular to the tangent vector. If a second derivative exists, the local second-order test is
a strictly positive value is sufficient for a strict local minimum. The stationarity equation alone also includes local maxima and is automatic at , so it cannot be used as the only global search criterion.
A reliable efficient closest-point search on a subdivision curve uses branch and bound. Cover the compact curve by restricted pieces with certified enclosures . For each piece set , a lower bound on its true distance. Distances to actually evaluated limit points give upper bounds; keep the best point and distance . For an axis-aligned bounding box , the squared lower bound is inexpensive:
For positive partition-of-unity refinement, a convex hull of the active control points is an enclosure. A negative-weight scheme requires a separate certified enclosure; its control hull need not contain the limit.
The algorithm is:
  • Initialize the pieces at representation breaks and evaluate endpoints and one or more interior limit points. Place pieces in a priority queue ordered by their .
  • Discard any piece with , since it cannot improve the best known point. If only one nearest point is required, equality may also be discarded; keep equality candidates when all ties matter.
  • Remove the smallest-bound piece. Evaluate new limit points to reduce , subdivide the piece, compute tighter child enclosures, and insert children that can still improve .
  • Use the best chord projection or current candidate to seed a safeguarded Newton root-finding iteration for . Its derivative is . Keep iterates inside the restricted interval, fall back to bisection method on an isolated sign-changing bracket, and accept an improvement only after evaluating its actual curve distance. This is an accelerator; rejection still depends on certified geometric bounds.
  • Terminate when , also regarding the best evaluated point as a retained candidate. If no pieces remain, the evaluated candidate is already optimal relative to the exhausted bounds. Return and with the global distance guarantee.
Because , the reported point is at most farther from than a true nearest point. Include endpoints, nondifferentiable joins, and singular parameters in the candidate bookkeeping, or split them into separate pieces. With enclosures converging in diameter under subdivision on a compact continuous curve, the bounds converge to arbitrary prescribed positive distance tolerance. Interval bounds or outward-rounded arithmetic are needed if the guarantee is intended to be certified in floating-point computation. A single Newton root-finding iteration from a single seed supplies no such global guarantee.
Write for the partial assignment problem solution sending person to job . The prescribed assignment lower bound from independent task minima is
Every completion must pay at least the minimum in each remaining column, so this is a valid lower bound, even if the minima use the same person several times. At , the one remaining job must go to person 4, and the bound is the exact completed cost.
Use branch and bound with the smallest open bound expanded first. The initial bounds are
For example, . Expand , giving
Expand . Its children are with bound 64 and with bound 65. Completing the first gives at cost 64, our first incumbent. The second cannot improve it. We may also discard , , and , since their lower bounds are at least 64; equality may be pruned when seeking one optimum.
The remaining open prefix is , whose children have bounds
Only can improve the incumbent. Its children and have exact completed costs 69 and 61, respectively. The latter completes to and replaces the incumbent. Every other branch has already been bounded above this value. Thus the optimal assignment is
This branch and bound computation produces fourteen partial nodes: four initial nodes, three below , two below , three below and two below . The last person is assigned automatically at a depth-three node.
For the travelling salesman problem, let mean that the tour goes directly from city to city . Retain only the constraints
This is an assignment problem between cities as departure points and cities as arrival points, solvable by the Hungarian algorithm. Its optimum is a cycle cover of a directed graph, possibly with several disjoint cycles. Since every tour is such a cover, its cost is a lower bound on the best tour cost. This is the assignment relaxation of the travelling salesman problem.
If the minimizing cover is a single Hamiltonian cycle, it supplies a tour and can update the incumbent. Otherwise choose one proper subtour . No tour can contain all edges of , since that would close a cycle before visiting the remaining cities. Make one child subproblem for each edge of , forbidding that edge, and solve its modified assignment problem. These branches may overlap but together retain every possible tour. Prune a child if it is infeasible or its assignment bound is at least the incumbent cost. Further subtours cause further branching. Each branch adds a new forbidden edge, so the search is finite, and the covering property plus the valid lower bounds proves optimality when no open branch remains. This enforces the effect of subtour elimination constraints through branch and bound.
Drop the subtour elimination constraints, retaining the one-incoming/one-outgoing equations and any branch decisions. This is an assignment problem, solvable in polynomial time. Its optimum is a lower bound on the best schedule in that branch because every admissible schedule satisfies the relaxed constraints. Add the constant processing-time sum to compare completion-time bounds.
Keep a feasible schedule as an incumbent upper bound. At each branch and bound node, solve the restricted assignment problem. If it is infeasible or its bound is at least the incumbent, discard the node. If its optimum is a single tour, it is a feasible schedule attaining the bound, so update the incumbent and close the node. If it has a proper subtour with arcs , every valid Hamiltonian tour must omit at least one of those arcs.
For a disjoint exhaustive branching rule, child forces and forbids , for . Every valid tour falls into the child indexed by the first omitted arc. Re-solve the corresponding assignment relaxations, prioritize small bounds, and repeat. Finitely many binary choices give an exact terminating search; its worst-case tree can be exponential. Assignment optima provide lower bounds, while complete tours provide upper bounds. Patching subtours or local improvement can improve the incumbent without changing the exact pruning argument.
The total processing time is constant for a single machine, so only the initial setup and changeover sum depends on the order. Use the dummy-job reduction for sequence-dependent setup times. Add vertex , and set
Let the binary variable indicate that follows in the augmented tour. A Hamiltonian cycle through specifies exactly one schedule, read starting after . An exact integer programming formulation is
The degree equations alone describe a cycle cover of a directed graph, possibly several separate graph cycles. The subtour elimination constraints exclude every proper directed graph cycle; the cover is therefore a single tour through all jobs. Conversely every schedule supplies a feasible tour with exactly its completion time as objective. Exponentially many written inequalities are permitted in this exact formulation; an implementation may add them only when violated.
For three parallel machines, the relevant objective is the parallel-machine makespan with sequence-dependent setups, not simply total setup cost. Partition jobs into three ordered lists . For a nonempty list define
an empty machine has . Minimize subject to for each machine and each job assigned once. This can be written as a mixed-integer extension with assignment variables, one dummy tour per machine and conditional subtour cuts.
A practical strategy starts with a balanced assignment, sequences each machine using the single-machine methods, and improves by relocating or swapping jobs between machines together with within-machine 2-opt moves. Score each move by its change in . Branch and bound can combine machine-assignment decisions with within-machine assignment bounds. For nonnegative times, the total processing time divided by three and the largest individual processing time are valid lower bounds, supplemented by setup-dependent route bounds. Balancing processing and changeovers jointly is essential; independently minimizing the three tour costs does not by itself minimize completion time.
Interpret the positive-distance assumption as disjoint compact enclosed bodies , certified for example by disjoint enclosing volumes. Merely having disjoint drawn control meshes is insufficient if one encloses the other or the meshes do not enclose their limit surfaces. For genuinely disjoint bodies, the closest pair lies on their boundaries: an interior point could move toward the other body and decrease the distance. Thus minimize over all pairs of limit-surface patches.
Use branch and bound on patch pairs. For regions , enclosing bounding volumes give a lower bound on their true minimum distance. For axis-aligned bounding boxes, compute this directly as
Any pair of evaluated limit points provides a feasible upper bound; retain the smallest, . Start with a covering list of all coarse patch pairs. At each step, discard a pair when its lower bound is at least , otherwise refine the region with larger bounding diameter/error and enqueue its child pairs. Prefer the pair with smallest lower bound. Update with new feasible pairs; a local stationary-distance solve can improve it but cannot replace the global search.
Let be the minimum remaining lower bound, capped by if the list is empty. The current certificate is
Stop when . Compactness and shrinking valid patch enclosures ensure convergence to this tolerance under the interface assumptions. An equivalent mesh method must add each mesh's certified limit error; for Hausdorff distance errors , the separation error is at most . Finite mesh distance without such a bound is not the exact minimum distance between subdivision bodies.
A branch and bound algorithm partitions the feasible set into subproblems and attaches a valid lower bound to each subproblem's possible objective value. A completed feasible solution supplies an incumbent upper bound. For minimization, discard a node if it is infeasible or its lower bound is at least the incumbent; otherwise branch by fixing an additional decision. The best-bound search rule expands the active node with the smallest lower bound. Once every active bound is at least the incumbent, the incumbent is optimal.
For this assignment problem, use the assignment lower bound from independent task minima. For a partial assignment , with unassigned machines and unassigned tasks , it is
This may reuse the same machine in several minima. Relaxing the distinct-machine constraint only reduces the cost, so the resulting lower bound is valid.
The given tree has already expanded the node of bound , then its child of bound . That child completes to at cost , or at cost . Thus we have an incumbent . The best remaining active node is , with lower bound . Its three branches have bounds
The first and third children cannot improve the incumbent. Expand , the sole active bound below . Its last two possible completions are
Update the incumbent to . The unexpanded nodes have bounds , all at least ; the other completed leaves are also more expensive. The branch and bound search therefore terminates, with
The additional expansion order after the supplied tree is , then . The feasible assignment of cost and the bounds excluding every remaining branch together certify global optimality.
Figure 1.
Completed best-bound assignment search, with the optimal branch highlighted
. Details.
For NP-completeness, use the decision version with an objective threshold. A permutation is a polynomial-size certificate, and its quadratic assignment problem cost is computable in arithmetic operations. To reduce the travelling salesman problem, let be the adjacency matrix of a directed cycle on the facility labels: , with indices cyclic, and every other entry zero. Let be the matrix of city-to-city distances. Then
which is exactly the tour length. Every tour arises from such a permutation. Hence the decision QAP is NP-complete, and finding its optimal value is NP-hard. No factor of two appears in this directed-cycle construction, even when the distance matrix is symmetric.
Fix any complete assignment . Its restriction to the facilities other than is an admissible bijection in the definition of , so
Summing this inequality over gives . Restricting to and minimizing proves
This is the Gilmore-Lawler bound. Its row minima may come from mutually incompatible assignments, so equality is not automatic. To find , fix facility one at location , delete that row and column from , and solve the residual assignment problem using the Hungarian algorithm, adding to its value.
For the supplied instance, the two residual assignment sums at each initial branch are
Use branch and bound to explore , the branch with smallest bound. Its minimizing linear assignment is . Evaluating the true ordered-pair objective gives
This supplies an incumbent of value and meets the lower bound of . Alternatively, after branching on facility two, the other leaf has row-sum bound and is pruned. The initial bounds and prune and as well, since neither can improve the incumbent. Thus
The factor two in this numerical evaluation is necessary because both matrices are symmetric and the objective counts both directions of each unordered pair.
Use the usual finite binary encoding of integer or rational input data. NP consists of decision problems whose yes-instances have polynomial-length certificates in computational complexity verifiable in polynomial time. A decision problem is NP-hard if every problem in NP has a polynomial-time many-one reduction to it. It is NP-complete if it is both NP-hard and in NP. An optimization problem is NP-hard when computing its optimum would solve every NP decision problem through a polynomial-time reduction and an optimum-value query; membership in NP applies directly to decision problems, not to an unqualified optimization task.
Reduce subset sum to the 0-1 knapsack problem by setting and . Every feasible value is at most , and the optimum equals exactly when the subset sum answer is yes. The transformation and final comparison take polynomial time. Since subset sum is assumed NP-complete, exact knapsack optimization is NP-hard.
For the half-approximation algorithm for knapsack, use nonnegative weights and profits. Delete overweight items and nonpositive-profit items; take all positive-profit zero-weight items for free. On the remaining positive-weight items, sort decreasing . Take the maximal initial prefix fitting the capacity, and stop at the first item that would overflow. Let be the prefix profit, and let be the largest profit of any individually feasible remaining item. Return the better of the prefix and that singleton, together with the free items. If every item fits, take them all.
The fractional knapsack problem fills exactly that prefix and a fraction of the first excluded item. Its optimum bounds the integer optimum, and without the free items its value is at most . Thus
With total free profit , the same inequality is . This gives an approximation ratio of in sorting time, with polynomial bit complexity for rational data. Nonnegative weights and capacity are the standard knapsack problem assumptions; unrestricted negative weights would not support this argument.
For the quadratic knapsack problem and its fractional row bound for quadratic knapsack, multiply the capacity inequality by the binary and use :
Remove items with first. If , the remaining coordinates are feasible in the fractional problem defining , so . If , that row's contribution is zero. Hence, with ,
The double sum counts each symmetric interaction twice; there is no factor in this problem. Each is a fractional knapsack problem, computable by sorting positive ratios, also handling zero weights separately. This takes polynomial time even when some interactions are negative, because an optional fractional item with negative profit is omitted.
The resulting 0-1 knapsack problem need not be solved exactly. Relax its capacity constraint with a Lagrange multiplier . Its Lagrangian knapsack bound is
For feasible , adding only increases its objective, and maximizing over independent binary choices produces the displayed expression. It is a convex piecewise-linear function with breakpoints at positive . Evaluate those breakpoints and zero, or use the fractional knapsack problem ordering; the best bound is computable in polynomial time. Thus computing all and one additional Lagrangian relaxation gives the requested upper bound.
For the numerical example, the problem has capacity and item ratios and . Select and . This gives
An exchange argument justifies optimality: capacity used on the lower-ratio item can be transferred to the higher-ratio item until the latter is full. The stated and similarly follow from residual capacities and . Therefore , with ratios . The fractional solution takes items and one-third of item , yielding . At the Lagrangian knapsack bound gives the same value:
The fractional solution attaining proves that this is the best bound from this auxiliary Lagrangian relaxation, though it need not be the exact quadratic optimum.
For branch and bound, branch on whether an unresolved is zero or one. If the selected set is , subtract its weight from the residual capacity and retain its exact objective as a constant. For each remaining item replace by , preserving the original interactions between remaining items. Recompute the fractional row bounds and the Lagrangian knapsack bound for that residual problem. Maintain an incumbent from genuine feasible binary solutions evaluated with the quadratic objective; prune infeasible nodes and nodes whose bound is no better than the incumbent. For example, selecting items gives the feasible value . A finite binary branching tree eventually certifies the optimum, but worst-case running time is exponential, as expected for an NP-hard problem.
Search pruning 2026-10-20
Discarding a branch of a search tree after proving that no completion can satisfy the constraints or improve the current best solution. For minimization, a lower bound on every completion justifies pruning when it is at least the best value already found; this is the principle behind branch and bound.
Binary arc variables with one outgoing and one incoming arc at each vertex describe a cycle cover of a directed graph. For every nonempty proper vertex subset , the displayed inequality forbids a directed cycle confined to . Together these inequalities make the cycle cover one Hamiltonian cycle. They can be generated as violated cuts or used in branch and bound, rather than all being stored initially.
For overlapping solid bodies, the penetration depth is the smallest translation needed to remove interior overlap, with orientation fixed. It is distance from the origin to the complement of the translational collision region. Define signed separation as positive ordinary separation for disjoint bodies, zero for contact, and for interior overlap. Translation-space branch and bound can bracket it using certified intersection/containment queries. This convention handles crossing and complete containment; merely negating unsigned boundary distance does not.