MODULE III
DEFINITION OF ALGORITHM
The word algorithm is derived from the Latin translation of the Arabic word Alkhowarizmi.
name of an Arab mathematician and astronomer who wrote a treatise on manipulation of
numbers and equations in the 9th century.
It is defined as a series of organized steps that describe the process that must be followed,
to provide a solution to a specific problem.
The main characteristics that a good algorithm must have are:
y It must have a particular starting point.
y It must be completely defined and should not allow for double interpretations.
y It must be general, that is, to support most of the variants that may arise.
in the definition of the problem.
y It must be finite in size and execution time.
y It must be readable, clear, and easy to interpret and understand.
TYPES OF ALGORITHMS
Considering the way they describe the process, they can be classified into:
Qualitative: These are those in which the steps are described using words.
Quantitative: These are those in which numerical calculations are used to define the steps of
process.
ALGORITHMIC LANGUAGE
It is a series of symbols and rules that are used to explicitly describe a process,
that will serve as support to describe the solutions proposed here.
Considering the way they describe the process, there are two types of languages
algorithmic
Charts: It is the graphical representation of the operations performed by an algorithm (diagram of
flow).
No Graphics: It represents descriptively the operations that an algorithm must perform.
(pseudo code).
Flowcharts
A flowchart is a graphical representation of an algorithm or part of it.
Flowcharts help in understanding the operation of control structures
(IfWhile).
The advantage of using an algorithm is that it can be built independently of a
programming language, since when it comes to translating it into code, it can be done in any
language.
These diagrams are constructed using certain special use symbols such as
rectangles, diamonds, ovals, and small circles, these symbols are connected to each other
by arrows, known as flow lines. The details of these symbols will be outlined next.
Nombre Símbolo Función
Represents the beginning and end of a program.
It can also represent a stop or
Terminal
scheduled interruption that is necessary
realiar en un programa.
Any type of data entry in the
Entry / exit memory from the peripherals or register of
información procesada en un periférico.
Any type of operation that can
originating change of value, format, or position
Process of the information stored in memory,
arithmetic operations, of
transformaciones, etc.
Indicate logical or comparison operations
between data (normally two) and depending on
the result of it determines
Decision
(normally yes or no) which of the different ones
alternative paths of the program must
seguir
It serves to link any two parts of
a diagram through a connector link
Same Connector
output and another connector at the input. It
Page
refers to the connection on the same page of the
diagrama
Indicator of
Indicate the meaning of the execution of them.
address or line of
operations
flujo
It is sometimes used instead of the symbol.
of the output. The drawing represents a piece of
Exit
sheet. It is used to display data or
resultados.
Regular diagrams of fl
y You must clearly indicate whereI I I amand wheretermiathe diagram.
y Any path of the diagram must always lead you to the end terminal.
y Organize the symbols in such a way that they visually follow the flow from top to bottom
and from left to right.
y Do not use programming language within the symbols.
y Center the diagram on the page.
y The lines must be vertical or horizontal, never diagonal.
PSEUDO CODE
Mix of programming language and a language like Spanish, which is used within the
structured programming, to specify the design of a program. It can be defined as a
language for specifying algorithms, using words that indicate the process to be carried out.
The most common words are:
Start
until, return.