Apply:
Requires that all solutions or optimal solutions consisting of n elements be obtained under a certain constraint condition (the solution is a set)
Note is: It is similar to the backtracking method to solve the problem, the key is not that the problem solved by this algorithm, the sequence of elements in the solution set is influential ;
Steps:
1, the solution set of all the optional elements, organized into a tree or graphic structure
2, due to the sequence of the elements of the solution set. Therefore, if the first element is selected, the order is already incorrect, then there is no need to continue to deep traversal. Based on this,
The width-first traversal should be chosen here
3, if the smooth traversal to the last element, then that is a solution
Special NOTE: This algorithm is similar to the backtracking method, because one is related to the order of elements; So, when the traversal solution is set, a selection depth first traversal, and a selection width first traversal.
Example: http://blog.csdn.net/jarvischu/article/details/5974895
Branch Boundary method