Method step by step detail
The structural approach to building algorithms
Modular algorithm
When creating complex algorithms the method step by step detail. At each stage of assembly algorithm formed its separate parts, which are topical at the moment, and the rest is replaced, such as text option description. In the next steps is the same method is applied to the next group of fragments of the algorithm. This approach leads to the gradual specification of the algorithm, as an executable specification and information of its structure.
That is, using the method of incremental detail big task will be broken down into smaller units, they, in turn, to even smaller units, etc. Each block algorithm should be as independent and logically complete. Breakdown of units must be determined by the internal logic of the problem.
Efforts to improve the quality of algorithms, programmers have found their performance in implementing the structural method of constructing algorithms. The basis of the structural approach of building algorithms is claim that the algorithm of any complexity can be displayed using the three basic structures: the passage, branching and loop. Basic structure can connect to each other or to perform their investments into each other. Another advantage of the structural approach is its modularity. The program, based on a structural basis of the algorithm can be presented as separate modules. Module - a sequence of logically related operations, executed as a separate part of the program.
The structural approach to building algorithms - a way to create an algorithm with extensive use of auxiliary algorithms.
In the complex and cumbersome tasks of this approach allows the algorithm to split into separate parts - modules, each of which solves its independent subtasks. This allows you to focus on solving each subtasks, implemented as a separate routine. For each such module determined the methods of implementation of the algorithm and data structure in which it operates. The final step in the modular construction of algorithms is an association of individual modules together. For this purpose between the modules must be installed connections for transferring information from one module to the other: the results of some modules are input to others.
The main purpose of the structural approach to building algorithms is to develop an algorithm with minimal relationships between the modules.
If placed in front of you is a serious problem of great challenge, the importance of partitioning the algorithm into separate modules can not be underestimated. Especially effective this technique in the development of complex algorithmic systems teams of programmers. In this case, any developer is given its own integral part of the algorithm, which sold it as a separate module. The culmination of the collective work is the construction of these modules together.
No comments:
Post a Comment