The Research and Application of Several Algorithm Design Patterns
- Author
- ChenYanQiong
- Advisor
- YangQingHong
- School
- Jiangxi Normal University
- Major
- Computer Software and Theory
- Classification
- TP311.51 Program Design Automation
- Degree
- Master's thesis
- Year
- 2008
- Downloads
- 99
- Citations
- 2
Abstract
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 .
Table of contents
Abstract 3-4
ABSTRACT 4-7
1 Introduction 7-18
1.1 Introduction 7-8
1.2 Algorithms 8-9
1.2.1 algorithm thinking
1.2.2 algorithm description 8
1.2.3 algorithm complexity 8-9
1.3 design patterns Overview 9-13
1.3.1 design mode of thinking 9-10
1.3.2 design pattern principle
1.3.3 Design Patterns basic ingredients 10-11
1.3.4 Design Patterns Research
1.3.5 design patterns typical example 11-13
the
the 1.4 generic program design ideas 13-14
1.5 design patterns generalization 14-15
1.6 C in the template mechanism 15-16
1.6.1 class template 15-16
1.6.2 function template 16
1.7 This article chapter organization 16-18
the
algorithm design mode and achieve 18-40
2.1 Overview 18
the the
the 2.2 algorithm design mode achieve environmental and implementation tools 18-19
2.2.1 Environment Profile 18
2.2.2 template mechanism (template) 18-19
2.3 greedy method design pattern 19-23
2.3.1 greedy method outlined 19
2.3.2 abstract greedy method design pattern thinking 19-20
2.3.3 greedy method design pattern defined 20-23
2.4 divide and conquer method design pattern 23-27
2.4.1 divide and conquer method Overview 23
2.4.2 abstract sub-conquer method design mode of thinking 23-24
2.4.3 divide and conquer method design pattern defines 24-27
2.5 dynamic programming design patterns 27-31
2.5.1 Dynamic Programming Overview 27-29
2.5.2 abstract dynamic programming method design pattern thinking 29
2.5.3 dynamic programming design patterns defined 29-31
2.6 Backtracking design patterns 31-35
2.6.1 backtracking design method outlined 31
the
design patterns 2.6.2 Backtracking thinking 31-32
2.6.3 Backtracking design patterns defined 32-35
2.7 branch and bound method design pattern 35-39
2.7.1 branch and bound method design methods outlined 35
the
mode of thinking of the 2.7.2 branch and bound method designed 35-36
2.7.3 branch and bound method design pattern defined 36-39
2.8 Summary 39-40
3 algorithm design mode use 40-43
3.1 the algorithm design model developed in this paper the problem solving steps 40
3.2 greedy method design pattern further illustrate 40-41
3.3 divide and conquer method design pattern further instructions 41
3.4 dynamic programming design patterns to further illustrate 41-42
3.5 Backtracking design patterns to further illustrate 42
3.6 branch and bound method design pattern further illustrate 42-43
the
algorithm design mode application examples 43-64
4.1 greedy method design pattern instances 43-46
4.1.1 knapsack problem 43-44
4.1.2 find coins 44-46
4.2 divide and conquer method design pattern instances 46-51
4.2.1 Select 46-48
4.2.2 merge sort 48-51
4.3 dynamic programming method design pattern instances 51-54
4.3.1 optimal matrix multiplicative order the 51-52
4.3.2 shortest path 52-54
4.4 backtracking design pattern instances 54-58
4.4.1 n-queens problem 54-56
4.4.2 subset problems 56-58
4.5 branch and bound method design pattern instances 58-63
4.5.1 n-queens problem 58-60
4.5.2 Traveling Salesman Problem 60-63
4.6 Summary 63-64
Conclusion 64-66
This work summarizes 64-
further work outlook 64-66
the
References 66-68
Postscript 68-69
During his studies published papers and publications 69
Related dissertations
- The Research on Algorithm for Composite Forest Fire Detection, Recognition and Early Warning
- System Design of Automatic Steel Pipes Group Machine and Research on Algorithm
- The Desigriment and Implementation of Personal Commodity Recommendation System
- Research of Electronic Image Stabilization Algorithm
- Research and Implementation of Target Correlation Tracking Algorithm Based on FPGA
- Research and Implementation of Mean Shift Object Tracking Algorithm Based on DSP
- Study on K-means Clustering Algorithm Based on Summarized Information of RTVU Students
- Association Rule Learning Algorithm Based on Extension
- The Paradigm of Architecture and Optimization of Integrating for Data Mining Algorithms and Multi Agent Systems with Business Intelligence
- Clustering Algorithm and Application Based on Combinatorial Optimization
- The Design of Warehouse Management System Based on the Web Services and the Research of Its Zero Storage Technology
- China Mobile’s CRM System Design and Implementation
- Study on Logistics Modeling and Optimization Technology of Dyeing Production
- Research and Implementation of STL Runtime Concept
- SMS Encryption Research and Application Based on ANDROID
- Rsearch on Distributing Enterprise Cutting Stock and Scheduling Coordination Models
- Optimization of Production Planning and Emission-Reduction Policy-Making
- Research on Service Continuity for Stateful Services
- Research on Techniques of Bandwidth Controlling of Virtual Machine in Data Center
- Design of Strapdown Inertial Navigation System Based on FPGA