An algorithm is a set of instructions that are designed to achieve some goal. A recipe for chicken soup is an algorithm for making chicken soup, for example. In this case, the thing executing the algorithm is a person. Software is also a set of instructions, for example, an mp3 player is the set of all the instructions necessary for playing an mp3 file. In software, the thing executing the instructions is the computer.
A computer program typically consists of many algorithms, but it’s also possible to write a program that is just a single algorithm doing its job and terminating. In other words, usually a computer program is like an entire restaurant that not only makes chicken soup, but many other food algorithms, and even has waiter algorithms running around delivering the food, but a computer program can also be just one guy with a street stand making nothing but chicken soup.
Latest Answers