What is iteration in a process? The meaning of iteration

What is iteration in a process? Meaning of iteration

17.11.2023

A word, action, mathematical sign or hieroglyph is repeated many times. The step in the program cycle turns and turns. And sometimes even a bet on horse racing is repeated.

All these different things are called in one word"iteration", which comes from the Latin word iteratio, which translates as “I repeat.” This word is used in completely different areas:

  • in mathematics, meaning the repetition of a particular mathematical operation or sign.
  • in hieroglyphics, meaning the doubling of one character or syllable.
  • in programming, where iteration can be either a general set of operations or one step in a loop.
  • in psychology, iteration means pathological repetition of an action in severe illnesses.
  • also iteration can be a winning strategy in game theory.

Iteration in mathematics and programming

Thanks to various jokes and educational images, iteration's sister, recursion, is much more familiar to people. Recursion is the repetition of an object or process within itself, where it causes or repeats itself within itself again and again. Iteration in this sense much easier, because when repeated, it in no way enters into itself and does not refer to its own structure.

In mathematics, iteration is known not only as the simple repetition of a symbol or operation, but also as a technique for solving mathematical problems and equations. There is a whole large list of methods for solving systems of linear algebraic equations, and this entire list is iterative. To put it simply, this the method reduces to resolving the equation, each time finding an approximate result, but closer and closer to the correct one.

In programming, iteration is quite ambiguous. On a large scale, it can mean the entire project management structure. In a sense, this is no longer programming, but management and organization of the work process.

In this case, iteration can be considered as a complete pass through all operations and elements that leads to the release of a product. Each individual case of such an iteration pass in a large project ends compiling– assembly of the final product – testing and return to development.

On a smaller scale of programming, iteration is again the sister of recursion. When it is necessary to repeatedly enter or output any data or repeat the same operation, a loop is used in the body of the program. One step of such a cycle, one execution of given commands, will be an iteration.

Iteration in psychiatry

With severe disorders or damage to the brain, a person may perform some actions pathologically and uncontrollably, for example, moving repeatedly and rhythmically, repeating a word or part of a phrase, or reproducing a gesture or pose. This repetition of actions is called iteration, and in some ways it is close to tic disorders.

A similar obsessive state occurs with various painful conditions: schizophrenia, severe autism or dementia, when recovering from post-traumatic coma, dementia, some forms of clinical depression and many, many other brain diseases.

Iteration in psychiatry is most often tied to itself, it is a repetition of the actions of the patient himself, but sometimes the patient begins to reproduce and repeat the words, gestures and poses of the people around him. This tic disorder is in turn called echopraxia, which is Latin for “repetition of action.” A separate repetition of words is called echolalia - “repetition of words.”

Iteration in linguistics

IN Japanese iteration sounds much more beautiful - odoriji. Odoriji is the repetition of a character or one syllable. Or, on the contrary, avoiding repetition of the same hieroglyph, which is usually labor-intensive to draw. This technique has many meanings and uses; sometimes a word can even completely change its meaning after doubling the hieroglyph.

However, usually in Chinese, Japanese and Thai languages, a similar iteration of the character means simple value amplification, emphasizing meaning, simple creation plural or voicing of a syllable during its pronunciation. Iteration was also found in the hieroglyphic writing of Ancient Egypt, where it was a separate symbol indicating a repetition of the previous hieroglyph.

Iteration in game theory

In a conventional betting system, there are different strategies, leading to the player's profit, and iteration is probably the simplest of these strategies.

Typically, iteration in this case is the repetition of a bet, taking into account the experience of previous bets: doubling the amount if you lose or maintaining the bet amount if you win.


Iteration and recursion in programming.

Iteration in programming

Iteration is an organization of data processing in which actions are repeated many times without causing calls to themselves.

When some action needs to be repeated a large number of times, loops are used in programming. For example, you need to display the text “Hello, World!” 100 times. Instead of repeating the same text output command 100 times, a loop is often created that loops 100 times, and does what is written in the body of the loop 100 times. One step of a loop is called an iteration.

In programming, recursion is a call to a function (procedure) from itself, directly (simple recursion) or through other functions (complex recursion), for example, function A calls function B, and function B calls function A. The number of nested calls to a function or procedure is called recursion depth.

The power of a recursive definition of an object is that such a finite definition can describe indefinitely big number objects. With the help of a recursive program, it is possible to describe an infinite calculation, and without explicit repetition of parts of the program.

There is a special type of recursion called tail recursion. Interpreters and compilers of functional programming languages ​​that support optimization of code (source and/or executable) perform tail recursion in a limited amount of memory using iterations.

Excessive recursion depth should be avoided as it may cause call stack overflow.

Iterative and recursive organization scheme

Computing process

In order to better understand the features of recursive algorithms, it is useful to compare the iterative and recursive organization of the calculation process in a program. Let's consider the features of the iterative and recursive computing process using the example of calculating the value of the factorial of some natural number N.

Iterative scheme for organizing the computational process

The iterative process can be illustrated using the diagram shown in Fig. 55. This process consists of four blocks: initialization, decision making (to continue computing), calculation and modification.

The iterative computing process is based on the While, Repeat-Until, For iterative loop. The most common is the While loop:

While< условие цикла >do< тело цикла >;

Iterative scheme for calculating factorial:

N! = 1 * 2 * 3 * … * N.

A procedure that implements an iterative scheme for calculating the factorial:

Procedure Iter_Fact (n: word; var f: word);

I:=1; f:=1; (initialization)

While i< = n do begin { решение о завершении }

F:= f * i; (calculations)

Inc(i); (modification)

There are two important provisions, known in mathematics and programming, that define the relationship between iteration and recursion.

1. Any iterative loop can be replaced by recursion.

2. Recursion cannot always be replaced by iteration.

Recursive scheme for organizing the computational process

The general diagram of the recursive computational process is presented in Fig. 56

Since a recursive procedure can be accessed both from within itself and from outside, each call to a recursive procedure causes its independent activation. With each activation, copies of all local variables and formal parameters of the recursive procedure are formed, in which the operators of the current activation “leave traces”. Thus, for a recursive procedure, multiple activations can exist simultaneously. To ensure the correct functioning of a recursive procedure, it is necessary to store the return addresses in such an order that the return after completion of each current activation is executed to the point corresponding to the statement immediately following the statement of the recursive call. The set of local variables, formal parameters of the recursive procedure and the return address uniquely characterizes the current activation and forms an activation frame. The activation frame must be saved during the next activation and restored after the current activation is completed.

In the decision block (on continuing calculations), a check is made whether the values ​​of the input parameters are such for which it is possible to calculate the values ​​of the output parameters in accordance with the basic part of the recursive definition. Based on this check, a decision is made to perform intermediate or final calculations. An intermediate computation block can be combined with a procedure call block if the intermediate computations are very simple. In the final calculation block, the procedure variable parameters are explicitly determined for specific values ​​of the input parameters corresponding to the current activation of the procedure.

The recursive computing process is based on a recursive loop, which is implemented through a call to a recursive procedure, and each activation of the recursive procedure is equivalent to one pass of the iterative While loop.

General scheme of a recursive loop:

Procedure Recursive_Loop (...);

If< условие цикла >then

< тело рекурсивного цикла; >

Recursive_Loop (...);

The body of the recursive loop (in the block of intermediate calculations) must necessarily contain operators that change the values ​​of variables on which the condition for completing the recursive loop depends. Recall that the fulfillment of the condition for the completion of the recursive cycle corresponds to the achievement of the basis of the recursive definition. If the values ​​of these variables do not have time to change before the next activation of the recursive procedure, an endless recursive loop occurs.

General diagram of an infinite recursive loop:

Procedure Endless_Recursive_Loop (...);

If< условие цикла >then

Infinite_Recursive_Loop (...);

< тело рекурсивного цикла; >

Repetition, cycle Dictionary of Russian synonyms. iteration noun, number of synonyms: 2 operation (457) ... Synonym dictionary

iteration- — [] iteration Repeated application of a mathematical operation (with changed data) when solving computational problems to gradually approach the desired result (this can be seen in ... ... Technical Translator's Guide

The repeated application of a mathematical operation in a series of similar operations performed to obtain a result. Dictionary of business terms. Akademik.ru. 2001... Dictionary of business terms

- (from Latin iteratio repetition) repeated application of any mathematical operation ... Big Encyclopedic Dictionary

Iteration- (iteration): more than one-time use of a component for various operations... Source: INFORMATION TECHNOLOGY. METHODS AND MEANS OF ENSURING SAFETY. CRITERIA FOR ASSESSING THE SECURITY OF INFORMATION TECHNOLOGIES. PART 1.… … Official terminology

iteration- and, f. iteration f. lat. iterare repeat, renew. mat. The result of using what n. mathematical operation resulting from a series of similar operations. Krysin 1998. Iterated aya, oe. Repeated. Sauer. Lex. SIS 1954: iteration… Historical Dictionary of Gallicisms of the Russian Language

Iteration- repeated application of a mathematical operation (with changed data) when solving computational problems to gradually approach the desired result (this can be seen in the block diagram for calculating the arithmetic mean, see Fig. A.2 to the article... Economic and mathematical dictionary

- (lat. iteratio repetition) mat. the result of using what l. mathematical operation resulting from a series of similar operations. New dictionary of foreign words. by EdwART, 2009. iteration [Dictionary of foreign words of the Russian language

- (from Latin iteratio repetition), repeated application of any mathematical operation. * * * ITERATION ITERATION (from the Latin iteratio repetition), repeated application of any mathematical operation... encyclopedic Dictionary

iteration- iteracija statusas T sritis automatika atitikmenys: engl. iteration vok. Iteration, f rus. iteration, f pranc. itération, f … Automatikos terminų žodynas

Books

  • Agile testing. A Practical Guide for Software Testers and Agile Teams, Crispin Lisa, Gregory Janet. Testing is a key component of agile development. The widespread adoption of agile methods has led to the need to place effective testing techniques in the spotlight, and agile...
  • Normal families of analytic functions. , Montel P.. Normal families... belong to the pen of the famous French mathematician P. Montel and are a monograph on the theory of normal families, the creator of which is P. Montel, and ...

Iteration(lat. iteratio- repetition) - in mathematics, One of a series of repetitions of a mathematical operation, using the result of a previous similar operation. example: Factorial(!) - N! = 1 x 2 x 3 x ... x (N-1) x N, where N is any integer; Each successive multiplication is called an iteration.

Being essentially nonlinear computational processes, iterations in areas of instability and bifurcation “forks” exactly reproduce the chaotization of behavior according to the Ferhulst-Feigenbaum scenario, inherent in nonlinear processes of a wide variety of physical, chemical, biological and even social natures. See, for example: Peitgen H.-O., Richter P. H. The beauty of fractals. - M.: Mir, 1993.

Iteration in programming

Iteration is an organization of data processing in which actions are repeated many times without causing calls to themselves.

When an action needs to be repeated a large number of times, programming uses loops. For example, you need to display the text “Hello, World!” 200 times. " Instead of repeating the same text output command 200 times, a loop is often created that loops 200 times, and does what is written in the body of the loop 200 times. One step of the cycle is called iteration.

be:Iterations

© 2024 hecc.ru - Computer technology news