# How Algorithms Run the World We Live In

*This is the first article in a seven-part series on Algorithms and Computation, which explores how we use simple binary numbers to power our world*

If you were old enough to experience the first wave of personal computers in the 1980s, you have lived through probably the single most significant revolution in human technology since the invention of the wheel. The computational power in the cheapest mass produced smartphone is exponentially more powerful than anything that existed in the early days of computing. The software that powered the Apollo mission that put a man on the moon was about as sophisticated as an app on your phone is today. All of it powered by algorithms that harness the incredible power of modern processors to accomplish the seemingly impossible.

## What Are Problems?

First, what do we mean when we use the term problem? In computer science, a problem **is a task that when it is solved produces the desired result**. This is math-speak for the problem is the barrier between your current position or state and position or state you want to be in. The barrier between you and your destination is the problem. What you need now is a door that turns a problem into a process that ends with you being in the desired position or state.

**RELATED: KATIE BOUMAN: THE BRILLIANT MIND THAT BROUGHT US THE IMAGE OF A BLACK HOLE**

We all know that computers are essentially calculators, adding, subtracting, and otherwise manipulating **1s** and **0s** to do everything from process text documents to stream *Game of Thrones*. It’s an intricate ballet between your processor, software, your computer’s hardware, and the various input devices that create a give and take that produces all of it. At its core, however, everything computers do revolve around the simple task of solving a problem by building the bridges between their state and their desired one.

What’s the** product** of **6 and 13**? What’s the **sum** of all the numbers between **120 and 226**? What is the **remainder** produced by the **division** of **14738 by 19**? These are all problems, and they are the building blocks of our video games, our productivity software, and our streaming entertainment. The answers to these problems combine with other, similar solutions to other problems which then go on to solve even bigger, more complicated ones after that.

The problem of producing the schedules for a business’s employees every week with the lowest labor cost possible, finding the shortest route to our destination from wherever we are at any given moment, or any other task that computers perform that we now mostly take for granted are all ultimately composed of these smaller subproblems whose solutions add up to the larger solution to the bigger problem we face.

All of it is driven by **solving mathematical and logical problems**, and those solutions, the doors in the mathematical or logical barriers, are produced by something called an **algorithm**.

## What is an Algorithm?

The term **algorithm** has been wildly misused in recent years, so its important to clarify what it means. An **algorithm** is a series of steps taken to solve a specific, discrete problem. Google Search is powered by an **algorithm**, but only in the way that a Matryoshka doll is a doll. Google Search is actually powered by an **algorithm** on top of dozens of **algorithms** on top of dozens of other **algorithms**, all solving a specific subproblem of the larger problem and working together in a single process or program to return the search results of a query.

Facebook’s Newsfeed, Instagram, YouTube, Call of Duty, they are all built from **algorithms** solving problems for each other to produce the functionality that we desire.

Let's say you wanted to find the sum of all numbers between the numbers **m** and **n**. You could create a number called **result**, set it equal to **0**, and simply add **m** to it, then **m+1**, then **m+2** and so on until you add **n itself, **leaving the sum of all the numbers in **result**. This series of steps is the **algorithm**. Not a very *efficient* one, but we’ll save that for a later article.

**Algorithms** work programmatically, instruction by instruction, building up the door precisely as the computer itself should build it and allowing us to pass through from our **current state** to our **desired one**. They are an answer to the question: **how do I solve this specific problem?** and the answers to that question in every computer program ever created are what power so much of our modern world.

## How Algorithms Work Together to Get Things Done

Google began as an answer to a problem: how should we rank and list the results returned from matching a query term to entries in our webpage index? Google's webpage index could have millions of matching pages for a query term, so some order needed to be imposed. The unranked list of pages was Google's initial state, and they wanted a list of pages ranked so that the most authoritative pages ranked highest and so appeared first on the list, while the least authoritative ranked lowest and so were pushed to the very bottom.

The problem google needed to solve then was, how do you rank a webpage?

The **algorithm** that Larry Page and Sergei Brin developed in the mid-90s is called **PageRank**, and it served as the engine that powered Google Search through the early years of the company. Google was soon outperforming every other search engine on the internet, including several who had a few years head start on them, eventually dominating their competition and making both Page and Brin incredibly wealthy while helping to turn Google into a verb.

We mentioned before how Google’s Search engine is an algorithm but its also much more than that. That's because Google Search has grown much more sophisticated over the years rather than just relying on **PageRank; PageRank **is now getting a lot more help than it had in the **early 2000s** from** dozens**, **even hundreds**, of additional algorithms to generate the best results possible.

[see-also]

You could technically design a single algorithm that runs all of what Google Search has become in all its complexity, but it would be an unwieldy, inefficient mess. Instead, Google Search is a collection of algorithms all solving distinct problems and passing off the solutions to those problems to other algorithms that need them. Before, we wrote a **basic algorithm** for the sum of all the numbers between **m** and **n**. That’s all well and good, but you could use that algorithm to help you compute **an average** as well, simply take the **result** of that algorithm and divide the **result** by the difference of **m - n** (after checking that **m - n** isn’t **zero**, of course).

In this way, algorithms become computational building blocks that can solve bigger and bigger problems by working together. It allows SpaceX to automatically dock the Dragon Crew capsule with the International Space Station and helped to solve the problem of how to stitch together petabytes of data and locate, isolate, and recover the first ever image of the event horizon of a supermassive black hole.

Working together, even simple algorithms can accomplish amazing things, but some algorithms are special and deserve recognition in their own right as being truly groundbreaking, helping to power a whole host of new technologies for decades after they were first published.

**The second part of our series on Algorithms and Computation**, **7 Essential Algorithms That Run The World***, can be found here.*

It is possible to send loved ones' ashes into space, as Star Trek actress Nichelle Nichols appears to have done when she died in July. In fact, an entire Star Trek Reunion flight is underway.