ComputersProgramming

The concept of the algorithm and the properties of the algorithm. Types of algorithms

The concept of the algorithm and the properties of the algorithm are one of the most important concepts in computer science. Many people today, in the age of computer technology, think about what it is, and begin to gradually, for one reason or another, delve more deeply into the basics of computer science, while the modern generation passes this material already in the sixth grade.

What it is?

What is the concept of the algorithm and the properties of the algorithm?

An algorithm is a certain sequence of actions, that is, in principle we have to deal with them every day, although we may not even realize it.

Man and Algorithm

For example, if we ask someone from our family members to buy something in the store, we set the algorithm for actions, that is, we tell in detail which products to buy, in what quantities, and what requirements are imposed on each of them. In this case, as mentioned above, a clear algorithm of actions is set, for example:

  1. Go to a certain store.
  2. Find out if white bread is sold there.
  3. Find out if it's fresh.
  4. If the answers to questions 2 and 3 are "yes", then in this case two loaves are bought.

Of course, it may seem that the procedure is quite ordinary, and a similar description of it is quite voluminous. But in fact, if we are talking about what is the concept of algorithm and the properties of the algorithm in modern computer science, then the instructions can be much more voluminous, since the above algorithm is one of the simplest.

Algorithms in nature

Each person constantly solves a huge number of the most diverse problems, having different complexity, while some of them are so simple that they are solved completely automatically, even without being perceived as a specific task. For example: close the door to the key, wash, have breakfast, feed the family, etc.

But there are other tasks that are so complex that they require long reflection, as well as a considerable amount of effort to initially find a solution, and then reach the goal. To such problems it is possible to carry: learn a foreign language, earn a certain amount of money and others. In other words, to perform such tasks, many more complex actions are required compared to how much they are required to perform the task of "buying bread", but in fact even the simplest tasks are solved in several steps.

Concept, types and properties

In the form of a certain sequence of actions, you can describe the procedure for solving the largest number of tasks that a person encounters in everyday life, and this sequence is represented in computer science as a concept of the algorithm and the properties of the algorithm.

One of the most famous among all is the so-called Euclidean algorithm, with the help of which the greatest divisor of two integers is determined.

It should be noted that, considering the concept of the algorithm and its properties, it is necessary to correctly understand not only the actions themselves, but also the order in which they are performed. After all, there are often such situations when, in the event of a change in the order of actions in an algorithm, eventually it may prove to be non-executable under certain circumstances. For example, if you go to a store, then the beginning of the algorithm will be approximately as follows:

  1. Go to a shop.
  2. Choose bread.

Or:

  1. Choose bread.
  2. Go to a shop.

If we consider the last algorithm, then in this case bread is initially selected, and only then we go with a more accurately defined task to the store, and if in fact the bread we need is not there, then the algorithm we built will ultimately prove to be Non-executable.

Kinds

Types of algorithms can be:

  • Cyclical. An algorithm in which a cyclic structure is present, that is, a repetition of various actions.
  • Linear. An algorithm that uses the sequence structure, that is, the actions are arranged one after another.
  • Branching. An algorithm in which the branching structure is used when the action is selected depending on whether a certain condition is met.

Properties

The properties are the following:

  • Determinism. When you specify the same source data several times, the algorithm starts to be executed equally, providing the same signal.
  • The mass. With the help of the algorithm, not one single task is solved, but many problems of a certain type.
  • Effectiveness. The use of the algorithm in any case leads to the solution of the task.
  • Discreteness. The algorithm includes a sequence of actions, the performance of which does not represent any complexity.
  • Limb. The sequence of actions of the algorithm can not be unlimited or infinite.
  • Correctness. If the algorithm is formed to perform a specific task, then it must always produce the corresponding result.

Algorithm in Informatics

When a person gradually enters into informatics and thinks about what the concept of the algorithm is and its properties, he learns that an algorithm having an error will in some sense be better than the one that functions, but does it incorrectly. After all, if the error is present, then the computer will tell us about it, and we will be able to find it and fix it later, and if the error that causes the algorithm to work incorrectly appears only in rare cases, then in this case it can appear in The most important moment.

How easy is it to be?

For many people, the processing of information seems to be a fairly simple task, but in reality it is not so, because first we need to at least understand what the concept of the algorithm, and the properties of the algorithm, and its implementers are. In particular, this concerns the compilation of an algorithm that is required for the correct processing of information.

The simplest example is the user's instruction for a particular subject. If it is made unprofessional, then in this case the user can simply break the object, as it will not operate properly or learn to work with it, not to mention that there can be certain physical injuries if we are talking about a serious household Technique.

Many will say that in fact there is nothing difficult in creating instructions for a finished device, but in fact it is not, because in reality the majority of people are much easier to do something on their own than to explain to someone else how This is done.

For example, almost every student can easily use a mobile phone, as well as all the functions in it, and this seems extremely simple and intuitive. But in fact, it's not so easy to explain how to use a mobile phone to a person who did not hold this device in his life, since he will have a huge number of questions, and ones that you do not even suspect. It is in this situation that it will be difficult to explain everything in accordance with what the concept of the algorithm and the properties of the algorithm are. The sequence of actions will be incomprehensible, and a person will not be able to perform them as it should for the normal operation of the device.

What difficulties can arise?

As an example, let's consider how to make the tea brewing algorithm for some robot, which in principle does not know anything, and for it a full-fledged source of information about the task is an algorithm. The concept, types, properties - we all know this, but for most people the mental model of such an algorithm is roughly the following:

  • Take the cup.
  • Put tea in it.
  • Sprinkle sugar.
  • Pour boiling water.
  • Stir.

But in reality, such an algorithm will be almost impossible to perform, since the robot does not have common sense, and all this procedure for him is a minimal set of information.

Accuracy of actions is the basis of the algorithm

The main thing is to understand, considering the concept of algorithm and the properties of the algorithm - the accuracy of actions, because the robot does not even know initially where to get the cup and what exactly to take, while even if it takes it, it will hold it in hands, so As he had no command to put it on the table. Now he will need to put tea, but this can again be done with his hands, and can be a spoon, while you need to know the amount. Thus there is a huge number of very different problems that need to be solved at the stage of algorithm construction.

How does it look right?

Of course, considering the concept of the algorithm and the properties of the algorithm, an accurate description can be formed practically to infinity, but the following sequence of actions will be optimal in this situation:

  • Take a cup with the inscription "Working" on the sideboard.
  • Put the cup on the table in the kitchen bottom down.
  • Take out the containers marked "Sugar" and "Tea" from the cabinet to the right of the refrigerator, then place them on the table next to the cup.
  • From the sideboard get a teaspoon.
  • Pour into the cup one full teaspoon from the container with the inscription "Tea", and then two teaspoons from the container with the inscription "Sugar".
  • Turn on the kettle.
  • Wait for the kettle to boil, then pour water into it until it is 2/3 full.
  • Spread the teaspoon evenly in the cup for 30 seconds.

Thus, considering the concept of the algorithm and the properties of the algorithm, by whom each action is performed, as well as many other elements, one can come to the construction of an optimal sequence of actions. Even the above algorithm can not be called perfect, and it stipulates that the robot knows a large number of things, but even with this example one can understand how difficult it is actually to describe certain things that we and we know well from childhood.

What do I need to know?

First of all, in front of there, how to compose an algorithm, you need to determine what initial conditions are for performing a certain task, and what you need to know is also to be known. The algorithm itself is already a finite sequence of actions in solving a particular problem, which results from the initial information to a certain result. In any case, the primacy in the development of the algorithm of actions belongs to the person, and different people or all kinds of devices such as satellites, robots, computers, advanced home appliances are engaged in the implementation of these actions, and recently certain toys have learned to fulfill them.

History

Al-Khorezmi is the person who first defined the concept of the algorithm and the properties of the algorithm. This concept has acquired masshood after a certain time, when it has already become more broadly meaningful, and also began to determine any exact rules for a particular action. To date, this concept is perceived by many as one of the most important concepts of science such as computer science, without which it is almost impossible to imagine.

Al-Khorezmi himself lived in the 9th century AD, and it is worth noting that the original Arabic original, in which his arithmetic works were presented, was lost, but there is a translation by which Western Europe could finally get to know the decimal position system Calculations, as well as the basic rules for performing various arithmetic operations.

The scientist aspired to ensure that the rules that he formulated were very clear to any literate person. To achieve this in the century, when there was not yet a full-fledged mathematical symbolism, it was extremely difficult, but the scientist was able in his works to finally achieve a clear and at the same time strict verbal order, according to which the reader could not evade the prescribed tasks or skip certain actions .

In the Latin translation, the scholar's works were presented in a single book, entitled "Algorizmi said." Over time, people began to gradually forget that Algorizmi is the author of such rules, as a result of which the rules began to be called algorithms. Thus, gradually "Algorizm said" was transformed and became "the algorithm says."

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.atomiyme.com. Theme powered by WordPress.