• Tuesday April 7,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

D  j    vu

D j vu

We explain to you what a d jj vu is, what is the meaning of this term and the types of j vu that a person can experience . The experience of j vu is usually short and diluted after a few moments. What es un d j vu? It is called j vu (term taken from the French and which means already seen, or seen previously ) to a slight disturbance of the memory ( paramnesia of recognition ) that produces the sensation that a situation has been lived before

Sonnet

Sonnet

We explain to you what a sonnet is and a list of various European sonnetists. In addition, some examples of this poetic composition. The sonnet was extremely frequent in the Europe of the thirteenth, fourteenth and fifteenth centuries. What is a sonnet? It is known as a sonnetto, a very frequent poetic composition in the Europe of the thirteenth, fourteenth, and fifteenth centuries , which consists of 14 major art verses (usually endemic), organized in four fixed stanzas: two quartets (4 verses each) and two thirds (three verses each)

Prayer

Prayer

We explain to you what a prayer is and some of its characteristics. In addition, the elements that make up a sentence. A prayer can be bimembre or unimembre. What is Prayer? Prayer is one or more words that make up a whole with a logical sense . From the linguistic point of view, it is the smallest unit of content and also has synthetic autonomy

Labor law

Labor law

We explain what labor law is and what its origins are. Characteristics of labor law. Elements of the work contract. This branch of law regulates the relationship between workers and employers. What is labor law? Labor law is the set of legal norms that are established in the relationship between workers and employers

Corporate Communication

Corporate Communication

We explain what corporate communication is and what its elements are. In addition, how it is classified and why it is effective. Communication management is important taking into account the objectives of the company. What is corporate communication? Corporate communication is a process that establishes an organization and consists of transmitting information and knowing the response of the audience receiving the message

Sun

Sun

We explain everything about the Sun, its component parts, its temperature and other characteristics. In addition, the Solar System. The Sun is the closest star to Earth. What is the sun? The Sun is the closest star to the planet Earth , located 149.6 million kilometers away. All the planets of the Solar System orbit around them at different distances, attracted by their gigantic gravity, as well as the comets and asteroids we know