Skip to content
Hi, Bot

Hi, Bot · First Principles · Phase 4: Many dimensions

Lesson 35 of 48

Graphs, DAGs, tensors

The structures a modern model is actually made of.

A computation graph is a DAG, and the “acyclic” part is what makes evaluation — and later, differentiation — possible in one pass. Add one back-edge and the whole thing becomes unanswerable.

Do this

Represent an arithmetic expression as a directed acyclic graph, topologically sort it, and evaluate it by walking that order. Then add an edge that creates a cycle and see what breaks.

The question that unlocks the next lesson

Why must a computation graph be acyclic?

  • ACycles make the graph larger
  • BA cycle means a value depends on itself, so no evaluation order exists
  • CAcyclic graphs use less memory
  • DCycles are fine — frameworks handle them

Start at lesson 1 and work up to this one

48 lessons, one a day. Answer each lesson's question correctly and the next one opens immediately — nothing here is unlocked by waiting.

By submitting, you agree to our Terms and Privacy Policy.