ArticleslgStudy

computer science

Branch and cut

Branch and cut is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Branch and cut rather than just read about it. In short: Branch and cut is a method of combinatorial optimization for solving integer linear programs (ILPs), that is, linear programming (LP) problems where some or all the unknowns are restricted to integer values. Branch and cut involves running a branch and bound algorithm and using cutting planes to tighten the linear programming relaxations.

Key takeaways

  • Branch and cut belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Branch and cut to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Branch and cut from memory before moving on to harder problems.

Reference excerpt

Branch and cut is a method of combinatorial optimization for solving integer linear programs (ILPs), that is, linear programming (LP) problems where some or all the unknowns are restricted to integer values. Branch and cut involves running a branch and bound algorithm and using cutting planes to tighten the linear programming relaxations. Note that if cuts are only used to tighten the initial LP relaxation, the algorithm is called cut and branch.

Algorithm This description assumes the ILP is a maximization problem. The method solves the linear program without the integer constraint using the regular simplex algorithm. When an optimal solution is obtained, and this solution has a non-integer value for a variable that is supposed to be integer, a cutting plane algorithm may be used to find further linear constraints which are satisfied by all feasible integer points but violated by the current fractional solution. These inequalities may be added to the linear program, such that resolving it will yield a different solution which is hopefully "less fractional". At this point, the branch and bound part of the algorithm is started. The problem is split into multiple (usually two) versions. The new linear programs are then solved using the simplex method and the process repeats. During the branch and bound process, non-integral solutions to LP relaxations serve as upper bounds and integral solutions serve as lower bounds. A node can be pruned if an upper bound is lower than an existing lower bound. Further, when solving the LP relaxations, additional cutting planes may be generated, which may be either global cuts, i.e., valid for all feasible integer solutions, or local cuts, meaning that they are satisfied by all solutions fulfilling the side constraints from the currently considered branch and bound subtree. The algorithm is summarized below.

Add the initial ILP to L, the list of active problems Set x∗=null and v∗=−∞ while L is not empty Select and remove (de-queue) a problem from L Solve the LP relaxation of the problem. If the solution is infeasible, go back to 3 (while). Otherwise denote the solution by x with objective value v. If v≤v∗, go back to 3. If x is integer, set v∗←v,x∗←x and go back to 3. If desired, search for cutting planes that are violated by x. If any are found, add them to the LP relaxation and return to 3.2. Branch to partition the problem into new problems with restricted feasible regions. Add these problem to L and go back to 3 return x∗

Pseudocode In C++-like pseudocode, this could be written:

In the above pseudocode, the functions LP_relax, LP_solve and branch_partition called as subroutines must be provided as applicable to the problem. For example, LP_solve could call the simplex algorithm. Branching strategies for branch_partition are discussed below.

Branching strategies An important step in the branch and cut algorithm is the branching step. At this step, there are a variety of branching heuristics that can be used. The branching strategies described below all involve what is called branching on a variable. Branching on a variable involves choosing a variable, xi, with a fractional value, xi′, in the optimal solution to the current LP relaxation and then adding the constraints xi≤⌊xi′⌋ and xi≥⌈xi′⌉

Most infeasible branching This branching strategy chooses the variable with the fractional part closest to 0.5. Pseudo cost branching The basic idea of this strategy is to keep track for each variable xi the change in the objective function when this variable was previously chosen as the variable to branch on. The strategy then chooses the variable that is predicted to have the most change on the objective function based on past changes when it was chosen as the branching variable. Note that pseudo cost branching is initially uninformative in the search since few variables have been branched on. Strong branching Strong branching involves testing which of the candidate variable gives the best improvement to the objective function before actually branching on them. Full strong branching tests all candidate variables and can be computationally expensive. The computational cost can be reduced by only considering a subset of the candidate variables and not solving each of the corresponding LP relaxations to completion. There are also a large number of variations of these branching strategies, such as using strong branching early on when pseudo cost branching is relatively uninformative and then switching to pseudo cost branching later when there is enough branching history for pseudo cost to be informative.

References

External links Mixed Integer Programming SCIP: framework for branch-cut-and-price and a mixed integer programming solver ABACUS – A Branch-And-CUt System – open source software COIN-OR Cbc – open source software on GitHub

Worked examples

Example 1 — a first encounter with Branch and cut

Start with the simplest possible case. Write down what Branch and cut claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Branch and cut before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Branch and cut ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Branch and cut

In research
Branch and cut appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Branch and cut in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Branch and cut is common in secondary-school and first-year university syllabi. It links to neighbouring topics Combinatorial optimization, Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Branch and cut outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Branch and cut” →

How to study Branch and cut in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Branch and cut means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Branch and cut out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Branch and cut in simple terms?

Branch and cut is a method of combinatorial optimization for solving integer linear programs (ILPs), that is, linear programming (LP) problems where some or all the unknowns are restricted to integer values. Branch and cut involves running a branch and bound algorithm and using cutting planes to ti…

Why does Branch and cut matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Branch and cut?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Branch and cut.

Tags

  • Combinatorial optimization
  • Optimization algorithms and methods

Keep exploring