What is an algorithm? The ALGORITHM is a series of computational processes that convert one or several inputs (input) to single or multiple output (output). The word algorithm is derived from the name of a mathematician Persia (now Iraq), Abu Ja `far Mohammed ibn Musa al- Khowarizmi. Al-Khowarizmi own now is a Russian town called Khiva. From Al-Khowarizmi revealed name to the algorithm.
An algorithm can also be seen as an instrument (tool) for completing a certain computational problems.
Introduction to Algorithms and Implementation
Why should learning algorithm?
In short, we learn that our algorithm can solve computational problems efficiently. More specifically, the purpose of learning algorithm is as follows.
- In terms of practical, we can solve many existing problems by using a set of algorithms that already available. For example, if we want to sort out a the amount of numbers in ascending / declining then we can use sorting algorithms are available as Bubble Sort, Merge Sort, Quick Sort and so on. In addition, we can also designing new algorithms are efficiently for problems more specifically again.
- From the theoretical aspect, the algorithm is an important part of Learning Computer Science / Computer Science. learning algorithm itself is the core of Information Engineering and shall be understood by the students before the study subjects advanced level.
As an example of how important the algorithm, we consider only There are two different types of computers: A and B. Computer A is computer is very fast and is able to process data as 10 billion instructions in one second, while computer B is ordinary computers are only able to process the data as much as 10 million instructions in 1 second. In other words, the computer A more 1000 times faster than computer B. Now we suppose that each computer will be sort 10 million numbers. A computer will use the algorithms sorting X while computer B will use algorithms sorting Y. Algorithm X in theory, the efficiency of is c1n2 (meaning for example for every 5 numbers sorted, The algorithm takes second c152 = c125, c1 is a constant that depends on the application), while Y, the efficiency of the algorithm is the c2n lg n.
To dramatize again, let's assume X algorithm written by highly reliable programmer using the language machine is so efficient that is application 2n2 as where as the efficiency of the algorithm Y written by programmers mediocre by using a programming language inefficient that its application has high efficiency 50n lg n.
Now we compare the second computer when sort 10 million numbers.
Computers A will take: From the simple example above we can draw the conclusion that a good algorithm can beat the bad algorithms run in a very bad condition if put it very big at all.
No comments:
Post a Comment