Algorithm and its properties


Download 14.18 Kb.
Sana15.06.2020
Hajmi14.18 Kb.
#118941
Bog'liq
Algortim


ALGORITHM AND ITS PROPERTIES

Algorithm Definitions. The basis for solving any problem is an algorithm. The concept of an algorithm in computer science is fundamental, such as the concept of a point, a line and a plane in geometry, sets in mathematics, space and time in physics, and matter in chemistry. It is believed that the term “algorithm” comes from the name of the ninth-century medieval Persian mathematician Abu Jafar Mohamed ibn Musa al-Khwarizmi. The editors of the last part of the name of the scientist in European languages ​​led to the formation of the term “algorithm” or “algorithm”. Here are some options for determining the algorithm from various sources. An algorithm is a predetermined sequence of clearly defined rules or commands for obtaining a solution to a problem in a finite number of steps [7].

An algorithm is a system of operations applied according to strictly defined rules, which, after their sequential execution, leads to the solution of the problem [6].

An algorithm is a formal description of a method for solving a problem by dividing it into a finite sequence of actions (elementary operations) [1].

By an algorithm it is customary to understand an exact instruction that defines a computational process leading from variable initial data to the desired result [5].

Thus, the algorithm should contain a finite sequence of steps or operations that uniquely determine the process of processing the source and intermediate data into the desired result. The developed algorithm can be performed by both a person and technical devices (computer, robot) that understand the rules for writing the algorithm and are able to perform the actions prescribed by it. Following the instructions of the algorithm, the executor will get the result even if he does not understand the essence of the problem being solved.


Algorithm Properties. When compiling the algorithms, a number of requirements should be taken into account, the fulfillment of which leads to the formation of the necessary properties.

Discreteness. The algorithm should represent the process of solving the problem as the sequential implementation of some simple steps. Moreover, to complete each step of the algorithm, a finite period of time is required, that is, the transformation of the source data into the result is carried out discretely in time.

Determinism (certainty). At each moment of time, the next step of work is uniquely determined by the state of the system. Thus, the algorithm produces the same result for the same source data.

Clearness. The algorithm for the executor should include only those teams that are available to him, which are part of his team system.

Finiteness (completion). With correctly specified

input data, the algorithm should complete the work and produce the result in a finite number of steps.

Performance. The execution of the algorithm should be completed with certain results.

Mass (universality). The algorithm should be

change to different sets of source data. Example 1: What property of the algorithm means that for correctly defined initial data, the algorithm gives the result in a fixed number of steps?

determinism

limb

understandability



Mass Example 2: What is not essential in the presentation of the algorithm? understandability

development complexity

unambiguity

visibility


Algorithm Presentation Methods. There are the following methods for representing algorithms:

verbal description, pseudo-code, graphic description, writing in a programming language.

The verbal description of the algorithm has a minimum of restrictions

It is the least formalized, strict, allowing the appearance of uncertainties. The verbal algorithm can be very voluminous and difficult for human perception.

Pseudocode is a language for describing algorithms. The source of the pseudocode is several programming languages, so it does not contain specific features of a particular language. In addition, mathematical expressions are included in the pseudocode in the form that they are usually written in mathematics, and some fragments of the pseudocode can be phrases of a natural language (Russian or English).

A graphical description of the algorithm (block diagram) is an image of

The algorithm is a sequence of geometric blocks. Blocks are interconnected by information flow lines.

provided with necessary comments. Flowcharts are versatile, highly visual and easy to read.

Writing an algorithm in a programming language is a form of image of the algorithm in the form of a program in a specific programming language: high level (algorithmic language) or low level (machine language).

Example 3: Algorithm writing tools are not flowcharts.



translators

pseudo codes.
Download 14.18 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling