ALGORITHM


In mathematics, computer science and related disciplines, an algorithm (from the Latin, dixit algorithmus and this in turn of the Persian mathematician al-Jwarizmi) is a well-defined, finite and orderly operations that allows the solution to a trouble. Given an initial state and input, through well-defined steps and reach a final state, obtaining a solution. The algorithms are studied in the algorithms.
In everyday life algorithms are used on numerous occasions to resolve various problems. Some examples are instructive in the (user manuals), which are algorithms to use the device in question, or even in the instructions received by an employee by his employer. There are also examples of mathematical nature, such as the division algorithm to compute the quotient of two numbers, the Euclidean algorithm to compute the greatest common divisor of two integers, or the Gauss method for solving a linear system of equations.






Algorithms and functions

Formally, an algorithm calculates a function. Any finite set is large, and any large group can be expressed in terms of the set of natural numbers (infinite, but many, in fact there is another set which is also a big number), in essence, all algorithm functions calculated defined in natural numbers. At this point, a function is partially or fully defined. A function is partial if there is no natural numbers that belong to your domain (ie, there are natural numbers on which the function is not defined), and is a total function otherwise.

If a function is partial, the algorithm calculates that only return a result (ie spends a finite time calculation) for the values on which the function is defined, not by returning a result (the computation time is infinite) for the remainder values. If an algorithm that calculates a function to return a partial result for the values of the function is not defined, then calculated according to that but to another. Similarly, an algorithm that computes a total function always returns a result for any value, and that like partial functions, it must exactly match the value returned by the function that calculates and repeatedly, if Otherwise, this function is not calculated but another. Thus, any algorithm calculates a function defined on natural numbers, whatever the nature.




Flow diagram
Flow The flow charts are graphic descriptions of algorithms, using symbols connected with arrows to indicate the sequence of instructions and are governed by ISO. Flow algorithms are used to represent small, covering a lot of space and its construction is laborious. For ease of reading are used as an introduction to the algorithms, a description language and description of processes to non-computing.
Pseudocode
The pseudocode Pseudocode is to describe an algorithm that resembles a programming language but with some conventions of natural language. Has several advantages over the flow, among which the little space that is required to represent complex instructions. The pseudocode is not governed by any standard. pseudo is false and hence is a code that is understandable but does not apply to the process to be performed by the machine.
Ejemplo
Home
Sleep to 1 until the alarm rings (or call Mom).
Watch the time.
Is there enough time?
If there is, then
Bathing.
Dressed.
Breakfast.
But Dressed.
Brush your teeth.
Say goodbye to mom and dad.
Is there enough time?
If waiting at.
But Running andalusia whereabouts.
Until we pass a bus to make the university:
Wait for the bus
See other people awaiting a bus.
Take the bus. Until we get to the university to:
Continue on the bus.
Mentally fight with the driver.
Ringer.
Lowered.
Go to college.
End

0 comentarios:

Publicar un comentario