Skip to content
Donald Knuth: Algorithms, Complexity, and The Art of Computer Programming | Lex Fridman Podcast #62
This video isn’t embeddableWatch on YouTube →
Lex Fridman PodcastLex Fridman Podcast

Donald Knuth: Algorithms, Complexity, and The Art of Computer Programming | Lex Fridman Podcast #62

Donald Knuth is one of the greatest and most impactful computer scientists and mathematicians ever. He is the recipient in 1974 of the Turing Award, considered the Nobel Prize of computing. He is the author of the multi-volume work, the magnum opus, The Art of Computer Programming. He made several key contributions to the rigorous analysis of the computational complexity of algorithms. He popularized asymptotic notation, that we all affectionately know as the big-O notation. He also created the TeX typesetting which most computer scientists, physicists, mathematicians, and scientists and engineers use to write technical papers and make them look beautiful. Thank you for listening ❤ Check out our sponsors: https://lexfridman.com/sponsors/ep62-sb See below for timestamps, and to give feedback, submit questions, contact Lex, etc. *CONTACT LEX:* *Feedback* - give feedback to Lex: https://lexfridman.com/survey *AMA* - submit questions, videos or call-in: https://lexfridman.com/ama *Hiring* - join our team: https://lexfridman.com/hiring *Other* - other ways to get in touch: https://lexfridman.com/contact *OUTLINE:* 0:00 - Introduction 3:45 - IBM 650 7:51 - Geeks 12:29 - Alan Turing 14:26 - My life is a convex combination of english and mathematics 24:00 - Japanese arrow puzzle example 25:42 - Neural networks and machine learning 27:59 - The Art of Computer Programming 36:49 - Combinatorics 39:16 - Writing process 42:10 - Are some days harder than others? 48:36 - What's the "Art" in the Art of Computer Programming 50:21 - Binary (boolean) decision diagram 55:06 - Big-O notation 58:02 - P=NP 1:10:05 - Artificial intelligence 1:13:26 - Ant colonies and human cognition 1:17:11 - God and the Bible 1:24:28 - Reflection on life 1:28:25 - Facing mortality 1:33:40 - TeX and beautiful typography 1:39:23 - How much of the world do we understand? 1:44:17 - Question for God *PODCAST LINKS:* - Podcast Website: https://lexfridman.com/podcast - Apple Podcasts: https://apple.co/2lwqZIr - Spotify: https://spoti.fi/2nEwCF8 - RSS: https://lexfridman.com/feed/podcast/ - Podcast Playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 - Clips Channel: https://www.youtube.com/lexclips *SOCIAL LINKS:* - X: https://x.com/lexfridman - Instagram: https://instagram.com/lexfridman - TikTok: https://tiktok.com/@lexfridman - LinkedIn: https://linkedin.com/in/lexfridman - Facebook: https://facebook.com/lexfridman - Patreon: https://patreon.com/lexfridman - Telegram: https://t.me/lexfridman - Reddit: https://reddit.com/r/lexfridman

Lex FridmanhostDonald Knuthguest
Dec 30, 20191h 45mWatch on YouTube ↗

EVERY SPOKEN WORD

  1. 0:003:45

    Introduction

    1. LF

      The following is a conversation with Donald Knuth, one of the greatest and most impactful computer scientists and mathematicians ever. He's the recipient of the 1974 Turing Award, considered the Nobel Prize of computing. He's the author of the multi-volume work, the magnum opus, The Art of Computer Programming. He made several key contributions to the rigorous analysis of computational complexity of algorithms, including the popularization of asymptotic notation that we all affectionately know as the Big O notation. He also created the TeX typesetting system, which most computer scientists, physicists, mathematicians, and scientists and engineers in general use to write technical papers and make them look beautiful. I can imagine no better guest to end 2019 with than Don, one of the kindest, most brilliant people in our field. This podcast was recorded many months ago. It's one I avoided because, perhaps counterintuitively, the conversation meant so much to me. If you can believe it, I knew even less about recording back then, so the camera angle is a bit off. I hope that's okay with you. The office space was a bit cramped for filming, but it was a magical space where Don does most of his work. It meant a lot to me that he would welcome me into his home. It was quite a journey to get there. As many people know, he doesn't check email, so I had to get creative. The effort was worth it. I've been doing this podcast on the side for just over a year. Sometimes I had to sacrifice a bit of sleep, but always happy to do it, and to be part of an amazing community of curious minds. Thank you for your kind words of support and for the interesting discussions, and I look forward to many more of those in 2020. This is the Artificial Intelligence Podcast. If you enjoy it, subscribe on YouTube, give us five stars on Apple Podcast, follow on Spotify, support on Patreon, or simply connect with me on Twitter @lexfridman, spelled F-R-I-D-M-A-N. I recently started doing ads at the end of the introduction. I'll do one or two minutes after introducing the episode, and never any ads in the middle that break the flow of the conversation. I hope that works for you and doesn't hurt the listening experience. I provide timestamps for the start of the conversation that you can skip to, but it helps if you listen to the ad and support this podcast by trying out the product or service being advertised. This show is presented by Cash App, the number one finance app in the App Store. I personally use Cash App to send money to friends, but you can also use it to buy, sell, and deposit Bitcoin in just seconds. Cash App also has a new investing feature. You can buy fractions of a stock, say $1 worth, no matter what the stock price is. Brokerage services are provided by Cash App Investing, a subsidiary of Square and member SIPC. I'm excited to be working with Cash App to support one of my favorite organizations called FIRST, best known for their FIRST Robotics and Lego competitions. They educate and inspire hundreds of thousands of students in over 110 countries, and have a perfect rating on Charity Navigator, which means the donated money is used to maximum effectiveness. When you get Cash App from the App Store or Google Play and use code LEXPODCAST, you'll get $10 and Cash App will also donate $10 to FIRST, which again is an organization that I've personally seen inspire girls and boys to dream of engineering a better world. And now, here's my conversation with Donald Knuth.

  2. 3:457:51

    IBM 650

    1. LF

      In 1957 at Case Tech, you were once allowed to spend several evenings with a IBM 650 computer, as you've talked about in the past, and you fell in love with computing then.

    2. DK

      Yeah.

    3. LF

      Can you take me back to that moment with the IBM 650? What, what was it that grabbed you about that computer?

    4. DK

      So the IBM 650 was this, this machine that, uh... Well, it didn't fill a room, but it, it was, it was big and noisy. But when I first saw it, it was through a window and there were just a lot of lights flashing on it. And, uh, I was a freshman. I had a job, uh, with the statistics group, and I was supposed to punch cards and s- a- a- for data and then sort them on another machine. But th- they got this new computer came in and I... and, um, it had, uh, interesting l- you know, lights, okay. So well...

    5. LF

      (laughs)

    6. DK

      ... but I had, I had a key to the building, so I can, you know, I, I could get in and look at it and got a manual for it. And, and, uh, my first experience was based on the fact that I could punch cards basically, which was a big thing for the... But the, but the IBM 650 heck was, uh, you know, big in size, but, but, uh, i- i- i- incredibly small in power-

    7. LF

      In resources.

    8. DK

      ... uh, in memory.

    9. LF

      Yeah.

    10. DK

      It, it had, it had 2,000 words of memory, and, and a word of memory was ten decimal digits plus a sign. And it, it would do, uh... To add two numbers together, you could probably expect that would take, oh, say three milliseconds. So th-

    11. LF

      Still pretty fast. It's... The memory is the constraint, the memory is the problem.

    12. DK

      That was why it was... it took th- three milliseconds, because it took five milliseconds for the drum to go around, and (laughs) you had to wait, I don't know, five cycle times. If, if you have an instruction, uh, in one position on the drum, then it would be ready to read the data for the instruction and, and, uh, uh, y- you know, go th- th- three notches. The, the drum is 50 cycles around, and you go three cycles, e- e- and you can get the data, and then you can go another three cycles and get, and get to your next instruction.... if the instruction is there. Otherwise, you, otherwise, you spin until you get to the, to the right place. And it, and we had no, uh, random access memory whatsoever until my senior year. In my senior year, we got 50 words of random access memory-

    13. LF

      Ooh.

    14. DK

      ... which were, which were priceless, and we would w- and we would move stuff up to the, up, up to the, uh, random access memory in, in 60-word chunks and then we would start again so s- subroutine wouldn't go up there and ...

    15. LF

      Could you have predicted the future 60 years later of computing-

    16. DK

      No.

    17. LF

      ... from then?

    18. DK

      No. Y- you know, in fact, the hardest question I was ever asked was, uh, "What could I have predicted?"

    19. LF

      Mm-hmm.

    20. DK

      In other words, the interviewer asked me, she, she said, you know, uh, y- you know, "What about computing has surprised you?" You know, and immediately-

    21. LF

      (laughs)

    22. DK

      ... I ran, I rattled off a couple of dozen things, and then she said, "Okay, so what didn't surprise you?" And I, I was, I tried for five minutes to, to think of something that I, that I would have predicted and I, and I, and I couldn't. All right. But I, let me say that this machine, I didn't know, well, well, it, there wasn't, there wasn't much else in the world at that time. The 650 was the first machine that was, that there were more than 1,000 of ever.

    23. LF

      Mm-hmm.

    24. DK

      And before that, there were, you know, there was, uh, each machine there might be a half a dozen examples, maybe, maybe-

    25. LF

      It's the first mass market-

    26. DK

      ... maybe a couple of dozen.

    27. LF

      ... mass produced.

    28. DK

      It was the first one that, yeah, th- done in quantity. And, uh, and IBM, uh, didn't sell them, they, they rented them, but, but they, they rented them to universities at, at great, uh, uh, you know, had, had a great deal.

    29. LF

      Mm-hmm.

    30. DK

      And, and so that's why, uh, uh, a lot of students learned about computers at that time.

  3. 7:5112:29

    Geeks

    1. DK

    2. LF

      So you-

    3. DK

      Mm-hmm.

    4. LF

      ... refer to people, including yourself, who, uh, gravitate toward a kind of computational thinking as geeks. I've he- at least I've heard you use that terminology.

    5. DK

      It, it, it's true that I think there's something that happened to me as I was growing up that made my brain, uh, uh-

    6. LF

      (laughs)

    7. DK

      ... structured in a certain way that, that resonates with, with computers.

    8. LF

      So there's this space of people, it's 2% of the population, you empirically estimate.

    9. DK

      That, that's a per- per- that's been-

    10. LF

      Proven? (laughs)

    11. DK

      ... fairly constant over most of my career. However, uh, it might be different now because kids have different experiences when they're young.

    12. LF

      So-

    13. DK

      I'm just saying. (clears throat)

    14. LF

      ... what does the world look like to a geek? What is, what is this aspect-

    15. DK

      (clears throat)

    16. LF

      ... of thinking that is, uh, unique to, uh-

    17. DK

      That makes, they, yeah.

    18. LF

      ... that makes a geek?

    19. DK

      Th- this is hugely important question. In, in the '50s, IBM noticed that, that, uh, there were geeks and non-geeks and so they tried to hire geeks (laughs) and they, and they put out ads with papers saying, you know, "If you play chess, come to Madison Avenue-"

    20. LF

      (laughs)

    21. DK

      "... and for an interview," or something like this.

    22. LF

      Right.

    23. DK

      You know, they were, they were trying for some things. So what did, what, what is it that I find easy (laughs) and other people tend to find harder? And, and I think there's two main things. One is this, uh, (laughs) with, is, uh, ability to, to jump, jump levels of, of, uh, abstraction. Uh, so you see something in the large, uh, and you see something in the small and, and, uh, y- and you pass between those, uh, uh, unconsciously. So you, you, you know that in order to solve a, some big problem, what you need to do is add one to a, uh, in, to a certain register and it, and that gets you to, to another step. And it, and, and, be, and below the... Yeah. I mean, I don't go down to the electron level, but I knew what those milliseconds were, what the drum was like on the 650. I knew how I was gonna factor a number or, or find a root-

    24. LF

      Mm-hmm.

    25. DK

      ... of an equation or something-

    26. LF

      The algorithm.

    27. DK

      ... be- because of what was doing. And, and as I'm debugging, I'm going through y- you know, did I make a key punch error? Did I, (laughs) did I, uh, write the wrong instruction? Do I have the wron- wrong thing in the register? And each level, it, e- e- each level it, uh, is different and, uh, so this idea of being able to see something at, at all, at, at lots of levels, uh, and fluently go between them seems to me to be s- more pronounced, much more pronounced in the, i- in the people that resonate with computers like, like I... So in my books, I also don't stick just to the high level but, but-

    28. LF

      Yeah.

    29. DK

      ... I, but I, I, I mix, uh, low level stuff with high level and this, uh, uh, means that some people think, uh, you know, that, uh, that, uh, I should write better books. Uh, and that's probably true but, but other people say, "Well, but that's, if, if you think like, like that, then that's the way to train yourself, right? To keep mixing the levels and, and learn more and more how to jump between." So that, that's the one thing. The other, the, the other thing is that it's more of a talent, uh, th- uh, it, uh, to be able to deal with, um, uh, non-uniformity where, where, wh- where there's case one, case two, case three, uh, instead of, in- instead of having one or two rules that govern everything. Uh, so, so it, s- so it, it doesn't bother me if I need, uh, uh, like an algorithm ha- has 10 steps to it, you know, each step-

    30. LF

      Mm-hmm.

  4. 12:2914:26

    Alan Turing

    1. LF

      ... What influence has Turing had on you? What-

    2. DK

      Well, okay, so-

    3. LF

      ... in your way of thinking?

    4. DK

      ... I didn't know that aspect of him until after I graduated some years. Uh, it, as an undergraduate, we had a, a, a, a class that talked about computability theory and Turing machines, and, and it was all ... It, it sounded like a very specific kind of purely theoretical-

    5. LF

      Mm-hmm.

    6. DK

      ... uh, a- approach to stuff. So when ... How old was I when I li- when I learned that he, that he had a, a, you know, a design machine (laughs) , and that he wrote the ... You, you know, he wro- he wrote a wonderful manual for, for Manchester Machines, and, uh, and he invented all c- uh, you know, s- sub-routines and, and (laughs) , and he was a real hacker, that-

    7. LF

      Mm-hmm.

    8. DK

      ... that he got, had his hands dirty. The, uh, I, I thought for many years that he had only done p- purely formal work. A- as I started reading his own publications, I could s- I could, you know, I could feel this kinship, um-

    9. LF

      Hmm.

    10. DK

      ... and, and, of course he had a lot of peculiarities, uh, like he wrote numbers backwards because c- ... I mean, l- left to right instead of right to left, because that's the, that's ... It was easier for computers to process them that way.

    11. LF

      What do you mean left to right?

    12. DK

      He would write pi (laughs) as, you know, 9514.3.

    13. LF

      Oh, wow.

    14. DK

      I mean, okay?

    15. LF

      Okay. (laughs)

    16. DK

      Uh, uh-

    17. LF

      Right. Uh, got it.

    18. DK

      ... or, or 41.3 or so (laughs) on the blackboard. I mean, when he, he ... (laughs) Like, uh, he, he had trained himself to, uh, uh, to do that because the computers he was working with, uh, uh, worked that way inside.

    19. LF

      Trained himself to think like a computer?

    20. DK

      Yeah.

    21. LF

      Well, there you go. That's-

    22. DK

      Mm-hmm.

    23. LF

      ... that's geek thinking.

    24. DK

      Yeah.

  5. 14:2624:00

    My life is a convex combination of english and mathematics

    1. DK

    2. LF

      You've practiced some of the most elegant formalism in computer science, and yet you're the creator of a concept like literate programming, which seems to move closer to natural language type of description of programming.

    3. DK

      Abs- ... Yeah, absolutely the-

    4. LF

      So how do you see those two as conflicting, as the-

    5. DK

      Well-

    6. LF

      ... formalism of theory, and the idea of literate programming?

    7. DK

      So there, there we are in a non-uniform system where I don't-

    8. LF

      (laughs)

    9. DK

      ... where I don't think one, one size fits all, and I don't, uh, and I don't think a- all truth lies in one, in one kind of expertise. And so s- somehow ... In, in a way you'd say my li- my life is a convex combination of English and mathematics. Uh-

    10. LF

      And you're okay with that?

    11. DK

      And not only that, I th-

    12. LF

      Thrive in it.

    13. DK

      I wish ... You know, I want my kids to be that way.

    14. LF

      (laughs)

    15. DK

      I want them, et cetera, you know?

    16. LF

      Yeah.

    17. DK

      Not ... Use left brain, right brain at the same time, uh, y- you get a lot more done. That's, that was part of the (laughs) , s- part of the bargain.

    18. LF

      And I've heard that you didn't really read for pleasure until into your 30s, and-

    19. DK

      Yeah, that-

    20. LF

      ... you know, literature.

    21. DK

      That's true. You know more about me than I do, but I, I'll-

    22. LF

      That's true.

    23. DK

      ... try to be consistent with what you read.

    24. LF

      Yeah, no, just believe me. I, uh ...

    25. DK

      (laughs)

    26. LF

      Just go with whatever story I tell you.

    27. DK

      (laughs)

    28. LF

      It'll be easier that way. The conversation will be easier (laughs) .

    29. DK

      Right, yeah, no, that's true. Yep, yep.

    30. LF

      So I've heard mention of Philip Roth's American Pastoral, which I, I love as a book. Uh, m- I don't know if ... It was, it was mentioned as something, I think, that was meaningful to you as well. W- uh, i- in either case, what literary books had a lasting impact on you? What literature, what poetry?

  6. 24:0025:42

    Japanese arrow puzzle example

    1. LF

    2. DK

      Well, (laughs) it's a little too complicated an example. There, there, there's a puzzle that's self-referential. It's called a Japanese arrow puzzle. And, uh, and, and you're given a, a bunch of boxes. Each one points north, east, south, or west. And at the end, you're supposed to fill in each box with the number of...... distinct numbers that it points to.

    3. LF

      Mm-hmm.

    4. DK

      So, if I put a three in a box, that means that, and, and it's pointing to five other boxes, that means that there's going to be three different numbers in those five boxes.

    5. LF

      Mm-hmm.

    6. DK

      And, uh, and those boxes are pointing, uh, one might be pointing to me, one of them might be pointing the other dir- the other way. But anyway, I, it, yeah, I, I'm supposed to find this set of numbers that obeys this, this complicated con- condition that each number counts how many distinct numbers, uh, it, it points to. Well, um, and, uh, so a guy sent me his solution to this problem, where he, uh, where he, um, uh, uh, presents formal statements that, that, that say either this is true or this is true or this is true.

    7. LF

      Mm-hmm.

    8. DK

      And, and, and so I try to render that formal statement informally, and I try to say, "I contain a three and, and, uh, uh, the guys I'm pointing to, uh, contain the numbers one, two, and six."

    9. LF

      Mm-hmm.

    10. DK

      So, by putting it informally and also I converted into a, into a dialogue statement, um, uh, that helps me understand the logical statement that he's written down as a string of numbers in terms of s- some abstract variables that he had.

    11. LF

      That's really interesting.

  7. 25:4227:59

    Neural networks and machine learning

    1. LF

      So, maybe an extension of that, there has been a resurgence in computer science and machine learning and, uh, neural networks.

    2. DK

      Yeah.

    3. LF

      So, using data to construct algorithms, so it's another way to construct algorithms, really.

    4. DK

      Yes, exactly.

    5. LF

      If you can think of it that way.

    6. DK

      Yeah, yeah.

    7. LF

      Uh, uh, so as opposed to natural language to construct algorithms, you use data to construct algorithms. So, what, uh, what's your view of this branch of computer science, uh, where data is almost more important than the, uh, mechanism of the algorithm?

    8. DK

      It seems to be, um, suited to a certain kind of non-geek, uh (laughs) -

    9. LF

      (laughs) Sure, sure.

    10. DK

      ... and which, which is probably why it's, it's, uh, uh, it's taken off. The... It has its own community-

    11. LF

      Got you.

    12. DK

      ... that, that really, that really resonates with that. But, um, it's hard to, you know, to trust something like that because nobody, e- e- even the people who, who work with it, that they have no idea what has, what has been learned.

    13. LF

      That's a really interesting thought that it's, uh, it makes algorithms more accessible to a different community, a different type of brain.

    14. DK

      Yep.

    15. LF

      And that's really interesting because, uh, just like literal programming, perhaps could make programming more accessible to a certain kind of brain.

    16. DK

      There are people who think it's just a matter of education, uh, and any- anybody can learn to be a great programmer, anybody can learn to be a great, uh, uh, uh, skier, um-

    17. LF

      (laughs)

    18. DK

      ... uh, you know. I, I, I wish that were true, but I, but I know that there's a lot of things that I've tried to do and I, and, uh, like, I was well-motivated and I kept trying to build myself up and I never got past a certain level. Uh, I, I can't view, for example, I can't view, uh, uh, three dimensional objects in my, in my head. I have to, I have to make a model and look at it and study it from all points of view, and then I start to get some idea of... But other people are good at four dimensions. I mean... (laughs)

    19. LF

      Physicists. (laughs)

    20. DK

      Yeah.

    21. LF

      So,

  8. 27:5936:49

    The Art of Computer Programming

    1. LF

      let's go to, uh, The Art of Computer Programming. In 1962, you set the table of contents for this, uh, magnum opus, right?

    2. DK

      Yep.

    3. LF

      It was supposed to be a single book with 12 chapters. Now, today, what is it? F- f- fifty, uh, seven years later-

    4. DK

      (laughs)

    5. LF

      ... you're in the middle of volume four of seven, uh-

    6. DK

      In the middle of volume 4B is-

    7. LF

      4B.

    8. DK

      ... more precisely.

    9. LF

      Can I ask you for an impossible task? Which is try to summarize the book so far, maybe by giving a, a little examples. So, from the sorting and the search and the combinatorial algorithms, if you were to give a summary, a quick elevator summary.

    10. DK

      (laughs) Elevator, that's great.

    11. LF

      (laughs)

    12. DK

      Yeah, right.

    13. LF

      Well, depending how many floors there are in the building, of course.

    14. DK

      Yeah. The first volume called Fundamental Algorithms talks about s- something that you can't... the stuff you can't do without. Uh, you have to, you have to know s- some basic concepts of, of what is a program, what is an algorithm. And, uh, and, and it also talks about a low-level machine so you can have some, some kind of an idea wh- what's going on. And it has basic concepts of input/output and, uh, sub-routines.

    15. LF

      Induction.

    16. DK

      Induction, right. It's a mathematical preliminary. So, so the thing that makes my book different from, uh, a lot of others is that I'll, that I try to not only present the algorithm, but I try to analyze them, and which means to... Quantitatively, I say not only does it work but it works this fast.

    17. LF

      Mm-hmm.

    18. DK

      Okay. And so I need math for that. And then there's, uh, the standard way to structure data inside and represent-

    19. LF

      Mm-hmm.

    20. DK

      ... information in the computer. So, that's all volume one. Uh, vol- volume two talks, it's called Semi-Numerical Algorithms, and here we're, here we're, we're, we're writing programs but we're also de- dealing with numbers. The algorithms deal with, with any kinds of objects, but, but specific... When those objects are numbers, well then, then we have certain...... special paradigms that, that apply to things that have, involve numbers. And so there's, there's, there's, there's arithmetic on numbers and, and there's matrices full of numbers, there's random numbers, and there's power series full of numbers. There's different, um, algebraic concepts that have numbers in structured ways.

    21. LF

      And arithmetic in the way a computer would think about arithmetic, so floating point-

    22. DK

      Floating point arithmetic, high precision arithmetic. Not only addition, subtraction, multiplication, but also comparison of numbers. So then ch- then volume three talks about-

    23. LF

      I like that one, sort and search.

    24. DK

      Sorting and searching. Yeah.

    25. LF

      I love sorting.

    26. DK

      Right. So s- so here, you, you, you know, we're not dealing necessarily with numbers because you s- you sort letters and other objects, and searching we're doing all the time with Google nowadays, but I mean, then you, we have to find stuff. Uh, so, uh, again, algorithms that, that underlie, uh, all kind of applications, uh, you know, n- none of these volumes is about a particular application, but the applications are examples of, uh, of why people want to know about sorting, why people want to know about random number. So then volume four goes into combinatorial, uh, algorithm. This is where we have, uh, zillions of things to deal with and we... and, uh, here we keep finding, uh, cases where one good idea can s- can make something go more than a million times faster.

    27. LF

      Mm-hmm.

    28. DK

      And, and, uh, and we're dealing with problems that are probably never gonna be solved efficiently, but that doesn't mean we give up on 'em, uh, and, and, and we have this chance to have good ideas and, and go much, much faster on 'em. So, so that's combinatorial algorithms, and those are the ones that are... yeah, I mean, you say f- sorting is most fun for you. Well, it's, it-

    29. LF

      Well, like, it's a s-

    30. DK

      It's true-

  9. 36:4939:16

    Combinatorics

    1. DK

      And s-

    2. LF

      What kind of problems were occupying people's minds? What ki- kind of problems in combinatorics? Was it s- sat-

    3. DK

      Graph theory.

    4. LF

      ... satisfiability? Graph theory?

    5. DK

      Y- y- y- yeah. Graph theory was, was quite dominant. I mean... But, uh, uh, all of the MP hard problems, uh, that you have like, ha- you know, Hamiltonian path, or-

    6. LF

      Travel salesman.

    7. DK

      G- g- going beyond, yeah, yeah, going beyond graphs you had, you had operation research, uh, whenever there was a small class of problems that had efficient solutions, and they were usually associated with matroid theory, a special mathematical construction. But once we went, uh, to things that involved three things at a time instead of, instead of two, all of a sudden things got harder, so we had satisfiability problems where if, if, if you have, if you have clauses, e- every clause has two logical elements in it then we can satisfy it in linear time. We can test for satisfiability in linear time, but if you allow yourself three variables in the clause, uh, then, uh, uh, nobody knows how to do it. So, these articles were about trying to find better a- better ways to, uh, to solve cryptography problems and graph theory problems, whereas we have lots of data but we didn't know how to find the best subsets of the data like with sorting it, uh, w- we could get the answer, i- it didn't take long.

    8. LF

      So how did it continue to change from the '70s to today?

    9. DK

      Yeah, so now there are maybe half a dozen conferences whose topic is combinatorics, different kind, but fortunately I don't have to rewrite my book every month, you know, like I had to in, in the '70s. But still there's huge amount of work being done on it and people getting better ideas on these problems that don't seem to have really efficient solutions, but we still get, do a lot more with them. And so this book that I'm finishing now is, I've got a br- a whole bunch of brand new methods that, uh, as far as I know there's no other, there's no other book that covers (laughs) , that covers this particular approach, and, and, uh, so I'm trying to do my best of, uh, exploring the tip of the iceberg, uh, and, and I, I try out lots of things and, and keep, keep rewriting, uh, finding, as I find better, better method.

  10. 39:1642:10

    Writing process

    1. DK

    2. LF

      So what's your writing process like? What's your thinking and writing process like every day?

    3. DK

      So, um-

    4. LF

      What's your routine even?

    5. DK

      My... yeah, I guess it's actually a the best question because I spend seven days a week-

    6. LF

      (laughs)

    7. DK

      ... (laughs) doing it. Uh-

    8. LF

      You're the most prepared to answer it. Yeah.

    9. DK

      Uh, yeah. But, um, okay, so, uh, uh, the chair I'm sitting in is where I do... (laughs)

    10. LF

      It's where the magic happens? (laughs)

    11. DK

      Well, uh, re- reading and writing, my chair is usually sitting over there where I have other books or some reference books but, but, uh, I found this chair, uh, which was designed by a Swedish guy anyway, it turns out this is the only chair I can really sit in for hours and hours and not know that I'm in a chair. But then I have this standup desk right next, next to us, and, and so after I write something with pencil and eraser, I get up and I type it, and revise, and rewrite, uh, uh...

    12. LF

      But...

    13. DK

      Uh, I'm standing up.

    14. LF

      The kernel of the idea is first put on paper.

    15. DK

      Yep.

    16. LF

      That's where...

    17. DK

      Right. A- and I'll write maybe five programs a week, uh, o- of course literate programming. And, uh, th- these are, before I describe something in my book I always program it to see how it's working and I, and I try it a lot. So for example, I learned, uh, at the end of January, I learned of a breakthrough by four Japanese people who had extended one of the, one of my methods in a, in a new direction, and so I, I spent the next five days writing a program to implement what they did and then I, you know, but they had only generalized part of what I had done, so then I had to see if I could generalize more parts of it, and then I, then I had to take their approach and I had to, I had to try it out on a couple of dozen of the other problems I had already worked out with my, with my old methods, and so that took another couple of weeks, and then I, you know, then I started to see the light, and I, and, uh, and- and I started writing the, th- the final draft, and, uh, and then I would, uh, type it up, involve some new mathematical questions, and so I wrote to my friends and s- who might be good at solving those pr- problems and, and, uh, they solved some of them, and so I put that in as exercises and... And so a month later, I had absorbed one new idea that I've, that I learned and, uh, you know, I'm glad I heard about it in time, otherwise my, I would have put my book out before I'd heard about the idea. On the other hand this book was supposed to come in at 300 pages and I'm up to 350 now. That added 10 pages to the book, but if I learn about another one, uh, my, my publisher is going

  11. 42:1048:36

    Are some days harder than others?

    1. DK

      to shoot me.

    2. LF

      (laughs) Well, so in the process, in that one month process, are some days harder than others?

    3. DK

      Are some days harder than others? Well, th- yeah. My work is fun but I also work hard and every big-... job has parts that are a lot more fun than others. And so, uh, uh, many days I'll say, "Why do I have to have such high standards? What, what, uh, why, why couldn't I just be sloppy and not try this out and, and, you know, just, just report the answer?" But I, but I know that, um, uh, that people are counting on me to do this. And so they're, "Oh, okay. So, okay, Don, I'll grit my teeth and do it." And, and, and then the joy comes out when I see that actually, uh, you know, I'm getting good results. And, and, and I get ... a- and I, even more when I see that somebody has actually read and understood what I wrote, and, uh, told me how to make it even better. I did want to mention, uh, something about the, um, about the method. So I got this tablet here, where ...

    4. LF

      Wow.

    5. DK

      ... where, where I do the first, y- y- you know, the first writing, uh, of, of concepts. Okay? So, so, um-

    6. LF

      And what language is that then? (laughs)

    7. DK

      It, it's like ... right. So here you can take a look at it. But, you know, here, r- and I'm saying, "Explain how to draw such skewed pixel diagrams." Okay. (laughs) . So I got this paper-

    8. LF

      Mm-hmm.

    9. DK

      ... about 40 years ago, when I was, uh, visiting my sister in Canada. And th- they make tablets of paper with this, with this nice large size and just the right stuff.

    10. LF

      And a very small space between lines.

    11. DK

      Small spaces, yeah, yeah. Take a look.

    12. LF

      Do you mind if I maybe, uh, also just show it? (laughs) .

    13. DK

      Yeah. Sure.

    14. LF

      Yeah. Wow.

    15. DK

      S- you know, I've got these manuscripts going back to the '60s.

    16. LF

      Get you out of ... yeah, yeah.

    17. DK

      (laughs) . And, and, and th- those are when I'm getting my ideas on paper, okay? But I'm a good typist. In fact, I went to typing school when I was at, uh, when I was in high school.

    18. LF

      Okay.

    19. DK

      And so I can type faster than I think. So then when I do the, the editing and, you know, stand up and type, then I, then I revise this, and, and it comes out a lot different than what, you know, for, for style and rhythm and things like that come, come out at the, at the typing stage.

    20. LF

      And you type in tech?

    21. DK

      And I type in tech, yeah.

    22. LF

      And can you s- can you think in tech?

    23. DK

      No.

    24. LF

      So-

    25. DK

      To a certain extent I have, I have only a small number of, of idioms that I use. Like I, you know, beginning a theorem, I do something for e- ... displayed equation I do something, and, and so on. But I, but I, I have to see it. And-

    26. LF

      In the way that it's on paper here?

    27. DK

      ... it's ... yeah, right. And-

    28. LF

      So for example, Turing wrote, what, The Other Direction.

    29. DK

      Mm-hmm.

    30. LF

      You don't write, uh, macros ...

  12. 48:3650:21

    What's the "Art" in the Art of Computer Programming

    1. LF

      ... what's the art in, uh, The Art of Programming? Why, why is there... Of the few words in the title, why is art one of them?

    2. DK

      Yeah. Well, that's, that's what I wrote my Turing lecture about. And, uh, and so when people talk about art, it, it really... I mean, hi- what the word means is som- something that's not in nature. So, so when you have artificial intelligence, the, the art comes from the same root, saying that this is something that was created by, by human beings. And then it's gotten a, a further meaning, uh, often of fine art, which, which adds this beauty to the, to the mix and says, you know, we have things that are artistically done, and, and this means, uh, not only done by humans but also done in a way that's elegant and, uh, brings joy and, and has, has, uh, um, I, I guess what... Tolstoy versus Dostoevsky, uh, uh-

    3. LF

      (laughs) Right.

    4. DK

      ... going b- Um, but anyway, it, it, it's that part that, that says that it's done well as well as not only, uh, uh, different from nature. In general then, um, uh, art, uh, is what human beings are specifically good at. And when they say, "Art- artificial intelligence," well, they're trying to mimic human beings.

    5. LF

      But there's an element-

    6. DK

      (laughs)

    7. LF

      ... of fine art and beauty. You are one who-

    8. DK

      That's what I, that's what I've tried to also say, that you can write a pro- a program and make a work of art. Mm-hmm.

    9. LF

      So,

  13. 50:2155:06

    Binary (boolean) decision diagram

    1. LF

      now in terms of surprising, you know, what ideas in, in writing from sort- in search to the common tutorial algorithms, what ideas have you come across that, um, were particularly surprising to you?

    2. DK

      Okay. All right.

    3. LF

      That, that changed the way you see a space of problems?

    4. DK

      Yeah. Okay. I get a surprise every time I have a bug in my program obviously.

    5. LF

      (laughs)

    6. DK

      But that, but, but that isn't really what you're... Uh, y- y- you're looking for the-

    7. LF

      More transformational than less-

    8. DK

      Right. So-

    9. LF

      ... than surprising.

    10. DK

      So, for example, in volume 4A, I was especially surprised when I learned about data structure called BD- BDD, b- Boolean decision diagram. Uh, because I sort of had the feeling that, uh, as an old-timer, uh, and, you know, I'd been programming since the s- or since the '50s, and, uh, BDDs weren't invented till 1986. And here comes a brand new idea that revolutionizes the way to represent a Boolean function. And Boolean functions are so basic to all kinds of things in... Uh, uh, uh, it mean- logic is (laughs) underlies e- e- e- e- everything we can describe, all of what we know in terms of logic somehow, and, and here... And, and, uh, it... Propositional logic, uh, I thought, uh, that was cut and dried and everything was known, but, but, uh, but here, but here comes, uh, uh, uh, Randy Bryant and, uh, and discovers that BDDs are, are incredibly powerful. Then, then the... Uh, so I, so I, uh, that mean- means I have a whole, whole new section-

    11. LF

      Mm-hmm.

    12. DK

      ... to the book that I never would have thought of until 1986, and not even until 1990s when I, when, when people started to, uh, uh, to use it for, for, uh, uh, you know, b- billion dollar of applications. Uh, and, and it was, it was the standard way to design computers for a long time until, un- (laughs) until SAT solvers came along when, in the year 2000. So, so that's another great big surprise. So, uh, a lot of these things have re- have totally changed the structure of my book. And the, the middle third of volume 4B is g- is about SAT solvers, and that's 300 plus pages, which is, uh, uh, which is all about mater- uh, mostly about material that was discovered in this century.

    13. LF

      Mm-hmm.

    14. DK

      Um, and I had to, uh, start from scratch and, you know, meet all the people in the field and write... I have 15 different SAT solvers that I wrote w- uh, while preparing that, and s- seven of them are described in the book. Um, others were from my own experience and...

    15. LF

      So, newly invented data structures or ways to represent...

    16. DK

      Uh, a wh- a whole new class of algorithm.

    17. LF

      A whole new class of algorithm?

    18. DK

      Yeah. And, and the interesting thing about the BDDs was that, uh, the theoreticians started looking at it and, and, and started to describe all the things you couldn't do with BDDs, and so they were getting a bad, they, they were getting a bad name, uh, uh, because, you know, okay, they were, they, they were useful but they didn't solve every, every problem, you know.

    19. LF

      (laughs)

    20. DK

      I'm, I'm sure that the theoreticians are... In the next 10 years are gonna show why machine learning doesn't solve everything.

    21. LF

      Right.

    22. DK

      But I, you know, not only worried about the worst case, I get a huge delight when I can actually solve a, a, a problem that I couldn't solve before, you know.

    23. LF

      Yeah.

    24. DK

      Even though I can't solve the problem that's, that is suggested as a further problem, like, uh, I, I, I, I know that I'm way better than I was before. And so I found out that BDDs could do all kinds of miraculous things, um, and so, uh, uh, uh, I, uh, had, had to spend quite a few years, uh, uh, learning, uh, ab- about the, that territory.

    25. LF

      So, in general, what brings you more pleasure, uh, proving or showing a worst-case analysis of an algorithm, or-... showing a good average case, or just showing a good case, that you know something good pragmatically can be done with this algorithm.

    26. DK

      Yeah, I like a good case that, that is maybe only a million times faster than I was able to do before but the, uh, and not worry about the fact that, uh, uh, that it's still g- that it's still gonna take too long if I double the size of the problem. (clears throat)

    27. LF

      So

  14. 55:0658:02

    Big-O notation

    1. LF

      that said, you popularized the asymptotic notation for describing running time. Obviously in the analysis of algorithms, worst case is such a, such an important part. Do you see any aspects of, uh, that kind of analysis as lacking?

    2. DK

      S-

    3. LF

      And notation too.

    4. DK

      Well, well the, the main per- purpose that we should have notations that, that help us, uh, for the problems that we want to solve and so that-

    5. LF

      Right.

    6. DK

      ... they match our, they, they match our intuitions. And, uh, people who worked in number theory had used, uh, asymptotic notation in what, in a, in a certain way, but it was only known to a small group of people. And, and I realized that, in fact, it was very useful to be able to have a notation for something that we don't know exactly what it is, but we only know p- partial about it. And so instead ... so, uh, for example, instead of Big O notation, let's just-

    7. LF

      Mm-hmm.

    8. DK

      ... let's just take a s- a much simpler notation where I say, zero or one, um, or, or, or zero, one or two. And suppose I, suppose that, that, uh, when I had been in high school, we would b- be allowed to put in the middle of our formula X plus zero, one or two (laughs) -

    9. LF

      Mm-hmm.

    10. DK

      ... equals, uh, Y, okay? And, and, and then, then we, we would learn how to multiply two such expressions together and then, you know, uh, uh, deal with them. Uh, well the same thing Big O notation says, uh, here is something that's, uh, I, I'm not sure what it is but I know it's not too big. I, I know it's not bigger than some constant times N squared or something like that.

    11. LF

      Right.

    12. DK

      And so, so I write Big O of N squared. And now I, I learn how to add Big O of N squared to Big O of N cubed, and I know how to add Big O of N squared to, uh, plus one and square that, and how to take logarithms and exponentials who have Big Os in the middle of them. And that turned out to be, uh, hugely valuable in, in all of the work that I was trying to do as I'm trying to figure out how good an algorithm is.

    13. LF

      So, have there been algorithms in your journey that perform very differently in practice than they do in theory?

    14. DK

      Well, the worst case of a combinatorial algorithm is almost always, uh, horrible.

    15. LF

      (laughs) .

    16. DK

      Uh, but, but, but, but we have SAT solvers that are solving ... where one of the, one of the last exercises in that pa- part of my book was to f- figure out a, a problem that has 100 variables that's, that's difficult for a SAT solver.

    17. LF

      Mm-hmm.

    18. DK

      But, uh, but you would think that, uh, a problem with 100 Boolean variables has, uh, requires you to do two to the 100th, uh, uh, uh, operations, because that's the number of possibilities when you have two, 100 Boolean variables, and two to the 100th, two, two to the 100th is way bigger than, than we can handle. 10 to the 17th is a lot.

  15. 58:021:10:05

    P=NP

    1. DK

    2. LF

      You've mentioned over the past few years that you believe P may be equal to NP, but that it's not really, uh, you know, if somebody does prove that P equals NP, it will not directly lead to an actual algorithm to solve difficult problems.

    3. DK

      Right.

    4. LF

      Uh, can you explain your intuition here? Has it been changed? And in general on the difference-

    5. DK

      Yeah.

    6. LF

      ... between easy and difficult problems of P and NP and so on.

    7. DK

      Yeah, so, so the, the popular idea is if an algorithm exists then s- somebody will find it, um, and it's just a matter of, of, uh, of writing it down when, wh- wh- uh, uh, but many more e- algorithms exist (laughs) than anybody can under- understand or, or ever make use of.

    8. LF

      Or discover, yeah.

    9. DK

      Uh, be- because they're just way beyond human comprehension. The, the, the total number of algorithms is, uh, i- is, is more than mind-boggling.

    10. LF

      Mm-hmm.

    11. DK

      Um, so, so we have situations now where we know that algorithms exist but we don't know w- we don't have the foggiest idea what the al- algorithms are. There are s- there are simple examp- examples based on, on game playing where you have, uh, uh, w- where you say, "Well, there must be an algorithm that exists to win in the game of Hex because, uh, for the first player to win in the game of Hex," because Hex is always either an out, uh, a win for the first player or the second player.

    12. LF

      Wait, what's the game of Hex?

    13. DK

      There's a game of Hex which is, which based on putting pebbles onto a hex- hexagonal board and, and the white player tries to get a p- a white path f- from left to right and the black player tries to get a black path from bottom to top.

    14. LF

      And how does capture occur just so I understand that?

    15. DK

      And, and there's no capture. You just put pebbles down o- one at a time. But there's no draws because af- af- after all the white and black are played, there's either gonna be a white path across from east to west or a black path fr- uh, from, from bottom to top. So there's always f- f- you know, it's the perfect information game and people, people play, take turns like, like, uh, Tic-Tac-Toe. Um, and, uh, and the Hex board can be different sizes. But anyway, there's no possibility of a draw and players move one at a time, and so it's gotta be either a first player win or a second player win. Mathematically, uh, you, you follow out all the trees and, uh, and eith- either th- there's always a win for the first player, second player, okay? And it's finite-... the game is finite. So there's an algorithm that will decide, y- you can show it has to be one or the other, be- because the second player could mimic the first player w- with kind of a pairing strategy.

    16. LF

      Ah.

    17. DK

      Um, and so you can show that, uh, uh, uh, it has to be one, it has to be one way or the other. But we don't know any algorithm anyway. We, we, we don't know if there is. Now, where there are, there are cases wh- where you can prove the existence of, o- o- o- of a solution, but we, but nobody knows any way how to find it. But more like the algorithm question, uh, there's a d- there's a very powerful th- theorem in graph theory by Robinson and Seymour that says that every class of graphs that is closed under taking minors has a po- has a polynomial-time algorithm to determine whether it's in this class or not. Now a class of graphs, for example, planar graphs, these are graphs that you can draw in a plane without crossing lines.

    18. LF

      Mm-hmm.

    19. DK

      And, and a planar graph is clo- uh, taking minors means that you can shrink a- an edge in, into a point or you can delete an edge.

    20. LF

      Mm-hmm.

    21. DK

      All right? And so you start with a planar graph and sh- shrink any edge to a point, it's still planar.

    22. LF

      Mm-hmm.

    23. DK

      Delete an edge, it's still planar. Uh, okay. Now, uh, but there are millions of different cl- uh, ways to describe a family of graph that still is, remains the same under taking minor.

    24. LF

      Mm-hmm.

    25. DK

      And Rob- Robertson and Seymour proved that any such family of graphs, there is a finite number of minimum graphs that are obstructions. It's l- so that if, if it's not in the family, then, then it has to contain e- eh, then there has to be a way to shrink it down and, e- until you get one of these bad minimum graphs-

    26. LF

      Mm-hmm.

    27. DK

      ... that's not in the family. For, in the pla- case of a planar graph, the minimum graph is a, is a five-pointed star where every, e- everything pointing to another, and the minimum graph consisting of trying to connect three utilities to three houses without crossing lines.

    28. LF

      Mm-hmm.

    29. DK

      And so there are two, there are two bad graphs that are not planar. And every, every non-planar graph contains one of these two gr- bad graphs by, by shrinking o- and, and, and removing edges.

    30. LF

      Sorry, can, can you say that again? So, uh, the, uh, he proved that there's a finite number of these bad graphs. There's always a finite num- so somebody says, "Here's a family of-" That's hard to believe. (laughs)

  16. 1:10:051:13:26

    Artificial intelligence

    1. LF

      to quickly talk about the other art of artificial intelligence, what is a view, what's your view ... You know, artificial intelligence community has developed as part of computer science and in parallel with computer science since the '60s. Uh, what's your view of the AI community, uh, from the '60s-

    2. DK

      Mm-hmm.

    3. LF

      ... to now?

    4. DK

      So all the way through, the, it was the, the people who were inspired by trying to mimic intelligence or, or to do things that, that were somehow the greatest of achievements of intelligence, that has been inspiration to people who have pushed the envelope of computer science, uh, p- r- m- maybe more than any other group of people. Uh, so it's, all the way through, it's been a great source of, of, uh, good problems to, to, uh, sink your teeth into. And, and getting, getting, um, uh, uh, partial answers, and then more and more successful answers over the years. So th- this has, this has been the inspiration for lots of the great discoveries of computer science.

    5. LF

      Are you yourself captivated by the possibility of creating ... of algorithms having, um, echoes of intelligence in them?

    6. DK

      Not as much as, as most of the people in the field, I guess I would say.

    7. LF

      Right.

    8. DK

      But, but, uh, that's not to say that they're wrong or that ... It's just y- you asked about my own personal preferences, and-

    9. LF

      Right.

    10. DK

      ... uh, but the, but the thing that I, that I, uh, uh, worry about is when people start believing that they've actually succeeded, um-

    11. LF

      (laughs)

    12. DK

      ... uh, and, uh, uh, uh, because the ... It seems to me there's huge gap between really understanding something and being able to pretend to understand something and give the i- give the illusion of understanding something.

    13. LF

      Do you think it's possible to create without understanding?

    14. DK

      Yeah.

    15. LF

      So to, uh-

    16. DK

      Oh, I, I do that all the time too. I mean ...

    17. LF

      (laughs) Right.

    18. DK

      I mean, that's why I use random numbers. I, I, I-

    19. LF

      Yeah.

    20. DK

      But I, uh, but, but there's, th- there's still w- this great gap. I, I, I don't assert that it's impossible, but I'm like, but I c- I don't see it, anything coming a- a- any closer to really, uh, th- uh, the kind of stuff that I would consider intelligence.

    21. LF

      So you've mentioned something that, uh, on that line of thinking which-... I, I very much agree with, so The Art of Computer Programming is the book, is focused on single processor algorithms.

    22. DK

      Uh-huh.

    23. LF

      And for the most part, uh, you, you mentioned ...

    24. DK

      It's only because I set the table of contents in 1962, you have to remember.

    25. LF

      (laughs) For sure. There's no, uh-

    26. DK

      I'm glad I didn't wait until 1965 or ... (laughs)

    27. LF

      (laughs) That's ... Uh, one book, uh, maybe we'll touch on the Bible, but one, one, one book can't always cover the entirety of everything. So I'm glad-

    28. DK

      Yeah.

    29. LF

      ... uh, um, I'm glad the, uh, the table of contents for, uh, the, The Art of Computer Programming is what it is.

  17. 1:13:261:17:11

    Ant colonies and human cognition

    1. LF

      But you did mention that, uh, that you thought that understanding of the way ant colonies are able to perform incredibly organized tasks might well be the key to understanding human cognition, so these fundamentally-

    2. DK

      Yeah.

    3. LF

      ... distributed systems. So what do you think-

    4. DK

      Sure.

    5. LF

      ... is the difference between the way, um, Don Knuth would sort a list and an ant colony would sort a list or-

    6. DK

      Well, yeah.

    7. LF

      ... perform an algorithm?

    8. DK

      Sorting a list isn't the same as cognition though, uh, but, but I know what, what you're getting at, is, uh, so, so, well, the advantage of ant colony, at least we can see what they're doing. We, we, we know which ant has talked to which other ant. And, and, and, and it's much harder, uh, with, with the, with brains to, to, to, to know how, to what extent, uh, neurons are, are passing signals. So I'm just saying that ant colony might be a ... If they have the secret of co- of cognition, like think of an ant colony as a cognitive single being rather than as a, as a colony of lots of different ants. I mean, just like the, the cells of our brain are and, and, and the microbiome and all that is, is, is interacting, uh, uh, entities. But, uh, but somehow the, I consider myself to be (laughs) one single person. Well, you know, an ant colony, uh, you can say might be cognitive, cognitive in somehow and ...

    9. LF

      It sounds, it sounds strong.

    10. DK

      Yeah, I mean, you know, I ... Okay, uh, uh, I, I, I smash a certain ant and organism. "Hmm. That stung. What was that?"

    11. LF

      Right.

    12. DK

      But if we're going to crack the, the secret of cognition, it might be that we could do so by, by psyching out how ants do it, because we have a better chance to measure. They're communicating by pheromones and by touching each other and sight, but, but not by much more subtle phenomenon like electric currents going through.

    13. LF

      But even a simpler version of that, what are your thoughts of maybe Conway's Game of Life?

    14. DK

      Okay, so Conway's Game of Life is, is able to simulate any, any computable process. And, and any deterministic process is, uh-

    15. LF

      I like how you went there. I mean, that's not its most powerful thing, I would say. I mean, um-

    16. DK

      But-

    17. LF

      It can simulate it, but the, the magic is that the individual units are distributed.

    18. DK

      Yes.

    19. LF

      And extremely simple.

    20. DK

      Yes. We, we understand exactly what the primitives are.

    21. LF

      The primitives. Just like with the ant colony-

    22. DK

      But-

    23. LF

      ... even simpler though.

    24. DK

      But if we ... But still it doesn't say that I understand, uh, I understand life. I, I mean, I under- Uh, it, it gives me an ... It gives me a better insight into what does it mean to, uh, to have a deterministic universe. To ... What does it mean to, um, to have free choice, for example?

    25. LF

      Do you think God plays dice?

    26. DK

      Yes. I don't see any reason why God should be forbidden from using the most efficient ways to, to, uh, uh, to ... I mean, we know that dice are extremely important in efficient algorithms. There are things like that couldn't be done well without randomness. And so I don't see any reason why, why God should be, be prohibited from-

    27. LF

      When the algorithm requires it, uh-

    28. DK

      Yeah.

    29. LF

      ... I don't ... You don't see why the-

    30. DK

      Yeah.

  18. 1:17:111:24:28

    God and the Bible

    1. DK

      Yeah.

    2. LF

      So in 2001, you gave a series of lectures at MIT about religion and science.

    3. DK

      No, that was 1999. But-

    4. LF

      You published a ... Sorry.

    5. DK

      The book came out in 2001.

    6. LF

      In 2000. So in 1999, you spent a little bit of time in Boston enough to give, uh, those lectures.

    7. DK

      Yeah.

    8. LF

      And, uh, I read the 2001 version, most of it. It's quite fascinating read, I recommend people ... It's a transcription of your lectures. So what did you learn about how ideas get started and grow from studying the history of the Bible? So you've rigorously studied a very particular part of the Bible, uh, what did you learn from this process about the way us human beings as a society develop and grow ideas, share ideas and-

    9. DK

      Yeah.

    10. LF

      ... are defined by those ideas?

    11. DK

      Well, I ... It's hard to summarize that. Um, I wouldn't say that I, that I learned a great deal of, of really definite things, like where, where I could make conclusions, but I learned more about what I don't know. You have a complex subject, which is really beyond human understanding. Uh, uh, so, so we give up on saying I'm never going to get to the end of the road and I'm never gonna understand it, but you say, but, but maybe it might be good for me to, uh, uh, to get closer and closer and learn more about, more and more about something. And so, you know, how can I do that, uh, uh, efficiently? And the answer, uh, is, well, use randomness. Um, and so-... so, so try a random subset of the, uh, that, that is within my grasp, and, and, and, and study that in detail instead of just, uh, studying parts that somebody tells me to study, or instead of stu- studying nothing, (sighs) because it's too hard. Um, uh, so I, I, I, I decided, uh, uh, for, for my own amusement, uh, one, once that I would, I would take a subset of the ver- of the, uh, verses of the Bible, and I would, um, try to find out what the best thinkers have said about the, the, that small subset.

    12. LF

      Mm-hmm.

    13. DK

      And I had, I had about, uh, let's say 60, 60 verses out of, out of 3,000. I think it was one out of 500 or something like this. And so then I went to the libraries which, which are well-indexed. Uh, uh, you can, you, you, I, I spent, um, uh, uh, for example, at, um, at Boston Public Library I, I would go once a week for, for a year, and I went to, uh, uh, I went, uh, uh, have done times to Andover Harvard Library to, to look at the s- you know, books that weren't in the Boston Public. Uh, where they, where scholars had looked, and you can go in the, and you can go down the shelves and you can, and, and you can pretty... And you can look in the index and say, "Oh, is there, is, is this verse, uh, mentioned anywhere in this book? If so, look at page 105." So, so in other words, I, I could learn not only about the Bible, but about the secondary literature about the Bible, the things that scholars have written about it. And so that, that gave me a way to, uh, uh, uh, to zoom in on parts of the thing so that I could get more, more insight. And, and, and so I look at it as, as a way of giving me some, some firm pegs of which I, on which I could hang pieces of information, but not as, as things where I would say, "And therefore this is true."

    14. LF

      In this, uh, random approach of sampling the Bible-

    15. DK

      Mm-hmm, yeah.

    16. LF

      ... what did you learn about the, the most, uh, you know, central... Uh, one of the biggest accumulation of ideas in our community.

    17. DK

      It seemed, it seemed to me that the, that the main thrust was not the one that most people think of as saying, you know, oh, oh, oh, you know, "Don't have sex," or something like this.

    18. LF

      (laughs)

    19. DK

      Um, but that the main thrust (laughs) was, uh, to try to, to, to try to figure out how to live in harmony with God's wishes.

    20. LF

      Mm-hmm.

    21. DK

      I'm assuming that God exists, and I, and as I said, I'm glad that I, that there's no way to prove this, because that wouldn't, that would, that I, I would run through the proof once, and then I'd forget it, and, and it would... Uh, and, and I would never, uh, s- uh, speculate about spiritual things and, uh, mysteries, uh, otherwise, and I think my life would be very incomplete. So I'm, uh, uh, so, so I'm, I'm assuming that God exists, but it, if, uh, but a lot of the, uh, the people s- say God doesn't exist, but that's still important to them, and so in, in a wa- in a way, that might sti- still be, uh, w- whether God is there or not, uh, uh, in some sense, uh, in, you know, in, God is important to them. It's, it's... One of the, one of the verses I studied actually is, uh, y- you can interpret it as saying that, you know, it's much better to be an atheist than, than not to care at all. (laughs)

    22. LF

      Mm-hmm. So I would say it's, yeah, it's similar to the P equals NP discussion, uh...

    23. DK

      Yeah.

    24. LF

      You, you mentioned a mental exercise, uh, that I, I, I'd love it if you could partake in yourself. Uh, a mental exercise of, uh, being God and... So how would you, if you were God, Don Knuth, how would you present yourself to the people of Earth?

    25. DK

      You mentioned, uh, your love of literature, and there was, uh, th- there's this book that, that really, uh, I can recommend to you. If I c- I think, yeah, the title, I think, is Blasphemy. It talks about, um, God revealing himself through a computer in, in, in, in, in Los Alamos.

    26. LF

      (laughs)

    27. DK

      And, and, uh, it, um, uh... It's the only book that I've ever read where, uh, the punchline was really the very last word of the book, and it, and explained the whole idea of the book. And so I don't wanna give that away, but it, but it's really m- very much about this question that you're, that, that you raised. Uh, uh, the, uh, but, but s- suppose God, uh, uh, s- said, "Okay, that, my, my prev-, my previous, um, means of communication with the world (laughs) are not the best for the 21st century, so what should I do now?" And, uh, and, and it's conceivable that (laughs) , that it would, uh, that that God would choose the way that's described in this book.

    28. LF

      Another way to look at this exercise is, uh, looking at the human mind, looking at the human spirit, the human life in a systematic way.

    29. DK

      I think it's mostly do you wanna learn humility? You wanna r- realize that once we solve one problem, that doesn't mean that we're, that all of a sudden other, other problems are gonna drop out, and, and, and, and we have to realize that, that, uh, uh, that there are, there are things beyond our, beyond our, our ability. Um, I see hubris all around. (laughs)

    30. LF

      (laughs) Yeah, well said.

  19. 1:24:281:28:25

    Reflection on life

    1. LF

      Uh, if you were to run program analysis on your own life, uh, how did you do in terms of correctness, running time-

    2. DK

      Oh, yeah, them well-

    3. LF

      ... resource use, asymptotically speaking, of course.

    4. DK

      Okay, yeah. Well, I would say, (laughs) that question has not been asked me before.

    5. LF

      (laughs)

    6. DK

      Um, and, uh, I...... I, uh, I started out, uh, eh, with library subroutines and, and, uh, uh, learning how to be a automaton that was obedient. And I had the great advantage that I d- didn't have anybody to blame for my failures. If I started getting, uh, n- not understanding something, I, I knew that I should stop playing ping pong and that, that, and it was my fault that, that I was d- I wasn't studying hard enough or something, rather than that somebody was discriminating against me in some way, and, and, uh, I don't know how to avoid this re- the existence of biases in the world. But I, but I, but I know that that's an extra burden that I didn't have to suffer from. Um, and, uh, and, and then I, uh, uh, I f- found the, uh, uh, uh, fr- from, from parents I learned, uh, the idea of, uh, uh, of altru- of service, uh, to, to other people as being more important than p- than, uh, uh, w- what I get out of stuff myself. I, like, know that I need to, I need to be happy enough, uh, e- enough in order to be able to sp- be of service. But I do- but I, you know, but I, I came to a philosophy, uh, for finally that, that I phrase as .8 is enough. Uh, there, there was a TV show once called Eight Is Enough, which was about a, uh, uh, you know, somebody had eight kids. Um, but, but, uh, I, I, I say .8 is enough, which means i- i- if I can have a way of rating happiness, I think it's good design that, uh, uh, to have, uh, to have an organism that's happy about 80% of the time. Um, and if, if it was 100% of the time, it would be like ev- like everybody's on drugs, and, and never, and, and, and, and, and, and everything collapses and nothing works because everybody's just too happy.

Episode duration: 1:45:55

Install uListen for AI-powered chat & search across the full episode — Get Full Transcript

Transcript of episode 2BdBfsXbST8

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.