Algorithms such as the word most people, not something that is only associated with the computer world only. The algorithm is also applicable in everyday life. This time I want to discuss an example that may seem not "commonly" used to give an idea of the algorithm:-D.
Some simple examples of algorithms that can be encountered in daily life - the day for example:
1. Making Tea
The process is as follows: prepare equipment such as spoons, cups, tea and sugar (of course), put the tea and sugar in a cup, put hot water into a cup, stir until sugar and tea mixture, and tea ready to drink ...: D (koq so pengen yah tea?: D)
2. Call
The process is as follows: pick up the phone, press the phone number:
· If removed then start talking when you're done hang up
· If not removed, then hang up
And many more examples - simple example of an algorithm that can be encountered in daily life - days.
Programming Algorithm
Now we start talking about programming algorithm.
- typical characteristics of the algorithm as described by Donald E. Knuth:
· algorithm has a beginning and end.
· Each step must be defined precisely so that no double meanings (ambiguity).
· Having input (input) or initial conditions.
· Having output (output) or the end.
· algorithm must be effective, when used correctly - really solve the problem.
I myself was not really agree with it - things like that that seem too restrictive. Because there are actually many ways to produce something without having to follow rules that are "standard" / one rule that impressed binding, right? But if one wants to "act" as has been described above, it is legitimate - legitimate only.
Tidak ada komentar:
Posting Komentar