Home Lex Fridman Episode Notes
Lex Fridman · Sep 9, 2021 · 2h 21m

Donald Knuth: Programming, Algorithms, Hard Problems & the Game of Life | Lex Fridman Podcast #219

Donald Knuth reflects on a lifetime of programming, beauty in algorithms, free will in the Game of Life, and the meaning of life.

Donald Knuth: Programming, Algorithms, Hard Problems & the Game of Life | Lex Fridman Podcast #219
The Guest

Donald Knuth — Legendary computer scientist, Turing Award winner, father of algorithm analysis, author of The Art of Computer Programming, and creator of the TeX typesetting system.

The gist

In his second appearance on the podcast, Donald Knuth tells Lex Fridman the story of his first program written in 1957 decimal machine language on an IBM 650, including a tic-tac-toe program that learned to play. The conversation ranges across what makes a program beautiful, literate programming, premature optimization, and the limits of automation and AI. Knuth shares memories of John Conway and the surreal-numbers week, the Knuth-Morris-Pratt algorithm, and the hardest problem he ever solved: the birth of the giant component in random graphs. He closes with personal reflections on his 60-year marriage, Feynman, productivity, and his belief in something beyond human understanding.

Books & Gear Mentioned Here

Direct Amazon links to verified books and tools discussed in this episode.

Physically Based Rendering
Matt Pharr
Check Price on Amazon
The Art of Computer Programming
Donald Knuth
Check Price on Amazon
Surreal Numbers
Donald Knuth
Check Price on Amazon

Affiliate links: we may earn a commission at no extra cost to you.

Big reveals

  • Knuth says the IBM 650 manual was so badly written he figured he must have a talent for computing because he could write a better one.
  • His goal with his first program wasn't to find a large prime but just to see the lights flash and understand the magical machine.
  • Knuth reacts skeptically to OpenAI Codex/Copilot, worrying we are losing more and more control over what machines do.
  • He declares he is on the side of honor, happiness, and understanding, and would never recommend a student work on autonomous weapons.
  • On consciousness and whether the mind exceeds computation, Knuth insists it is unanswerable and that he is no better placed than anyone to say.
  • He describes writing Surreal Numbers in a single intense week in an Oslo hotel, feeling like he was channeling, then losing the muse entirely.
  • The denominator 23023 factoring into 7x11x13x23 was the clue that cracked the giant-component problem for him.
  • Knuth states his belief that God exists and that he tries to resonate with something beyond human understanding.
Top Book Highlighted in This Episode

Physically Based Rendering

by Matt Pharr

“they should also look up this book by called physically based rendering by matt farr and anyway it got an academy award”

Things worth remembering

  • Knuth's third program was a self-learning tic-tac-toe with three 'brains'; it converged to a safe draw after about 600 games.
  • Charles Babbage had planned to program tic-tac-toe for his unfinished machine over a hundred years earlier.
  • A Fortran compiler Knuth studied spent more than 80% of its time reading the comments card, illustrating premature optimization.
  • John Conway wondered whether it was immoral to shut the computer off after an interesting play of the Game of Life.
  • During a party, Conway invented a lattice theory of stable marriages that Knuth used in his lecture the next day.
  • Knuth says he never really enjoyed kissing until he found how his wife Jill did it; they have been married 60 years.
  • Feynman challenged Knuth's arrow notation by asking about complex numbers of arrows.
  • Knuth wrote a paper titled 'Automata Theory Can Be Useful' after a stack-automaton theorem helped him crack string matching.
  • Bill Gates visited Stanford and was impressed by Knuth's giant-component explanation while being pitched to fund a CS building.
  • Knuth says the most important thing he learned was how to be interested in almost anything and never bored.

Podcasts, media & links mentioned

TeXProduct · Donald Knuth
GollyMedia · Andrew Trevorrow and Tomas Rokicki
MasyuMedia · Nikoli
Ubuntu LinuxProduct · Canonical
Adobe PhotoshopProduct · Adobe

Quick Episode FAQ

What is Donald Knuth: Programming, Algorithms, Hard Problems & the Game of Life | Lex Fridman Podcast #219 about?

Aired Sep 9, 2021 on Lex Fridman Podcast (2h 21m). Donald Knuth reflects on a lifetime of programming, beauty in algorithms, free will in the Game of Life, and the meaning of life. Core topics include computer science, algorithms, programming, TeX and typography.

What books were recommended on Donald Knuth's Lex Fridman episode?

Endorsed books from this episode include Physically Based Rendering by Matt Pharr, The Art of Computer Programming by Donald Knuth, Surreal Numbers by Donald Knuth. Every title above is paired with its speaker quote and YouTube timestamp.

Explore topics

Related episodes to explore next

3 Books & Gear MentionedIncludes Physically Based Rendering
View List