Five commonly used algorithms: Divide and conquer, dynamic programming, greed, backtracking, branch and gauge

Source: Internet
Author: User

Divide and conquer : Divide A complex problem into two or more identical or similar sub-problems, then divide the problem into smaller sub-problems ... Until the last sub-problem can be solved simply, the solution of the original problem is the merger of the solution of the sub-problem

http://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741370.html#3024443

--------------------------------------------------------------------------------------------------------------

Dynamic Planning : Each decision relies on the current state and then shifts the state. A decision sequence is generated in the state of change, so the process of solving the problem by this multistage optimization decision is called dynamic programming .

Http://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741374.html

Edit Distance algorithm
Http://www.cnblogs.com/biyeymyhjob/archive/2012/09/28/2707343.html
Http://www.cnblogs.com/sking7/archive/2011/10/16/2214044.html

--------------------------------------------------------------------------------------------------------------- --

greedy :when solving a problem, always make anow it seems to be the best choice.. in other words, not considering the overall optimality, what he does is only in a sense Local Optimal solution. Common greedy algorithms are: prim algorithm, Kruskal algorithm (all are to find the smallest spanning tree)

Basic idea: The problem is decomposed into several small problems, the local optimal solution of each sub-problem is gradually obtained, and finally the solution of the original problem is merged.

Http://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741375.html

--------------------------------------------------------------------------------------------------------------

Backtracking : The backtracking algorithm is actually a kind of enumeration-like search attempt process, mainly in search attempts to find the solution of the problem, when the discovery has not satisfied the solution condition, the "backtracking" return, try another path. depth First ;

     The backtracking method is an optimal search method, which is searched forward according to the selection criteria to achieve the goal. However, when exploring a step, found that the original choice is not good or not reach the goal, then return to the one-step re-selection, the can not go back to go backward technology for backtracking , and meet the backtracking condition of a state of a point called "backtracking point."

--------------------------------------------------------------------------------------------------

Branch Gauge:similar to the backtracking method, it is also an algorithm for searching problem solution on the solution space tree T of the problem. However, under normal circumstances, the branch-bound method and the backtracking method are different in solving the target. The goal of the backtracking method is to find out all the solutions that satisfy the constraints in T , whileBranch and gauge methodThe goal of the solution is to finda solution satisfying the constraint condition, or finding the value of a target function in a solution that satisfies the constraint conditionMaximum or minimum solution, that is, in a senseOptimal Solution.

Http://www.cnblogs.com/steven_oyj/archive/2010/05/22/1741378.html

Five commonly used algorithms: Divide and conquer, dynamic programming, greed, backtracking, branch and gauge

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.