View random article

What Is an Algorithm?

In a nutshell, an algorithm is like a map—a set of instructions that leads one from a known beginning to a predictable ending. It is often associated with computer programs. The algorithm provides the machines with directions on what, how and when to execute a command. Or, in other words, it provides both a list of actions and the proper sequencing.

However, an algorithim can also refer to any instructions, from the recipe of a cookie to the user’s manuals that come with those packages that are labeled “some assembly required.” A bad algorithim can give such poor instructions that a simple command may fail, or take much longer than necessary to accomplish, or create a faulty product.

Algorithms can be very simple, or very complex. Those who study the human brain say that every single human act or behavior, such as choosing what to eat for lunch to falling in love, can be traced to an algorithm.

There are different kinds of algorithms. While there are no strict categories, most experts have (by commonly accepted practice) tend to group certain algorithms which share particular characteristics.

Some algorithms are a described by how they approach a problem. “Greedy” algorithms search for ideal solutions; “brute force” algorithms begin at a random point before doggedly going through every possibility until it reaches a solution; “dynamic” algorithms access old data to speed up the process of computing new ones. “Simple Recursive” algorithms computes for a direct solution before searching for an easier one.

Featured in Science