The 2nd theme: Linear algorithms cycles. Approximate calculation of the integral in their efficiency. Matrix multiplication. Calculation of determinants
The 2nd theme: Linear algorithms. Cycles. Approximate calculation of the integrals in their efficiency. Multiplication of matrices. Calculations of determinants
PhD, dotsent Sabirov Karimjon Kabildjanovich
Introduction
The efficiency of software methods for solving applied problems is especially clearly manifested in cases when we are faced with multiple executions of the same type of operations. Anyone who has mastered program methods for solving a problem will everywhere strive to be added, namely a program method for solving a problem. To do this, it is necessary to master the skills of designing algorithms, their representation in algorithmic programming languages and the process of debugging programs on a computer. The structure and subject matter of this course is formed on the basis of this goal.
The main structures of algorithms
There are three main structures of algorithms:
Linear.
Branching (alternative "if-then-else" or "if-then").
Cyclic (repetition).
Linear algorithms
The linear algorithm is the main one. It means that the actions are performed one after the other.
The rectangle shown in the figure can represent either a single command or a set of operators necessary to perform complex data processing, where F1 and F2 are some commands for the corresponding executor. Commands are written using the assignment operator.
Assigning a value to a variable or assigning a value to another variable is the most common action in a program written in any programming language. In a programming language, assignment is an operation and is denoted as ":=". This means that when this operation is performed, not only is a value assigned to a certain variable, but a certain value is also returned.
The cyclic algorithm
The cyclic algorithm (or repetition) involves the repeated execution of a certain set of actions.
Cycles allow you to record long sequences of data processing operations with a small number of repetitive commands.
An iterative cycle is called, the number of repetitions of which is not set, but is determined during the execution of the cycle. In this case, one iteration of the cycle is called an iteration.
As can be seen from the statement, the process of calculating this sum has no complexity, but is associated with repeated repetition of operations of the same type.
Recall one more statement: the sum of any convergent functional series represents some function.