What is an Algorithm? – Definition & Examples

Algorithms are everywhere. Computers use them, your friends use them, even you use them. Learn more about what algorithms are, as well as create some algorithms of your own.
What Is an Algorithm?
An algorithm is a finite list of instructions, most often used in solving problems or performing tasks. You may have heard the term used in some fancy context about a genius using an algorithm to do something highly complex, usually in programming. Indeed, you’ve most likely heard the term used to explain most things related to computer processes. However, what would you say if I was to tell you that there is a very good chance that you, yourself, have followed an algorithm? You may have followed some algorithms hundreds or thousands of times!
A Real Life Algorithm
Have you ever baked or cooked something? One of the most obvious examples of an algorithm is a recipe. It’s a finite list of instructions used to perform a task. For example, if you were to follow the algorithm to create brownies from a box mix, you would follow the three to five step process written on the back of the box.
One of the attributes of an algorithm is that, since it is a list of instructions, there is some step-by-step process that occurs in order. Very often, the order that the steps are given in can make a big difference. Suppose we were to reorder the steps of the recipe on the back of the brownie box and told somebody to put the brownies in the oven for 22 minutes before we told them to preheat the oven. That would be silly! That’s why the ordering of the steps is very important.
Example in Math & Computer Science
One of the most common uses for algorithms is in computer science. Computers can’t do anything without being told what to do. Algorithms allow us to give computers step-by-step instructions in order to solve a problem or perform a task. For example, let’s consider the following algorithm:
For each odd number from 1 to 9, multiply it by 2 and add 7 to it. Then, write out the results as a list separated by commas.
How would we start to follow this algorithm? Well, it first says that for each odd number from 1 to 9, multiply it by 2 and add 7 to it. Remember, we need to follow the steps in the order they are given. We first start out with the first odd number, which is 1. Let’s multiply it by 2 and then add 7 to get 9. Then, we go to the next odd number, 3. Let’s multiply it by 2 and add 7 to get 13. We repeat this process for 5, 7, and 9. Once we finish that, we want to write out the results as a list separated by commas. Therefore, our final output is 9, 13, 17, 21, 25.
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”

The post What is an Algorithm? – Definition & Examples appeared first on Superb Professors.

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"