Branch Boundary method

Source: Internet
Author: User

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

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.