1. Algorithm Concept
The algorithm is a foundation that must be mastered by every student who wants to solve a problem is structured, effective and efficient, especially again for students who want to develop a computer program to solve a problem.
Definition
Algorithm: 1. Mechanical preparation of problem-solving steps in the form of sentences with a limited number of words, but arranged in a logical and systematic.
2. A clear procedure to solve a problem by using certain measures and limited in number.
Historical Note
Abu Ja'far Muhammad ibn Musa al-Kwarizmi, author of "Algebra wal Muqabala" several centuries ago (in the IX century), regarded as the originator pertaman algorithm because in the book of Abu Ja'far explained the steps in solving various problems arithmetic (algebra), most likely the word "algorithm" is taken from the word "Al-Kwarizmi" which later became berbubah "Algirism", then became the "algorithm".
Algorithm Characteristics
Donald E. Knuth, an author of several books algorithms twentieth century, states that there are some features of the algorithm, namely:
1. The algorithm has a beginning and an end. An algorithm must stop after doing a series of tasks or in other words, an algorithm has a finite step.2. Each step must be defined properly so it does not have a double meaning (not ambiguous.)3. Having input or initial conditions.4. Have the output or final conditions.5. Algorithms must be effective, if followed will really solve the problem.
Algorithm properties
Based on the features of the algorithm described by Donald Knuth and the definition of algorithms will be able to conclude the main properties of an algorithm, which is as follows:
1. Input: An algorithm has an input or initial condition before the algorithm can be implemented and pengibah values taken from a special set.2. output: An algorithm will produce output after execution, where the output value obtained from input values that have been processed through the algorithm.3. Definiteness: The steps are written in well-defined algorithm that is easily implemented by the user algorithm.4. Finiteness: An algorithm must provide conditions for the final or output value after a finite number of steps amount to any initial conditions or a given input.5. Effectiveness: Each step in the algorithm can be implemented within a certain time interval which in turn gives the solution as expected.6. Generality: The steps the algorithm applies to any given set of inputs that correspond to issues that will be given, not only for a particular set.
In order to form penyusunanya algorithms and processes can begin to understand the following will be described the process of making the algorithm starts form that uses everyday language, followed by the algorithm description format that can be used as a reference, and some examples of making the algorithm that follows this format.
Example: Develop algorithms for finding the largest number (maximum) of a finite set of integer numbers.
Solution:1. Suppose the first number in the collection is the largest (maximum).2. Compare this with the maximum rate the following numbers in the collection. If the number is greater then make the maximum.3. Repeat step 2 is thus no longer have the numbers remaining in the set.4. Stop the comparisons after each number is complete compared to the largest number in the set is the last maximum.
The solution in the form of instruction symbols are as follows:
1. Suppose N = number of digits in the set.2. Index = 13. Maximum = number (index)4. During index <N, do: a. index = index + 1 b. if the number (index)> max then max = number (index) c. repeat again for the next index5. The biggest numbers in the set is the last maximum.
A specific algorithm can be written using everyday language such as the above example. However, such algorithms are still difficult to directly translate when will be implemented into a computer programming language. Each algorithm of course requires a step "transition" into a language program when the premises will be implemented using a computer so that the closer the form of the algorithm into a form of computer programs, the more easily translated. An algorithm like this can only be used for a particular language support program and was forced to be changed back to be adjusted if it would be implemented with other language support programs.
0 comments:
Post a Comment