Algorithms
This is an introduction to Algorithms. This is he first entry for the many lessons I will be adding later for this Algotithms section. Here we shall be exploring the very basic of Algorithms and understanding the use and properties of an algorithm.
What is an Algorithm?
Very often you use Algorithms without realising it. Am algorithm is a set of precise instructions which can be used to solve a problem. The following is an example of an Algorithm.
Example
We can write an algorithm as a series of steps.
Step 3: If B<A increase B by 1 and return to step 2. Otherwise go to step 4.
Step 4: Stop/End process.
Another example
Step 3: If A<B let B=B-A
Step 4: If A=B go to step 5 otherwise go to step 2.
Step 5: Print A and stop process.
Some Algorithm can be very complex and efficient than the simpler ones. They might have more calculations which are sometimes complex.
As you can see algorithms are very easy to write. You can try to write your own. Don’t worry about using clever notations, just make sure it’s clear and simple as much as possible.
Not all algorithms come in English notation. Some can be almost human unreadble like computer codes. Such as this.