Skip to content
Hi, Bot

The math under the botStop 4 of 6

› Ages 8–16 · about 20 minutes

Routes and rules

Discrete mathematics, graphs, and automata

An agent is a handful of modes, and rules for which arrow you may take.

Tonight

Some jobs are a path with a clear first step: do this, then that, then stop. Some jobs are a machine with a few modes — waiting, working, stuck, done — and events that switch the mode. An agent that calls a tool is that machine. If the rules allow a loop, it can try again. A yes-or-no game is a tree: one path from the first question to each answer.

Say it in one sentenceAn agent is a map of modes, plus the arrows the rules allow.

Already in the library

Textbook names

For ages 13–16 and the grown-up. One sentence each. The picture above is the lesson.

Graph
Dots, and the arrows between them. Towns and roads. Modes and switches.
Directed acyclic graph
Arrows that cannot loop back, so there is always a first step.
Finite state machine
A handful of modes, and the events that move you from one to another.
Grammar
A shape a sentence or a file has to match. A model can be held inside that shape while it writes.
Tree
A graph with one path between any two dots. Twenty questions is a tree.

The rest of this field

Propositional logic and satisfiability check whether a set of rules can all be true at once. Tokenizers — the tables that cut text into pieces — are another discrete structure: merges, looked up like a dictionary.