# Algorithmic Thinking

> Source: https://modeladay.com/models/algorithmic-thinking/
> Category: principle | Topics: cognition, science | Difficulty: 3/5

## Definition

Algorithmic Thinking: cutting problems into clear, finite, repeatable steps and deliberately trading off correctness, speed and cost. It turns one-off flashes into reusable, improvable, delegable process.

## Core Rule

Algorithmic Thinking: cutting problems into clear, finite, repeatable steps and deliberately trading off correctness, speed and cost. It turns one-off flashes into reusable, improvable, delegable process.

## Opening Context

Edsger Dijkstra sat down on a café terrace in Amsterdam with a problem on his mind. What was the shortest route from Rotterdam to Groningen? He later recalled that he had no pencil or paper with him.

Think of all the turns between those two cities. Would he have to try every route before he could be sure he'd found the shortest?

Algorithmic thinking is turning a problem into rules you can follow to an answer in a finite number of steps. We'll follow Dijkstra through a few junctions. Then we'll see how running the steps quickly can still take you somewhere you didn't want to go.

## How It Works (Preview)

First, draw a map the machine can work with. In his nineteen fifty-nine paper, Dijkstra used points for places and links for the distances between them. Each distance was nonnegative. Given that map, he wanted to get from the start to the destination with the shortest total distance.

Picture a ripple moving out from the start. Write down the distances to the neighboring points. Pick the closest point whose final distance you haven't settled yet, settle it, and update any neighboring distances you can improve by going through it. Then do it again.

## When It Fails (Preview)

Getting to the end of a procedure tells you the steps ran. Now check whether it was the right procedure to run.

## Full Lesson, Audio & Practice

Get the full Algorithmic Thinking breakdown, 5-minute audio lesson, interactive mechanism animation, and decision checklist in the ConceptFlow app:
- iOS App Store: https://apps.apple.com/app/conceptflow-mental-models/id6756862333
- Google Play: https://play.google.com/store/apps/details?id=com.juxianyp.conceptflow
- Web page: https://modeladay.com/models/algorithmic-thinking/

## Related Mental Models

- [Goodhart's Law](https://modeladay.com/models/goodharts-law/)
- [Bottleneck](https://modeladay.com/models/bottleneck/)
- [Diminishing Returns](https://modeladay.com/models/diminishing-returns/)
