• Saturday July 11,2020

Computer Algorithm

We explain what a computer algorithm is and what it is for. Characteristics and parts of an algorithm. Practical examples.

Basically an algorithm serves to solve a problem step by step.
  1. What is an algorithm?

In computer science, an algorithm is a sequence of sequential instructions, thanks to which certain processes can be carried out and respond to certain needs or decisions. These are ordered and finite sets of steps, which allow us to solve a problem or make a decision.

The algorithms do not have to do with programming languages, since the same algorithm or flowchart can be represented in different programming languages, that is, it is an ordering prior to programming. .

Seen this way, a program is nothing more than a complex series of algorithms ordered and coded by a programming language for later execution on a computer.

Algorithms are also frequent in mathematics and logic, and are the basis for the manufacture of user manuals, instruction booklets, etc. Its name comes from the Latin algorithmus and this last name of the Persian mathematician Al-Juarismi. One of the best known algorithms of mathematics is that attributed to Euclid, to obtain the maximum common divisor of two positive integers, or the so-called Gauss method. to solve systems of linear equations.

See also: Flowchart.

  1. Parts of an algorithm

Every algorithm must consist of the following parts:

  • Input or input . The input of the data that the algorithm needs to operate.
  • Process . This is the formal logical operation that the algorithm will undertake with the input received.
  • Output or output . The results obtained from the process on the input, once the execution of the algorithm is finished.
  1. What is an algorithm for?

Simply put, an algorithm serves to solve a problem step by step . It is a series of ordered and sequenced instructions to guide a particular process.

In Computer Science, however, algorithms constitute the skeleton of the processes that will then be encoded and programmed to be performed by the computer.

  1. Types of algorithms

There are four types of computer algorithms:

  • Computational algorithms An algorithm whose resolution depends on the calculation, and which can be developed by a calculator or computer without difficulties.
  • Non-computational algorithms Those who do not require the processes of a computer to resolve, or whose steps are exclusive to the resolution by a human being.
  • Qualitative algorithms It is an algorithm whose resolution does not involve numerical calculations, but logical and / or formal sequences.
  • Quantitative Algorithms On the contrary, it is an algorithm that depends on mathematical calculations to find its resolution.
  1. Characteristics of the algorithms

An algorithm must offer a result based on its functions.

The algorithms have the following characteristics:

  • Sequential The algorithms operate in sequence, must be processed one at a time.
  • Accurate . The algorithms must be precise in their approach to the subject, that is, they cannot be ambiguous or subjective.
  • Ordered The algorithms must be established in the precise and exact sequence so that their reading makes sense and the problem is solved.
  • Finite Every sequence of algorithms must have a specific purpose, it cannot be extended to infinity.
  • Concrete . Every algorithm must offer a result based on the functions it fulfills.
  • Defined The same algorithm before the same input elements must always give the same results.
  1. Algorithm Examples

A couple of possible examples of algorithm are:

Algorithm to choose some party shoes :

  1. START
  2. Enter the store and look for the men's shoes section.
  3. Take a pair of shoes.
  4. Are they party shoes?

YES: (go to step 5) - NO: (go back to step 3)

  1. Are there the right size?

YES: (go to step 6) - NO: (return to step 3)

  1. Is the price payable?

SI: (go to step 7) - NO: (return to step 3)

  1. Buy the chosen pair of shoes.
  2. FINISH

Algorithm to calculate the area of ​​a right triangle :

  • START
  • Find the measurements of the base (b) and height (h)
  • Multiply: base by height (bxh)
  • Divide the result by 2 (bxh) / 2
  • FINISH

Interesting Articles

Viscosity

Viscosity

We explain what viscosity is and the types that exist. In addition, how is the viscosity of water and some examples of this property. All fluids have viscosity, except ideal or superfluid fluids. What is the viscosity? When we talk about viscosity, we refer to a property of fluids equivalent to the concept of thickness , that is, to the resistance that certain substances have to flow, to suffer gradual deformations due to shear stresses or tensions of traction

Mission

Mission

We explain to you what the mission is, in its different uses: Business mission, mission of the people, and religious missions. The business mission refers to the objectives and activities of the company. What is Mission? The concept of mission is understood as the faculty or power that is given to one or several people to perform a certain duty or assignment

Third sector

Third sector

We explain what the tertiary sector is, its main areas and examples. In addition, what the primary, secondary and quaternary sectors consist of. The tertiary sector provides specialized support to consumers or companies. What tertiary sector? It is called the tertiary sector or services sector of the economic chain which, unlike the previous two, does not engage in the extraction of raw material or its transformation into consumer goods, but to the satisfaction of operational and commercial needs or of any other nature required by both final consumers and other companies and industries

pH

pH

We explain what the pH is and what instruments are used to measure it. In addition, the pH scale and examples of acids, neutrals and bases. The pH is not more than the indicator of the potential of hydrogen. What is the pH? The pH is a unit of measurement that serves to establish the level of acidity or alkalinity of a substance

Computer Generations

Computer Generations

We explain what a generation in computing is, what are the generations so far and the characteristics of each one. The computers of the first generations were much larger than the current ones. Computer Generations In the history of computing, generations are talked about to refer to the various stages in the history of their technological evolution , as they became more complex, more complex

Mesopotamia

Mesopotamia

We explain to you what Mesopotamia is, its location, why it was important in Antiquity and the peoples that inhabited it. In Mesopotamia the first civilizations of history flourished. What is Mesopotamia? Mesopotamia is a region of West Asia located between the Tigris and Euphrates rivers, as well as its surrounding land