Methodology for the Construction of Algorithms. Pseudocode in the area of ​​Engineering Part 1

in #steemstem6 years ago (edited)

¡Welcome Steemians !

In today's post we will address the subject of programming, that is, programming. The methodology to elaborate algorithms, the different particularities and elements that intervene in the construction and manipulation of programs, in addition to the correct and favorable structure of the algorithms are topics that will also be specified, all this in the engineering area, thus being able to have a Clearer and simple way of how an algorithm should be created and obtain a successful programming.

Source

Algorithm

It is a method to solve a problem through a series of steps (measures, operations, instructions, orders, among others). Defined, precise and finite.

  • Precise: It implies the order of execution of each of the steps. 
  • Defined: If it is executed two or more times, the same result is obtained.
  • Finite: It has a certain number of steps, implies that it has an end.  

Types of Algorithm

There are two types and they are called like this by their nature:

  1. Qualitative:      They are those in which the steps are described using words. 
  2. Quantitative:Are those in which numerical calculations are used to define the steps of the process. 

Algorithmic Languages

An algorithmic language is a series of symbols and rules that are used to explicitly describe a process.

Types of Algorithmic Languages

  1. Graphics: it is the graphic representation of the operations carried out by an algorithm (Flow chart).  

2. No Graphics: Represents in a descriptive way the operations that an algorithm must perform (Pseudocode)  

Source

Creating an Algorithm

A program is the solution to an initial problem, everything starts with the problem. The programming process is as follows: Given a certain problem the programmer must devise a solution and express it using an algorithm, after this, it must be codified in a certain programming language and finally run the program on the computer which reflects a solution to the initial problem.

Methodology for the solution of a problem through the use of an Algorithm

Definition of the problem

This phase is given by the statement of the problem, which requires a clear and precise definition. It is important that you know in detail what you want to do, as long as this is not known at all there is not much case to continue with the next stage.

Problem Analysis

Once you have understood what you want to do, you need to define:

  • The input data. 
  • The output information that you want to produce
  • The methods and formulas that are needed to process the data. 

Design or Elaboration of the algorithm

The characteristics of a good algorithm are:

  • Must have a particular starting point. 
  • Should be defined, must not allow double interpretations.
  • It must be general, that is, support most of the variants that may arise in the definition of the problem. 
  • It must be finite in size and runtime. 

Purification or Cold Run

It is called desktop test to check that an algorithm is made to know if it is well done. This test consists of taking specific data as input and following the sequence indicated in the algorithm until a result is obtained, the analysis of these results will indicate if the algorithm is correct or if on the contrary there is a need to correct it or make adjustments.

Pseudocode

It is the description of an algorithm that resembles a programming language but with some conventions of natural language. It has several advantages with respect to flowcharts, among which the little space required to represent complex instructions stands out. The pseudocode is not governed by any standard.

The main objective of the pseudocode is to represent the solution to an algorithm in the most detailed way possible and at the same time as close as possible to the language that will later be used to encode it.

The main characteristics of a pseudocode are:

  • It is a simple form of representation to use and manipulate.
  • It facilitates the passage of the program to the programming language.
  • It is independent of the programming language that will be used.
  • It is a method that facilitates the programming and solution to the algorithm of the program.    

Structure of a Pseudocode Algorithm

Let's practice with this small example applied to engineering

Bibliographic references

http://www.monografias.com/trabajos94/algoritmo-y-diagrama-flujo/algoritmo-y-diagrama-flujo.shtml
https://aulatec.wordpress.com/algoritmos/
https://sites.google.com/site/portafoliocarlosmacallums/unidad-i/lenguajealgoritmico
https://desarrolloweb.com/articulos/2143.php
http://www.monografias.com/trabajos38/programacion/programacion.shtml
https://sites.google.com/site/programacionbasicajava/Algoritmo
https://aprendicessena.jimdo.com/algoritmos/
https://richardunefa.files.wordpress.com/2008/04/algoritmos.pdf
https://es.slideshare.net/dare3_16/algoritmos-1529805
http://informaticabachilleratoitea.blogspot.com/p/pseudocodigo.html
https://www.goconqr.com/p/6417220-pseudoc-digo-notes
http://yoaprendo-informatica.blogspot.com/2016/12/que-es-pseudocodigo.html
Diseño Estructurado de Algoritmos Alexander Oviedo Fadul