|
Automatic programming has always been a goal of computer science , and algorithms [ 1 ] is the soul of the program , is the key to solve the problem , it is the basis of program design and difficult to achieve the automation of program design should first algorithm design automation . Algorithm design is a creative work , to achieve the goal of automatic programming is there are still a lot of difficulties . Long-term algorithm and program design practice concluded out some of the commonly used and effective algorithm design methods : greedy method , divided and rule of law , the dynamic programming method , backtracking method and branching delimitation method , a lot of problems are you can use them to solve . Therefore , we expect in -depth study of these algorithms design method to extract the common law of each method in solving problems , the idea of using the generic programming , design patterns constructed above five types of commonly used methods of algorithm design algorithm . Algorithm design patterns when facing a specific problem solving , simply based on the characteristics and nature of the problem , for instance , can generate problems solver , not only can reduce the difficulty of program development and promotion of algorithm design automation explore an effective way . Therefore , this paper include: 1 , the greedy method , divide and conquer method , dynamic programming , backtracking , branch and bound method , in-depth study , abstract and the five algorithms design methods respectively , to form the corresponding algorithm design patterns , which is the focus of this study . 2, to five of this abstract algorithm design patterns for the basis to construct the corresponding algorithm design template . 3, for example, a number of typical problems illustrate the use of the resulting algorithm design template . Practice has proved that the five algorithms design template developed in this paper has better reusability and use them to develop applications , and can effectively reduce the difficulty of program development , improve the efficiency of program development . The same time as they pass through many instances testing to ensure its reliability, thereby improving the reliability of the applications developed based upon them .
|