SEARCH

What are algorithms and why are they needed?

Beginners and inexperienced programmers oftenthere is such a question: "What are algorithms and why are they needed?" Though this notion gradually goes into oblivion, but it is still relevant. When creating large commercial projects, you can not do without algorithms. And before you start programming, it's better to understand them and only then to start practical exercises. Although this concept is associated with the creation of software on a PC, but it is quite common in everyday life. This article will give an example of what real-life algorithms are.

What are algorithms?

In Informatics

Now let's find out what algorithms are in computer scienceand programming. Under this concept, the order of actions is hidden, using which one can easily and simply solve the task posed. As an example, you can calculate by any one formula. To do this, it is enough to perform the following actions:

  • Enter the initial data necessary for the calculation.
  • Perform calculations.
  • Output the results either on the computer screen, or on some other medium
    (for example, on paper).

Kinds

Algorithm in computer science in appearance can be in the following modifications:

  • Graphically (in the form of a set of standardized blocks).
  • Step-by-step text description.

Algorithm in Informatics
In the first case, it consists of standard blocks,the appearance of which is regulated by GOST with the serial number 19.701-90. For example, a simple operation here will look like a rectangle, and the condition of choice is a rhombus.

The textual description is not so clear and thereforeis used much less often. It looks like a regular bulleted list with numbers or letters. The structure is distinguished by a linear description with branching. The first option is much less common. The difference between them is that in the second case there are branching blocks and the number of calculations is unknown to get the final result.

Real life

Now let's look at what algorithms are inreal life. When preparing various dishes, the mistress follows a prescription. For example, when preparing pasta, you need to perform the following algorithm of actions:

Informatics Algorithm

  • Bring water to a boil.
  • Salt her.
  • Fall asleep pasta.
  • On low heat, stirring them, bring to a boil.
  • After they are cooked, drain the water.
  • Add the butter.
  • Stir until smooth.

The dish is ready. If you look at it with the eyes of a programmer, then this is a normal linear algorithm, written in text form. So it's not so rare in our lives, this intricate concept occurs. We just use it and do not even know about it.

Instead of conclusions

In many spheres of human activityA concept such as an algorithm is used. Informatics is one of them. And, the most famous. Correctly composed sequence of actions allows to significantly simplify the process of creating a software product and improve its quality. It's like a business plan when building a factory or factory. When creating simple programs you can do without it, but when you develop a serious software - without it anywhere. It can be either generalized or detailed, but in any case it is.

  • Rating: