ALGORITHMIC LANGUAGE- an artificial system of linguistic means that has expressive capabilities sufficient to enable it to be used to specify any deterministic, generally understandable instruction belonging to a predetermined class, the implementation of which leads from initial data varying within certain limits to the desired result. These kinds of instructions are called algorithms , hence the term “algorithmic language” itself. It was introduced into systematic use in 1958 by G. Bottenbruch. Historically, the concept of an algorithmic language was formed in the 50s. 20th century in the process of establishing computer programming as an independent scientific discipline. However, the theoretical origins of this concept can be traced back to the works of the 30s. S.K.Cleene, E.L.Post, A.M.Turing and A.Church to clarify the general mathematical concept of an algorithm. Currently, the theory of algorithmic languages, as well as problems associated with their development and use, constitute one of the most important branches of computer science.

In the logical-linguistic and epistemological aspect, algorithmic languages ​​represent one of the models of the imperative (imperative mood), and therefore act, on the one hand, as a means of recording operational knowledge, and on the other, as a tool for machine, man-machine or even just human communication . In a short period of time, algorithmic languages ​​have become a new cognitive tool that has organically entered into scientific and practical human activity. Usually they are subject to the requirement of “universality”, which consists in the fact that it should be possible to model with their help any algorithms from among those that provide any clarification general concept algorithm (eg Turing machines). Absolute precision of the syntax of an algorithmic language is not necessary in all cases. It is obligatory in considerations of a substantive nature. But in certain situations (for example, when texts written in some algorithmic language begin to act as a means of communication with a computer), this algorithmic language must be formatted in the form of an appropriate formalized language with clearly described syntax and precisely defined semantics its grammatical categories. The central place in such algorithmic languages ​​is occupied by texts called programs (in fact, they express the concept of an algorithm). The concept of a program is formulated in purely structural terms of the syntax of this language, without any reference to semantic categories. The description of the program execution procedure is of exactly the same nature. Therefore, not only a person, but also someone endowed with the appropriate capabilities can act as the executor of algorithms written in formalized algorithmic languages. automatic device eg computer. "Theoretical" algorithmic languages ​​(such as the language of Turing machines or Markov normal algorithms) underlie the general theory of algorithms.

“Practical” algorithmic languages ​​– so-called. programming languages ​​for computers (more than a thousand of them are currently known) are used in the practice of machine solving problems of a wide variety of nature. At the early stage of programming, “machine-oriented” algorithmic languages ​​were used (so-called “machine-oriented” languages). low level"), taking into account the structure or even characteristics of specific computers(command system, features and memory structure, etc.). Then they were replaced by “problem-oriented” algorithmic languages ​​(languages ​​“ high level"), freeing the user from the need to focus on machines of a certain type and thereby giving his efforts a much greater mathematical focus. Further development The ideas of an algorithmic language were programming languages ​​of a more general, not necessarily algorithmic nature. Like algorithmic languages, such languages ​​are ultimately also aimed at obtaining machine programs, but in many cases their texts allow a certain freedom in execution and, as a rule, provide only material for the synthesis of the required algorithms, and not these algorithms themselves. The ever-accelerating penetration of computers into the scientific, cultural and social spheres leads to a significant increase in the role of algorithmic languages ​​in the life of society, and this is expressed, in particular, in the fact that algorithms and the programs that implement them (i.e., ultimately, texts) in some algorithmic languages) are increasingly acquiring the character of real resources of the economic, scientific and cultural potential of society, which in turn gives rise to a significant number of serious methodological and epistemological problems. In addition, the ever-expanding (even everyday) use of algorithmic languages ​​leads to the establishment of a special style of thinking, and the relationship of thinking of this kind with traditional mathematical one also represents an important and little-developed methodological problem.

Literature:

1. Knut D. The Art of Computer Programming, vol. 1–3. M., 1976;

2. Ershov A.P. Introduction to Theoretical Programming: Conversations on Method. M., 1977;

3. Dijkstra E. Programming discipline. M„ 1978.

School algorithmic language

Algorithmic language(Also Russian algorithmic language, RAYA listen)) is a programming language used to write and study algorithms. When studying computer science in schools, the so-called algorithm is used to study the basics of algorithmization. school algorithmic language (educational algorithmic language), using words in Russian that are understandable to schoolchildren. Unlike most programming languages, an algorithmic language is not tied to computer architecture and does not contain details related to the design of the machine.

Examples

The algorithm in algorithmic language is generally written in the form:

alg name of the algorithm (arguments and results) given conditions for applicability of the algorithm necessary purpose of the algorithm beginning description of intermediate quantities | sequence of commands (body of the algorithm) con

In the algorithm record keywords usually underlined or in bold. To highlight logical blocks, indentations were used, and paired words of the beginning and end of the block were connected by a vertical bar.

An example of calculating the sum of squares:

alg Sum of squares ( arg intact n, res intact S) given| n > 0 necessary| S = 1*1 + 2*2 + 3*3 + … + n*n beginning intact i | input n; S:=0 | nc for i from 1 to n | | S:= S + i * i | kts | conclusion"S = ", S con

E-workshop

To support the theoretical study of programming in an algorithmic language, specialists from the Faculty of Mechanics and Mathematics of Moscow State University created an editor-compiler in 1985 "E-workshop"(“E” - in honor of Ershov), allowing you to enter, edit and execute programs in an algorithmic language.

In 1986, a set of educational worlds (performers) was released for the “E-workshop”: “Robot”, “Draftsman””, “Two-legged”, “All-terrain Vehicle”, which allow you to simply introduce the concepts of the algorithm. “E-workshop” was implemented on computers: Yamaha, Corvette, UKNC and became widespread.

This programming language was constantly refined and a description of a later version of the “E-workshop” appeared in a textbook in 1990. The KuMir programming system (“Learning Worlds Set”), which supports this textbook, was released by the InfoMir enterprise in 1990. The language of this system is also called “Idol”.

In 1995, “KuMir” was recommended by the Ministry of Education of the Russian Federation as the main educational material for the course “Fundamentals of Informatics and Computer Science” based on the textbook by A. G. Kushnirenko, G. V. Lebedev and R. A. Svoren. .

Criticism

However, it should be noted that the algorithmic language, in the absence of details connecting it directly with the computer architecture, nevertheless, referring to Algolo-like languages, implicitly teaches schoolchildren to rely on the von Neumann architecture of machines. (The von Neumann architecture is a practical implementation of an earlier idea called the Turing machine. In addition to Turing's idea, there are other ideas. The most popular of them is called Lambda calculus: Alonzo Church worked on it. A Lisp machine is an architecture that is based on Lambda -calculus.)

Links

  • A. P. Ershov. Algorithmic language in the school course on the fundamentals of computer science and computer technology. 05/07/1985
  • Forum on Russian programming languages ​​and development tools

Wikimedia Foundation. 2010.

See what “School algorithmic language” is in other dictionaries:

    Algorithmic language is a formal language used to write, implement, or study algorithms. Every programming language is an algorithmic language, but not every algorithmic language is suitable for use as a language... ... Wikipedia

    This term has other meanings, see Algorithmic language. Academic algorithmic language is a formal language used to write, implement, and study algorithms. Unlike most programming languages, it is not tied to ... Wikipedia

    This term has other meanings, see Dragon (meanings). An example of a block diagram of an algorithm in the DRAGON language dragon diagram DRAGON (Friendly Russian Algorithmic Language That Provides Visibility) visual... ... Wikipedia

    Educational programming language is a programming language designed for teaching. As such, languages ​​such as BASIC and Pascal were developed. Python grew from the ABC language developed for teaching. In popular language, ... ... Wikipedia

    This article is proposed for deletion. An explanation of the reasons and the corresponding discussion can be found on the Wikipedia page: To be deleted / September 28, 2012. While the discussion process is not completed, the article can ... Wikipedia

    Algorithmic language (also Russian algorithmic language, RAYA) is a programming language used for writing and studying algorithms. When studying computer science in schools, the so-called algorithm is used to study the basics of algorithmization. school algorithmic... ... Wikipedia

    This term has other meanings, see Idol. KuMir ... Wikipedia

    Edumandriva ... Wikipedia

    - (Set of educational Worlds or Kushnirenko’s Worlds) a programming system designed to support initial courses in computer science and programming in secondary and high schools. Based on a technique developed in the second half of the 1980s... ... Wikipedia

Books

  • Programming in the algorithmic language KuMir, edited by A G Kushnirenko, Anelikova L., Gusev O.. This manual is intended for teachers and students to support initial courses in computer science and programming in middle, high and high schools. . It covers the main steps and…

Part of the algorithm from the word alg to the word beginning is called the heading, and the part between the words beginning And con- body of the algorithm.

In a sentence alg after the name of the algorithm, the characteristics (arg, res) and the type of values ​​(int, thing, sim, lit, log) for all input (arguments) and output (results) variables are indicated in parentheses.

When describing arrays (tables), a special word is used tab, supplemented by boundary pairs at each array element index.

Example sentences alg:

alg Volume and area of ​​the cylinder (arg things R, H, res things V, S)

alg Roots KvUr(arg things a, b, c, res things x1, x2, res lit t)

alg Exclude element(arg int N, arg res stuff tab A)

alg Diagonal(arg int N, arg int tab A, res lit Answer)

Sentences with words given And necessary not required. It is recommended to write down statements describing the state of the environment of the algorithm executor, for example:

Alg Replacement (arg lit Str1, Str2, arg res lit Text)given | the lengths of the substrings Str1 and Str2 must be the same | Everywhere in the Text line, the substring Str1 is replaced by Str2

Alg Number of maxima (arg int N, arg thing tab A, res int K)given | N>0need | K - the number of maximum elements in table A

Alg Resistance (args things R1, R2, args int N, res things R)given | N>5, R1>0, R2>0need | R - circuit resistance

Here in sentences given And necessary after the "|" sign comments recorded. Comments can be placed at the end of any line. They are not processed by the computer translator, but make the algorithm much easier to understand.

Commands of the school programming language AJ

Assignment operator. Used to evaluate expressions and assign their values ​​to variables. The general form of the operator: A:= B, where the sign ":=" means the assignment operation, i.e. command to replace the previous value of variable A, located on the left side, with the calculated value of expression B, located on the right side.


For example, a:=(b+c)*sin(Pi/4);

i:=i+1 .

For input and output data use commands

· input variable names

· conclusion variable names, expressions, texts.

For branching the algorithm uses the commands - If And choice.

For organization cycles - commands For And Bye, described below.

An example of writing an algorithm in the school language ASL.

Alg Sum of squares (arg integer n, cut is intact S)given | n > 0need | S = 1*1 + 2*2 + 3*3 + ... + n*nstart int i input n; S : =0 nc for i from 1 to n S : =S+i*i kts output "S = ", Skon

An algorithm is an accurate and understandable instruction for the performer to perform a sequence of actions aimed at solving a given problem.

The name "algorithm" comes from the Latin form of the name of the Central Asian mathematician al-Khwarizmi - Algorithmi. Algorithm is one of the basic concepts of computer science and mathematics.

An algorithm executor is some abstract or real (technical, biological or biotechnical) system capable of performing the actions prescribed by the algorithm.

The performer is characterized by:

elementary actions;

command system;

The environment (or setting) is the “habitat” of the performer. For example, for the performer Robot from the school textbook, the environment is an infinite cellular field. Walls and painted cells are also part of the environment. And their location and the position of the Robot itself determine the specific state of the environment.

Each executor can execute commands only from a certain strictly given list-- systems of executor commands. For each command, the conditions of applicability must be specified (in which environmental states the command can be executed) and the results of executing the command must be described. For example, the Work command “up” can be executed if there is no wall above the Work. Its result is the displacement of the Robot one cell up.

After calling the command, the performer performs the corresponding elementary action.

Executor failures occur if a command is called in an environment state that is unacceptable for it.

Usually the performer knows nothing about the purpose of the algorithm. He carries out all the commands he receives without asking why or why.

In computer science, the universal executor of algorithms is the computer.

The main properties of the algorithms are as follows:

Understandability for the performer - i.e. The executor of the algorithm must know how to execute it.

Discreteness (discontinuity, separateness) - i.e. The algorithm must represent the process of solving a problem as a sequential execution of simple (or previously defined) steps (stages).

Certainty - i.e. Each rule of the algorithm must be clear, unambiguous and leave no room for arbitrariness. Thanks to this property, the execution of the algorithm is mechanical in nature and does not require any additional instructions or information about the problem being solved.

Effectiveness (or finitude). This property is that the algorithm must lead to solving the problem in a finite number of steps.

Mass character. This means that the algorithm for solving the problem is developed in a general form, i.e. it should be applicable for a certain class of problems that differ only in the initial data. In this case, the initial data can be selected from a certain area, which is called the area of ​​applicability of the algorithm.

In practice, the most common forms of presenting algorithms are:

verbal (recordings in natural language);

graphic (images from graphic symbols);

pseudocodes (semi-formalized descriptions of algorithms in a conventional algorithmic language, including both elements of a programming language and natural language phrases, generally accepted mathematical notations, etc.);

software (texts in programming languages).

The verbal way of writing algorithms is a description of the successive stages of data processing. The algorithm is specified in a free form in natural language.

For example. Write down an algorithm for finding the greatest common divisor (GCD) of two natural numbers.

The algorithm could be as follows:

set two numbers;

if the numbers are equal, then take any of them as the answer and stop, otherwise continue executing the algorithm;

determine the largest of the numbers;

replace the larger number with the difference between the larger and smaller numbers;

repeat the algorithm from step 2.

The described algorithm is applicable to any natural numbers and should lead to solving the problem. Convince yourself of this by using this algorithm to determine the greatest common divisor of the numbers 125 and 75.

The verbal method is not widespread for the following reasons:

such descriptions are not strictly formalized;

suffer from verbosity of entries;

allow for ambiguity in the interpretation of individual instructions.

The graphical way of presenting algorithms is more compact and visual compared to the verbal one.

When presented graphically, the algorithm is depicted as a sequence of interconnected functional blocks, each of which corresponds to the execution of one or more actions.

This graphical representation is called a flowchart or flowchart.

In the flowchart, each type of action (entering initial data, calculating the values ​​of expressions, checking conditions, controlling the repetition of actions, completing processing, etc.) corresponds to a geometric figure represented as a block symbol. Block symbols are connected by transition lines that determine the order in which actions are performed.

Table 1 shows the most commonly used symbols.

The "process" block is used to denote an action or sequence of actions that changes the meaning, form of presentation or placement of data. To improve the clarity of the diagram, several individual processing blocks can be combined into one block. The presentation of individual operations is quite free.

The "decision" block is used to indicate conditional control transitions. Each "solution" block must identify the question, condition, or comparison that it defines.

The "modification" block is used to organize cyclic structures. (The word modification means modification, transformation). A cycle parameter is written inside the block, for which its initial value, boundary condition and step of changing the parameter value are indicated for each repetition.

The "predefined process" block is used to indicate calls to auxiliary algorithms that exist autonomously in the form of some independent modules, and for calls to library routines.

Pseudocode is a system of notations and rules designed to uniformly write algorithms.

It occupies an intermediate place between natural and formal languages.

On the one hand, it is close to the usual natural language, so algorithms can be written and read on it as plain text. On the other hand, pseudocode uses some formal constructs and mathematical symbolism, which brings the algorithm notation closer to the generally accepted mathematical notation.

In pseudocode, strict syntactic rules for writing commands inherent in formal languages ​​are not adopted, which makes it easier to write the algorithm at the design stage and makes it possible to use a wider set of commands designed for an abstract executor. However, pseudocode usually contains some constructs that are inherent in formal languages, which makes it easier to move from writing in pseudocode to writing an algorithm in a formal language. In particular, in pseudocode, as well as in formal languages, there are function words, the meaning of which is determined once and for all. They appear in bold in printed text and are underlined in handwritten text. There is no single or formal definition of pseudocode, so various pseudocodes are possible, differing in the set of function words and basic (basic) constructions.

An example of pseudocode is the school algorithmic language in Russian notation (school AYA), described in the textbook by A.G. Kushnirenko et al. “Fundamentals of Informatics and Computer Science”, 1991. In the future we will simply call this language “algorithmic language”.

Basic function words

General view of the algorithm:

alg name of the algorithm (arguments and results)

conditions for the applicability of the algorithm are given

you need the goal of executing the algorithm

initial description of intermediate quantities

| sequence of commands (body of the algorithm)

The part of the algorithm from the word alg to the word beg is called the header, and the part contained between the words beg and end is the body of the algorithm.

In the alg sentence, after the name of the algorithm, the characteristics (arg, res) and value type (integer, thing, sim, lit or log) of all input (arguments) and output (results) variables are indicated in parentheses. When describing arrays (tables), the service word tab is used, supplemented by boundary pairs for each index of the array elements.

Example sentences alg:

alg Volume and area of ​​the cylinder (arg things R, H, res things V, S)

alg Roots KvUr(arg things a, b, c, res things x1, x2, res lit t)

alg Exclude element(arg int N, arg res stuff tab A)

alg Diagonal(arg int N, arg int tab A, res lit Answer)

Suggestions given and must are not binding. It is recommended to write down statements describing the state of the environment of the algorithm executor, for example:

alg Replacement (arg lit Str1, Str2, arg res lit Text)

given | the lengths of the substrings Str1 and Str2 are the same

need | Everywhere in the Text line, the substring Str1 is replaced by Str2

alg Number of maxima (arg int N, arg thing tab A, res int K)

given | N>0

need | K - the number of maximum elements in table A

alg Resistance (args things R1, R2, args int N, res things R)

given | N>5, R1>0, R2>0

need | R - circuit resistance

Here in sentences given and necessary after the sign "|" comments recorded. Comments can be placed at the end of any line. They are not processed by the translator, but make the algorithm much easier to understand.

Algorithms can be thought of as certain structures consisting of individual basic (i.e. basic) elements.

Naturally, with this approach to algorithms, the study of the basic principles of their design should begin with the study of these basic elements.

To describe them we will use the language of algorithm diagrams and the school algorithmic language.

The logical structure of any algorithm can be represented by a combination of three basic structures:

following,

branching,

A characteristic feature of basic structures is the presence of one input and one output.

Algorithmic programming language- a formal language used to write, implement, and study algorithms. Unlike most programming languages, an algorithmic language is not tied to the computer architecture and does not contain details related to the design of the machine.

To study the basics of algorithmization, the so-called Russian algorithmic language(school algorithmic language), using words in Russian that are understandable to schoolchildren.

An Algol-like algorithmic language with Russian syntax was introduced by academician A.P. Ershov in the mid-1980s, as the basis for a “machineless” computer science course.

Basic function words of the algorithmic language

Description of the algorithm

  • alg(algorithm)
  • arg(argument)
  • res(result)
  • beginning(beginning) — the beginning of the algorithm
  • con(end) - end of the algorithm
  • given— source data in any form
  • necessary— the goal of the algorithm

Data types:

  • intact(whole)
  • things(real)
  • Sim(character)
  • lit(letter) - string
  • log(logical)
  • tab(table) - to denote an array
  • lengths(length) - number of array elements

Designation of conditions

  • If
  • otherwise
  • choice
  • value

Cycle designation

  • nc(start of cycle)
  • kts(end of cycle)
  • Bye

Logical functions and values ​​for constructing expressions

Input Output

  • input
  • conclusion

General view of the algorithm

1
2
3
4
5
6

alg name of the algorithm (arguments and results)
| given conditions for applicability of the algorithm
| necessary purpose of the algorithm
beginning description of intermediate quantities
| sequence of commands (body of the algorithm)
con

Part of the algorithm from the word alg to the word beginning is called a heading, and the part enclosed between the words beginning And con- body of the algorithm.

In a sentence alg after the name of the algorithm, the characteristics are indicated in parentheses ( arg, res) and value type ( intact, things, Sim, lit or log) all input (arguments) and output (results) variables. When describing arrays (tables), a special word is used tab, supplemented by boundary pairs at each array element index.

In the algorithm entry, keywords are usually underlined or in bold. To highlight logical blocks, indentations are used, and paired words of the beginning and end of the block are connected by a vertical bar.

Basic algorithmic structures

Detailed description of the main algorithmic structures given in this article. Below are templates for composing these structures in algorithmic language.
Incomplete fork

| If condition
| | That actions
| All

Full fork

1
2
3
4
5

| If condition
| | That actions 1
| | otherwise actions 2
| All

Branching

1
2
3
4
5
6
7
8

| choice parameter
| | at value value 1
| | | actions 1
| | at value value 2
| | | actions 2
| | otherwise
| | | default actions
| All

Loop with precondition

| nts for now condition
| | actions
| kts

Loop with postcondition