Branch and Bound: branch-and-gauge algorithm

Source: Internet
Author: User

Http://blog.sciencenet.cn/blog-509534-728984.html

The branch-bound (branch and bound) algorithm is a method of searching for the solution of a problem on the solution space tree of the problem. But unlike the backtracking algorithm, the branch-bound algorithm uses breadth-first or least-cost-first method to search the solution space tree, and in the branch-bound algorithm, each Slipknot point has only one chance to become the expansion node.

Using the branch-bound algorithm to search the solution space tree of the problem, its search strategy is:

1. All child nodes that produce the current extension node;

2. In the resulting child node, discard the nodes that are unlikely to produce a viable solution (or optimal solution);

3. Add the remaining child nodes to the Slipknot point table;

4. Select the next Slipknot point from the Slipknot Point table as the new extension node.

So loop until you find a workable solution to the problem (the optimal solution) or the Slipknot point table is empty.

Select the next Slipknot point from the Slipknot Point table as the new extension node, depending on the selection method, the branch-bound algorithm can usually be divided into two forms:

1. FIFO (first in) branch-bound algorithm: The next Slipknot point is selected as an extension node according to the FIFO principle, that is, the order of extracting the nodes from the Slipknot point table is the same as the order in which the nodes are joined.

2. Minimum or maximum yield branch-bound algorithm: In this case, each node has a cost or benefit. If you are looking for a solution with the least cost, then the next extension node to be selected is the least expensive Slipknot point in the Slipknot Point table, and if you are looking for a solution with the maximum benefit, the next extension node to select is the Slipknot point in the Slipknot Point table that has the greatest benefit.

Also known as branch-bound search method. A kind of method of process system synthesis. The method is to decompose the original problem and produce a set of sub-problems. Branching is the division of a group of solutions into several sets of sub-solutions, and delimitation is the boundary of the objective function that establishes the solution of these subgroups. If the solution of a subgroup is outside these boundaries, the subgroup is discarded (pruned). the branch-bound method is a method for solving the problem of integer programming (or mixed integer programming) in operational research. It is very efficient to seek the optimal solution of integer by this method. The application of this principle to process system synthesis can greatly reduce the number of days that need to be calculated.

The idea of branch-bound method is to determine the upper and lower bounds of the target value first, and to reduce some branches of the search tree while searching, and improve the search efficiency.

In the contest, we sometimes encounter some problems, they can not be solved by building a mathematical model, there is no ready-made algorithm can be applied, or do not traverse all conditions to obtain the correct results. At this point, we have to use the search algorithm to solve the problem.
Search algorithms are divided into two categories according to search, one is depth-first search, and the other is breadth-first search. We know that the deep search programming is simple, the program is easy to understand, the space requirements are also relatively low, but the time complexity of this method often refers to a number of levels, if not optimized, its time efficiency is simply unbearable, and the breadth of the first search, although the time complexity is lower than the former, but its huge space requirements are often prohibitive.
Therefore, the optimization of the program, it becomes the search algorithm programming the most critical link.
In this paper, we are going to discuss a basic method of optimization program in search algorithm-"pruning".

What is pruning
I believe that people who have just started to touch the search algorithm have done a maze-like problem. When we "Walk the Maze", the general backtracking approach is this:
1, this direction has the way to go, I did not pass
2. Go in this direction
3, is a dead end, go back to the last intersection
4. Repeat the first step until you find the exit
This kind of thinking is very well understood, programming is also relatively easy. But when the size of the maze was large, the drawback of backtracking was revealed: The search was too time-consuming and unbearable.
Can we move forward in a certain direction, first to determine whether such a walk will come to a dead end? In this way, the search time can not be reduced?
The answer is: yes.
The concept of pruning, in fact, with the maze to avoid the dead end of the same. If we think of the search process as a traversal of a tree, then pruning as the name implies, is the tree "dead End", can not reach the solution we need to "cut" off, to reduce the time to search.
Search algorithm, most need to use pruning. However, not all branches can be cut off, it is necessary to design a reasonable judgment method to determine the choice of a branch. In the design of the method of judgment, we need to follow certain principles.
The principle of pruning
1. Correctness
As mentioned above, the branches are not cut by the love shears. Pruning also loses its meaning if the branch with the optimal solution is cut off casually. Therefore, the premise of pruning is to ensure that the correct results are not lost.
2. Accuracy
On the basis of guaranteeing correctness, we should analyze the specific problems and adopt appropriate judgment means so that the branches that do not contain the optimal solution are cut as much as possible to achieve the goal of "optimization" of the program. It can be said that the accuracy of pruning is to measure the quality of an optimization algorithm standard.
3, the basic purpose of high-efficiency design optimization program is to reduce the number of searches, so that the program runs less time. However, in order to reduce the number of searches as much as possible, we must also spend time to design a high accuracy optimization algorithm, and when the accuracy of the algorithm increases, the number of judgments will certainly increase, and thus lead to increased costs, which leads to contradictions.
Therefore, it is also very important to find a balance between optimization and efficiency, which makes the time complexity of the program as low as possible. If a pruning judgment effect is very good, but it needs to spend a lot of time to judge, compare, the result of the whole program is not optimized to run with no difference, so it is too much worth the candle.
To sum up, we can boil down the main principles of pruning optimization to six words: correct, accurate and efficient.
The pruning algorithm can be broadly divided into two categories: feasibility pruning and optimal pruning.

For the branch-bound algorithm, the upper bound is the smallest of the objective function values of the feasible solution, which is divided into the initial upper bounds and the dynamic upper bound in the detection process. Branch-bound method in the iterative process of finding the optimal solution, if the lower bound of a node estimate is not less than the upper bound, it is not necessary to continue searching from the Therefore, if a good upper bound can be produced, many unnecessary enumeration calculations can be eliminated.

Implementation of branch-bound algorithm
Before describing the steps of the branch-bound algorithm, the relevant terms that are involved in the algorithm are defined as follows:
p--branch layer;
c*--the current optimal objective function value;
p*--corresponding to the c* of the workpiece sequence;
p1--part of the sequence that corresponds to the current node (the node that now needs to be branched).
The implementation steps of the branch-bound algorithm are as follows:
Step 1 initialization: Setting p = 0, P 1 =á (empty set), c* =∞. Sets the current node to always correspond to P 1. At this point, the current node is the root node.
Step 2 calculates the lower bound of each child node that is obtained from the current node branch and sorts the child nodes by the low bound value from small to large. Make P←p + 1.
Step 3 If the current node is probed, make p←p-1, go to step 6. Otherwise, the node with the minimum lower bound in the active sub-nodes of the current layer (P-level) is Q, then the part at the end of P 1 is added to the workpiece at position p, at which point the current node turns to Q and then to step 4.
Step 4 because the current node is the same level of the lower half of the node, if the lower bound value of the current node is greater than or equal to c*, you do not have to search the current node and its same level of the active node, so that the current node of the previous node (parent node) is probed, p←p-1, remove the last workpiece in P 1, Step 6. Otherwise, go to step 5.
Step 5 If P = N, you get a better order. p* = P 1, c* is the lower bound value of the current node, p←p-1, remove the last workpiece in P 1, go to step 6; Otherwise go to step 2.
Step 6 If p≠0, remove the last workpiece in P 1, go to step 3; Otherwise, the algorithm stops. C* is the optimal target function value, p* is the optimal order

Branch and Bound: branch-and-gauge algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.