Theme 3. Mathematical modeling. Computer Mathematics Systems
2. Algorithms. Block diagrams
The program should be created in a certain sequence:
- Statement of the task: the full content of the problem, the purpose of its solution.
- Mathematical model of problem solving: description of the problem in mathematical concepts (formulas, equations), determination of initial data; forms of output of the obtained results (tables, graphs, diagrams, etc.); the accuracy of the solution of the problem.
- The choice of the method of solution of the problem: on the accuracy, speed, and volume of the calculation; requirements for PC capabilities; availability of already developed methods, etc.
- Development of the algorithm for solving the problem: establishing a logical sequence of operations (actions), recording and analysis of the algorithm.
- Writing an application in a language: transferring an algorithm to a programming language.
- Debugging the program: finding syntax (incorrect record of constructs) and logical errors (violations of the sequence of actions, formulas, output data). Tests are used to identify logical errors - specially selected initial data together with known results.
- Computational experiment: calculations and their analysis. If necessary, adjustments to the previous stages are carried out.
Algorithm - an exact and understandable sequence of actions (steps) that lead to the solution of the problem.
The term "algorithm" comes from the name of the mathematics of the Middle Ages of al-Khorezm, who were offered methods for performing arithmetic calculations with multivalued numbers.
Block diagram of the algorithm for solving a problem
There are various forms of writing the algorithm: graphical circuits (flowcharts), RI-schematics, verbal description.
Writing an algorithm in the form of flowcharts is a labor-intensive process, but it is obvious.
GOST 19.001-77 ... 19.106-78 provides for the basic rules for the execution of schemes of algorithms and programs, terms and definitions, types of program documents.
The basic requirements for the compilation of the flowchart algorithm:
- the ratio of width to the height of the graphics block 3: 2, the graphics blocks need to be sized in multiple 5 units (10, 15, 20, 25, ...).
- Records can be used both in the middle of the graphics side and externally with the help of horizontal lines and square brackets.
- Each block has one entry point.
There are three basic algorithmic designs:
- linear - consists of consecutive actions;
- branched (condition) - the sequence of execution depends on certain conditions;
- cyclic - one and this sequence is executed two or more times.
Font Face
Font Size
Text Colour
Background Colour
Font Kerning
Image Visibility
Letter Spacing
Line Height
Link Highlight