Skip to content
Lex Fridman PodcastLex Fridman Podcast

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

Donald Knuth is a computer scientist, Turing Award winner, father of algorithm analysis, author of The Art of Computer Programming, and creator of TeX. Please support this podcast by checking out our sponsors: - Coinbase: https://coinbase.com/lex to get $5 in free Bitcoin - InsideTracker: https://insidetracker.com/lex and use code Lex25 to get 25% off - NetSuite: http://netsuite.com/lex to get free product tour - ExpressVPN: https://expressvpn.com/lexpod and use code LexPod to get 3 months free - BetterHelp: https://betterhelp.com/lex to get 10% off EPISODE LINKS: Donald's Stanford Page: https://profiles.stanford.edu/donald-knuth Donald's Books: https://amzn.to/3heyBsC PODCAST INFO: Podcast website: https://lexfridman.com/podcast Apple Podcasts: https://apple.co/2lwqZIr Spotify: https://spoti.fi/2nEwCF8 RSS: https://lexfridman.com/feed/podcast/ Full episodes playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 Clips playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOeciFP3CBCIEElOJeitOr41 OUTLINE: 0:00 - Introduction 0:48 - First programs 24:11 - Literate programming 27:20 - Beauty in programming 33:15 - OpenAI 42:26 - Optimization 48:31 - Consciousness 57:14 - Conway's game of life 1:10:01 - Stable marriage 1:13:21 - Richard Feynman 1:24:15 - Knuth-Morris-Pratt Algorithm 1:33:47 - Hardest problem 1:51:26 - Open source 1:56:39 - Favorite symbols 2:06:12 - Productivity 2:13:53 - Meaning of life SOCIAL: - Twitter: https://twitter.com/lexfridman - LinkedIn: https://www.linkedin.com/in/lexfridman - Facebook: https://www.facebook.com/lexfridman - Instagram: https://www.instagram.com/lexfridman - Medium: https://medium.com/@lexfridman - Reddit: https://reddit.com/r/lexfridman - Support on Patreon: https://www.patreon.com/lexfridman

Lex FridmanhostDonald Knuthguest
Sep 9, 20212h 21mWatch on YouTube ↗

EVERY SPOKEN WORD

  1. 0:000:48

    Introduction

    1. LF

      The following is a conversation with Donald Knuth, his second time on this podcast. Don is a legendary computer scientist, Turing Award winner, father of algorithm analysis, author of The Art of Computer Programming, creator of TeX that led to LaTeX, and one of the kindest and most fascinating human beings I've ever got a chance to talk to. I wrote him a letter a long time ago. He responded, and the rest, as they say, is history. We've interacted many times since then and every time has been joyful and inspiring. To support this podcast, please check out our sponsors in the description. This is the Lex Fridman Podcast, and here is my conversation with Donald Knuth.

  2. 0:4824:11

    First programs

    1. LF

      Your first large-scale program, you wrote it in IBM 650 Assembler in the summer of 1957.

    2. DK

      I wrote it in decimal machine language. I didn't know about Assembler until a year later.

    3. LF

      But the year 1957-

    4. DK

      The year, it was, it was-

    5. LF

      ... and the program is tic-tac-toe.

    6. DK

      Y- yeah. I might have learned about A- Assembler later that summer. Yeah, I probably did. In 1957, hardly anybody had heard of assemblers. You looked at the user manuals, (laughs) "H- h- how do you write a program for this machine?" It would, it, it would, it would say, um, uh, y- y- y- you know, you would say 69 which meant load the distributor and, and then you would give the address of, of the number you wanted to load into the distributor.

    7. LF

      Mm-hmm.

    8. DK

      Uh, yesterday, uh, my friend at, uh, Doug Spicer at the Computer History Museum sent me a link to something that just went on YouTube. It was IBM's, uh, progress report from 1956 which was, you know, very contemporary with 1957. (laughs)

    9. LF

      (laughs) Yes.

    10. DK

      Um, and in 1956, IBM had donated to Stanford University an IBM 650, one of the first ones. When they showed a picture of the assembly line for IBM 650s and they said, you know, "This is number 500 or something coming off the assembly line." And-

    11. LF

      Mm-hmm.

    12. DK

      ... and I had never seen so many (laughs) IBM 650s ex- I did in this movie that was, uh, it's on YouTube now.

    13. LF

      Mm-hmm.

    14. DK

      Um, and, and it showed the picture from Stanford, uh, that, that's, m- m- you know, they, they, they said, you know, "We, we donated one of these to Stanford, one to MIT," and they mentioned one other, oh, oh, one other college. And in, in December of '56, they donated to, to my university, Case Tech.

    15. LF

      Mm-hmm.

    16. DK

      Um, but anyway, they showed a picture then, uh, of a class session, uh, where a guy was teaching programming and on the blackboard, it said, "69 8,000." I mean, he-

    17. LF

      Mm-hmm.

    18. DK

      ... he, he, it, it was, uh, the, he was teaching them how to write, uh, code for this IBM 650 which was in decimal numbers. So, so, so the instructions were 10 di- 10 decimal digits. You had, you had two digits that said what, wh- wh- what to do-

    19. LF

      Mm-hmm.

    20. DK

      ... four digits to say, uh, uh, what to do it to (laughs) -

    21. LF

      (laughs)

    22. DK

      ... and four more digits to say where to get your next instruction.

    23. LF

      And there's a manual that describes what each of the numbers mean?

    24. DK

      And the manual was actually what, uh, if the manual had been well written, I probably never would have gone into computer science. But it was so badly written, I figured, uh, that I must have a talent for it because I'm only a freshman and I c- and I could write a better manual.

    25. LF

      (laughs)

    26. DK

      Uh, and, and-

    27. LF

      That's what you did.

    28. DK

      ... a- a- and so I, I, I started working at the computer center, um, uh, and, and, uh, wrote some manuals then. But, but, (laughs) yeah, but, but this was, uh, uh, but this was the way we did it. And, and my first program then was June of, uh, 1957.

    29. LF

      The tic-tac-toe. That-

    30. DK

      No. That was the second program. The first, this, the third pro- the, the first program was factoring a, a number.

  3. 24:1127:20

    Literate programming

    1. LF

      Bach, if somebody looked at Don Knuth code, would they be able to tell that this, uh, is a distinct style of thinking going on here?

    2. DK

      Huh.

    3. LF

      What do you think?

    4. DK

      Uh ...

    5. LF

      (laughs) And what, what would be the defining-

    6. DK

      I, I, yeah, uh-

    7. LF

      ... uh, characteristic of the style?

    8. DK

      Well, uh, uh, my code now is, uh, it, it, it is literate programming so I'm, it's a combination of English and C mostly. (laughs) But, but, but e- if you just looked at the C part of it, you would also probably notice that I don't, y- uh, that it, you can't, you know, that I use a lot of global variables that other people don't and, and, and I, and I expand things inline more than in- instead of calling ... anyway, I, I have different subset of C that I use. Um-

    9. LF

      Okay. But that's, that's a little bit stylistic, uh-

    10. DK

      Yeah. But, but with literate programming, you alternate between English and, and, and, and C or whatever, or, yeah, yeah, yeah. And, um-

    11. LF

      And by the way, people listening to this should look up literate programming. It's very interesting, uh, concept that you, uh, that you proposed and developed over the years.

    12. DK

      Yeah. Yeah. The ... I, I'm s- that, that's the most, uh, significant thing f- I think to come out of the TeX project is the pro- is, is that I-

    13. LF

      Mm-hmm.

    14. DK

      ... uh, uh, I, I realized that, uh, um, my programs w- were to be read by people and not-

    15. LF

      (laughs)

    16. DK

      ... (laughs) not just by computers and, and, and that typography could massively enhance that. And, and, and, and, and so, uh, I mean, it, there are just wonderf- if they're gonna look it up, that they should also look up this book by, it's called Physically Based Rendering-

    17. LF

      Mm-hmm.

    18. DK

      ... by Matt Fahr and, gosh, uh, anyway, it, you know, got an Academy Award. But it's, but, but all the eff- all the graphic effects you see in movies, uh, like, uh, you know, are accomplished by algorithms. And this book, it is, the whole book is a literate program. It tells you not only h- how you do all the shading and, uh, and, and, uh, bring images in that you need for ani- animation and textures and so on, but it also, uh, you can run the code. (laughs)

    19. LF

      Mm-hmm.

    20. DK

      Uh, so, uh, and, and, and so, uh, I find it, uh, uh, an extension of the way I, uh, of, of, of how to teach programming is, it is but by, is by telling a story, uh, as part of the program. (clears throat)

    21. LF

      So it's, uh, it, it works as a program, but it's also readable by humans.

    22. DK

      Uh, e- e- e- es, and especially by me, uh-

    23. LF

      (laughs) Yeah.

    24. DK

      ... uh, a week later or a year later.

    25. LF

      That's a good test.

    26. DK

      Yeah.

    27. LF

      If you yourself understand the code-

    28. DK

      Yeah.

    29. LF

      ... uh, easily, uh, a week or month-

    30. DK

      Write it.

  4. 27:2033:15

    Beauty in programming

    1. LF

      Okay. You, uh, dodged this question in an interview I listened to. Uh, so let me ask you again here. (laughs) Uh, what makes for a beautiful program?

    2. DK

      What makes for a beautiful program?

    3. LF

      Yeah. What are the characteristics you see? Like you just said literate programming, what are the characteristics you see in a program that make you sit back and say, "That's pretty good."

    4. DK

      Well, the reason I didn't answer it because there are mo- there are dozens and dozens of answers to that bec- be- because e- each-

    5. LF

      Yes.

    6. DK

      ... you, you can define beauty, the same person will define beauty a different way from hour to hour. I mean, it depends on what, uh, uh, on what you're looking for. It, it, at one level, you, it's, it's beautiful just if it works at all. (laughs) At another level, it's beautiful if it's, I- if it, uh, uh, uh, can be understood easily. If it's b- it's, it's, it's beautiful if it, uh, uh, if it's literate programming, it's beautiful, it makes you laugh. I mean, uh ...

    7. LF

      Yeah. I'm actually, so I'm with you. I think beauty, if it's readable.

    8. DK

      Readable, yeah.

    9. LF

      Is if you understand what's going on, and also understand the elegance of thought behind it, and then also as you said, wit and humor. I was always, um ... I remember having this conversation, I had this conversation on Stack Overflow whether humor is good in comments. And I think it is.

    10. DK

      Wh- wh- whether humor, is, is good in comments?

    11. LF

      Like, uh, when you add comments-

    12. DK

      Yeah.

    13. LF

      ... to your code.

    14. DK

      Yeah.

    15. LF

      Uh, I always thought a little bit of humor is good. (laughs) It shows personality.

    16. DK

      Mm-hmm.

    17. LF

      It shows character, shows wit and fun and all those kinds of things-

    18. DK

      Mm-hmm. Yeah.

    19. LF

      ... of, of the personality of the programmer.

    20. DK

      Yeah. Okay. So, uh, a couple of days ago, I received a, uh, a wonderful present from my former editor at Addison-Wesley. He, he, he's downsizing his house and he found, uh, that, that somebody at the company had, had found all the, all of their internal files about The Art of Computer Programming from the 1960s-

    21. LF

      Mm-hmm.

    22. DK

      ... and they gave it to him. (laughs) Uh, and then, uh, you know, before throwing, throwing in the garbage. And then he, so he said, "Oh, yeah," he, he planned to keep it for posterity, but now he realized that posterity is a, it's a bit too much for him to handle, so he sent it to me.

    23. LF

      (laughs)

    24. DK

      Uh, and so, and, and so I just received, uh, this big, big stack of, uh, of letters. Uh, some of which I had written to them, but, but many of which they had written to early guinea pigs who were, who, telling 'em whether they, they should publish or not, you know?

    25. LF

      Mm-hmm.

    26. DK

      And, and one of the things wh- was, uh, uh, in, in the, uh, in the comments to, to volume one, uh-... uh, the, the major, the major reader was, was Bob Floyd, uh, who, who was my great, uh, co-worker in the '60s, um, died early unfortunately. But, but, uh, uh, and, and he, he, he commented about the humor I- i- in it. And so, so, so we had, you know, he loo- r- ran it by me, you know, he says, you know, "Keep this joke in or not?" You know.

    27. LF

      (laughs) yeah.

    28. DK

      Uh, uh, he, you know, they also sent it out to focus groups, you know (laughs) , "What do you think about humor in a, i- i- i- in a book about computer programming?"

    29. LF

      What's the conclusion?

    30. DK

      And I stated my philosophy is, it says, you know, the ideal thing is, uh, that it's, it's like, it's something where the reader knows that there's probably a joke here if you only understood it, and this is a motivation to understand, to, to, to think about it a little bit. Um, but, but anyway, it, it, it, it's a very delicate humor. It's a very... I mean, it's, it's really a... each, each century invents a different kind of humor too. I mean, and, uh, and, and d- different cultures have different, different kinds of humor, um.

  5. 33:1542:26

    OpenAI

    1. LF

      Let me explain it, maybe you'll find it interesting. So OpenAI is a company that, that does, uh, AI work. And they have this language model, it's a neural network that can generate language pretty well.

    2. DK

      Uh huh.

    3. LF

      But they also have, on top of that, developed something called OpenAI Codex, and together with GitHub, they developed a system called OpenAI Copilot. Let me explain what it does. There's echoes of literate programming in it. So what you do is you start writing code and it completes the code for you.

    4. DK

      Uh huh.

    5. LF

      So for example, you start... let's go to your factoring program. You start, you write in JavaScript, in Python, in any language...

    6. DK

      Yeah.

    7. LF

      ... that it trained on. Uh, you start l- you write the first line and some comments, like what this code does, and it generates the function for you. And it does an incredibly good job. Like, it's not provably right, but it often does a really good job of completing the code for you.

    8. DK

      I see. Whether... but how do you know whether it did a good job or not?

    9. LF

      You could see a lot of examples where it did a good job, and so you... it's, it's not a thing that generates the code for you.

    10. DK

      Yeah, exactly.

    11. LF

      It starts... it gives you, um... uh, so it puts the human in the seat of fixing issues-

    12. DK

      Yeah.

    13. LF

      ... versus writing from scratch. Do you find that kind of idea at all interesting?

    14. DK

      Every year, we're gonna be losing more and more control over what machines are doing. And, e- e- and people are saying, "Well, it seems to..." I, when I was (laughs) a professor at Caltech, uh, in the, in the '60s, we had this, this guy who, who talked a good game. He could give inspiring lectures and you'd think, "Well, he..." uh, th- thrilling things he was talking about and an hour later, you'd say, "Well, what did he say?"

    15. LF

      (laughs)

    16. DK

      Um, uh, but what, but, but he really felt that it didn't matter whether computers got the right answer or not, it just mattered whether it made you happy or not. In other words, if, you know, if, if, if your boss paid for it, uh, he, uh, he, you know, then you had a job, you could, you, you know, you could, you could take care of your wife and-

    17. LF

      So happiness is more important than truth.

    18. DK

      E- exactly. He didn't believe in truth, but he was a philosopher. (laughs)

    19. LF

      (laughs) I like it. Um, and somehow, you, you see a...

    20. DK

      But w- we're going that way. I mean, w- so, so many more things are, are taken over by saying, "Well, this seems to work." And-

    21. LF

      So-

    22. DK

      ... and, and when there's, when, when there is, uh, competing interests involved, neither side understands why the decision is being made. Uh, uh, uh, it, uh, it, you know, we, we realize now that it's, that it's bad. But, uh, but consider what happens five, five year, 10 year-

    23. LF

      Mm-hmm.

    24. DK

      ... years down the line when, when things get even more f- further detached and each thing is based on s- something from the previous year.

    25. LF

      Yeah. So you start to lose... the more you automate, the more you start to lose track of, uh, some deep-

    26. DK

      Exponentially.

    27. LF

      ... human things. Exponentially. But, so that's the dark side.

    28. DK

      That is.

    29. LF

      The positive side is...... the more you automate, the more you let humans do what humans do best. So, maybe programming this, you know, maybe humans should focus on a small part of programming that requires that genius, the magic of the human mind and the mess you let the machine generate.

    30. DK

      Yeah.

  6. 42:2648:31

    Optimization

    1. LF

      In The Art of Computer Programming, you wrote, "The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times. Premature optimization is the root of all evil."... in parentheses, or at least most of it, in programming. Can you, uh, explain this idea? Uh, what's the wrong time? What is the wrong place for optimization?

    2. DK

      So, f- first of all, the word "optimization." I, I, I started out writing software, uh, and optimization was... I was a compiler writer, so optimization meant, uh, making the, uh, making a better translation, it- it- it, so that it would run faster on a- o- on a machine.

    3. LF

      Mm-hmm.

    4. DK

      So an optimized program is just like, you know, you, you, you run a pr- program and you set the optimization level f- uh, f- uh, to- to the compiler. So that's one w- word for optimization. Um, and at that time, I, uh, I happened to be looking in an unabridged dictionary, uh, for some reason or other and I came to the word optimize. I said, "What's the meaning of the word optimize?" And it says, "To view with optimism."

    5. LF

      (laughs)

    6. DK

      And, and you, you look in Webster's-

    7. LF

      Yeah.

    8. DK

      ... Dictionary of English Language in 196- or the 1960s, that's what optimize mean- meant. Okay. Um, eh, now, eh, uh, now, so people started doing cost optimization, other kinds of things, uh, uh, you know, c- whole subfields of, uh, of, uh, algorithms and economics and whatever are, are based on what they call optimization now. But, uh, but to me, optimization, when I was saying that, was saying, uh, uh, changing a program to make it more, uh, tuned to the machine. And I found out that, um, w- when a person writes a program, uh, e- e- he or she tends to think that the parts that were hardest to write are gonna be hardest for the computer to execute. S- s- so, so, so maybe I have 10 pages of code, but I, I had to work a week writing this page. I, uh, mentally think that when the com- computer gets to that page, it's gonna slow down.

    9. LF

      (laughs) Right.

    10. DK

      Uh, it's gonna say, "Oh, I don't understand what I'm doing. I better, I better be more care..." Anyway, this is, of course, silly, but it's, it, it's something that we, that we, that we don't know when we write a piece of code. We don't know what-

    11. LF

      Mm-hmm.

    12. DK

      ... wha- whether the computer is actually gonna be executing that code very much.

    13. LF

      Mm-hmm.

    14. DK

      S- so, so people had a, had a very poor understanding of, o- of wh- what the computer was actually doing.

    15. LF

      Mm-hmm.

    16. DK

      Uh, I, I made one test where, w- where we, we studied a, uh, Fortran compiler and it was spending more than 80% of its time reading the comments card.

    17. LF

      Mm-hmm.

    18. DK

      Um, but as a programmer, we were really concerned about how fast it could take a complicated expression that had lots of levels of parentheses-

    19. LF

      Mm-hmm.

    20. DK

      ... and, a- and, and convert that in- in- into something. But that was just, you know, less than 1% of the... (laughs) Uh, uh, so if we optimize that, uh, uh, we didn't know what we were doing. But it, but, but if, if we knew that it was spending 80% of its time on the comments-

    21. LF

      Mm-hmm.

    22. DK

      ... card, you know, in 10 minutes, we could, we could make the, the, uh, the compiler run more than twice as fast.

    23. LF

      And you can only do that once you've completed the program and then you empirically-

    24. DK

      Right.

    25. LF

      ... study where-

    26. DK

      I had some kind of profiling that, that I knew what was important. Yeah.

    27. LF

      So, uh, you, you don't think this applies generally? I mean, there is something that rings true to this across all programs.

    28. DK

      I'm glad that it applied generally, but it, but it was, it was only my good luck. I, I said it, but he, you know, but it, but I did, but I said it in a limited context and I, and, and I'm gl- glad if it makes people think about stuff because I, you know, I'm... But it applies i- in another sense too that is, um, sometimes I will do optimization in a, in a way that does help the, the, the actual running time but makes the program impossible to change next week-

    29. LF

      Right.

    30. DK

      ... because I've changed my data structure or something that, that made it less adaptable. So one of the great, uh, uh, principles of computer science is, uh, is, uh, is laziness or whatever you call it, uh, uh, late binding. Uh, you know, don't... Hold, hold off decisions w- when you can.

  7. 48:3157:14

    Consciousness

    1. DK

    2. LF

      Let me ask you a weird question. So Roger Penrose, uh, has talked about computation, computers and, uh, he proposed that...... the way the human mind discovers mathematical ideas is something more than a computer, that, that a universal Turing machine cannot, uh, do everything that a human mind can do.

    3. DK

      Mm-hmm.

    4. LF

      Now this includes discovering mathematical ideas and it also includes, he's written a book about it, consciousness. So I don't know if you know Roger, but-

    5. DK

      Mm. Yeah.

    6. LF

      ... do you think-

    7. DK

      My, uh, my daughter's kids played with his kids in Oxford. (laughs)

    8. LF

      (laughs) Nice. So do you think there is such a limit to the computer? Do you think consciousness is more than a computation? Do you think the human mind, the way it thinks is more than a computation?

    9. DK

      I, I mean, I, I, I could say yes or no but, but, but I don't be- I have no reason t- I, I mean-

    10. LF

      So you don't find it useful to have an intuition in one way or the other? Like when you think about algorithms, do you-

    11. DK

      Mm. Well-

    12. LF

      ... isn't it useful to think about-

    13. DK

      ... I, I think it's an unanswerable-

    14. LF

      ... the limits?

    15. DK

      ... uh, unanswerable question. And my opinion is, is no better than anybody else's.

    16. LF

      You think it's unanswerable? So you-

    17. DK

      Yeah.

    18. LF

      ... you don't think eventually science will be able to-

    19. DK

      How many angels can dance on the head of a p- I mean, I don't know.

    20. LF

      No, but angels aren't-

    21. DK

      ... I, I, I, anyway, there, there are lots of things that are beyon- that, uh, that we can speculate about but, uh, I don't want somebody to say, "Oh yeah, Knuth said this and, and so he's, he's, he's smart and so, so he, so that must be..."

    22. LF

      (laughs)

    23. DK

      I, I mean, I, I say it's something that, uh, we'll, we'll never know, uh ...

    24. LF

      Interesting. I, uh, okay, that's a strong statement. I, I don't, I personally think it's something we will know eventually. Like there's no reason to me why the-

    25. DK

      Yeah.

    26. LF

      ... workings of the human mind are not within the reach of science.

    27. DK

      That's absolutely possible and I'm not denying it.

    28. LF

      Yeah.

    29. DK

      Uh, and, and, it, no-

    30. LF

      But right now you don't have a good intuition one way or the other.

  8. 57:141:10:01

    Conway's game of life

    1. DK

    2. LF

      So, there's a tricky thing, I don't know if you have any expertise in this, you might be a little bit on the sideline, it'd be interesting to ask though, what are your thoughts on cellular automata and the Game of Life? Have you ever played with those kind of little, uh, games?

    3. DK

      I think, uh, The Game of Life, uh, it is- is wonderful and, uh, uh, and- and- and shows all kind of stuff about how things can evolve without the creator understanding anything more than the- the power of learning in a way. But to me, the most im- (laughs) important thing about The Game of Life is the- is- is how it focused for me what it- what it meant to have free will or not.

    4. LF

      (laughs)

    5. DK

      Because The Game of Life is obviously totally deterministic.

    6. LF

      Yes.

    7. DK

      And- and I- I find it hard to believe that anybody who's ever had children cannot believe in free will.

    8. LF

      Right.

    9. DK

      On the other hand, this makes it crystal clear, uh, John Conway said, uh, he wondered whether it was im- immoral to shut the computer off after he got into a particularly interesting play of The Game of Life.

    10. LF

      Yeah.

    11. DK

      Um...

    12. LF

      Wow. Yeah, so there is... uh, to me, the reason I love The Game of Life is exactly as you said, a clear illustration that from simple initial conditions with simple rules, you know exactly how the system is operating, it's deterministic, and yet if you let yourself, uh, if- if you allow yourself to lose that knowledge a little bit enough to see the bigger organisms that emerge, and then all of a sudden they seem conscious, they- they seem, uh, not conscious but living.

    13. DK

      If- if- if the universe is finite, it- we're all living in The Game of Life, just slowed down, uh, I mean sped up a lot. Uh...

    14. LF

      But do you think technically some of the ideas that you used for analysis of algorithms can be used to analyze The Game of Life? Can we make sense of it or is it too weird of a system?

    15. DK

      Yeah. I mean I- I've got- I've got a dozen exercises in volume four of Fascicle 6, uh, that actually work rather well for that purpose. (laughs)

    16. LF

      But...

    17. DK

      Bill Gospers came up with the- with- with- with the algorithm that- that allows- that allowed Golly to- uh, to- you know, to run thousands and thousands of times faster, to get... you know the website called Golly?

    18. LF

      Uh...

    19. DK

      G-O-L-L-Y, just-

    20. LF

      It simulates the cellular automata, like Game of Life?

    21. DK

      Yeah, you got- you gotta check it out, yeah.

    22. LF

      Can I ask you about John Conway?

    23. DK

      Yes. In fact, uh, I- I'm just reading now the- the issue of Mathematical Intelligence that came in last- last week. It's a whole issue devoted to- to (laughs) , uh, uh, you know, mem- remembrance of- of- of him. (clears throat)

    24. LF

      Did you know him?

    25. DK

      I- I slept overnight in his house several times. I- (laughs) yeah.

    26. LF

      He recently passed away.

    27. DK

      Yeah, he die- he died a year ago, um, May I think it was, of COVID.

    28. LF

      What are you... what are some memories of him, of his work that stand out for you? Is... did- uh, did... on, o- on a technical level, did any of his work inspire you? On a personal level, did-

    29. DK

      (laughs)

    30. LF

      ... did he himself inspire you in some way?

  9. 1:10:011:13:21

    Stable marriage

    1. LF

      So, you mentioned your wife, Jill. You mentioned stable marriage. Can you tell the story of how you two met?

    2. DK

      So we celebrated 60 years of wedded bliss, like, uh, last month (laughs) .

    3. LF

      (laughs)

    4. DK

      And, and we met because of, uh, I was dating her roommate. This, this was my sophomore year or her freshman year, and I was dating her roommate and I wanted her advice on strategy or something like this. And anyway, I found I enjoyed her advice better (laughs) than, than her. I enjoyed her roommate.

    5. LF

      (laughs) You guys were ma- majoring the same thing?

    6. DK

      No, no, no.

    7. LF

      'Cause I, 'cause I read something about, uh, working on a com- computer in grad school on a difficult computer science topic.

    8. DK

      So, so, so she's an artist and I'm a-

    9. LF

      Okay.

    10. DK

      ... and I'm a, a, you know, a geek and-

    11. LF

      What was she doing with a computer science book? Or I read the... Was it the manual that she was reading? What was she reading?

    12. DK

      I wrote the manual that she had, had. She had to take a class in computer science.

    13. LF

      Okay.

    14. DK

      And, and, and, uh-

    15. LF

      So you're the tutor?

    16. DK

      No, no, yeah. No, we... Yeah, we... There were careful times, uh, uh, you know, trying to learn cer- certain concept. But I learned art from her. And so we, we worked together, uh, you know, occasionally in design pro- projects. But, but every year we, we write a Christmas card and, and we each have to compromise our, our own s-

    17. LF

      (laughs)

    18. DK

      ... notions of beauty. (laughs)

    19. LF

      Yes. Uh, when did you fall in love with her?

    20. DK

      That day that I asked her about her, her roommate. (laughs)

    21. LF

      (laughs) Okay.

    22. DK

      I mean-

    23. LF

      You, you-

    24. DK

      No, I, I, I... Okay, so you're... I, I don't mind telling these things, uh, depending on how you far- how far you go, but, uh-

    25. LF

      (laughs)

    26. DK

      ... but, but, but let, let me tell-

    27. LF

      I promise, I promise not to go too far. (laughs)

    28. DK

      ... let, let me tell you this, that I, I never really enjoyed kissing, uh, uh, uh, until I found how she did it.

    29. LF

      (laughs) Wow. And 60 years.

    30. DK

      Yeah.

  10. 1:13:211:24:15

    Richard Feynman

    1. LF

      uh, you mentioned that Richard Feynman was someone you looked up to.

    2. DK

      Yep.

    3. LF

      Um, probably you've met him in Caltech?

    4. DK

      Uh, well, we knew each other th- th- yeah, at Caltech for sure. Yeah, I- I-

    5. LF

      Uh, you are one of the seminal personalities of computer science. He's one for physics.

    6. DK

      Yep.

    7. LF

      Have you ever ... Hav- is there specific things you picked up from him by way of inspiration or, uh-

    8. DK

      So, so we used to go to each other's lectures and s- and, and, uh, but, uh, but if I saw him sitting in the front row (laughs) it would throw me for a loop actually and I, I, I would, I would miss a few, a few sentences. Oh, what unique story do I have about ... I mean, I, I, I've s- ... You know, I, I, I, I often refer to his, his time in Brazil, uh, where he, um, es- essentially s- said they were teaching all the physics students the wrong way. They were just bl- they were just learning how to pass exams and not learning any physics and s- ... And he said, uh, tu- ... You know, "If you want me to prove it," you know, "here, I'll turn to any page of this textbook and, uh, a- a- and I'll tell you what's wrong with this page." And, and, and he did so. And, and the textbook had been written by his host and, (laughs) and he, and it was, uh, a big embarrassing incident. But he had previously asked his host if, if he was supposed to tell the truth. Um, eh, but, but anyway, it, it re- epitomizes the way, uh, uh, e- education goes wrong, uh, in all kinds of fields-

    9. LF

      Mm-hmm.

    10. DK

      ... uh, and has to periodically b- be brought back f- from h- from, from a process of m- of giving credentials to a process of giving knowledge. (clears throat)

    11. LF

      Yeah, it's probably a story that continues to this day in, in a bunch of places where it's too easy for, uh, educational institutions to fall into credentialism versus, uh, ins- inspirationalism. (laughs)

    12. DK

      Mm-hmm.

    13. LF

      I don't know if those are words but sort of, uh-

    14. DK

      Yeah, uh-

    15. LF

      ... understanding versus just giving a little, um, uh-

    16. DK

      It, it, it, it-

    17. LF

      ... plaque.

    18. DK

      ... uh, and, you know, it, it's a, it's very much like what we were talking about if you want the computer to (laughs) ... If you want to be, be able to believe the answer a computer is-

    19. LF

      Sure.

    20. DK

      ... uh, is doing. That, w- one of the things Bob Floyd showed me in the '60s, there was a, uh, h- he loved this cartoon. There was a ... There, there, there were two m- guys standing in front of ... In those days, a computer was a big thing, you know, and the-

    21. LF

      Okay.

    22. DK

      And, and the first guy says to the other guy, he said, "This machine can do in one second what it would take, uh, a million people to do in 100 years." And the other guy says, "Oh, so how do you know it's right?"

    23. LF

      (laughs) Ah, that's a good line.

    24. DK

      Mm-hmm.

    25. LF

      Uh, (laughs) d- is there some interesting distinction between physics and math to you? H- have you looked at physics much to, like, speaking of Richard Feynman? So, uh, th- the difference between the physics community, the physics way of thinking, the physics intuition versus the computer science, the theoretical computer science, the mathematical sciences. Do you see that as a gap? Are they strongly overlapping?

    26. DK

      Y- I, uh, it's quite different, I, uh, i- in my opinion. I, um, I started as a physics major and I switched into math, uh, and p- probably the reason was that I could, I could get A+ on the physics exam but I'd, but I never had any idea why I would (laughs) have been able to come up with the problems that were on those exams.

    27. LF

      Mm-hmm.

    28. DK

      Uh, but, but in math, uh, I, I, I, I knew wh- you know, why the teacher set those problems and I thought of other problems that I could s- do.

    29. LF

      Mm-hmm.

    30. DK

      And I believe it's, it's quite a different mentality. Uh-

  11. 1:24:151:33:47

    Knuth-Morris-Pratt Algorithm

    1. LF

      Can you describe what the, uh, Knuth-Morris-Pratt algorithm does, and how did you come to develop it? One of the many things that you're known for and has your name attached to it.

    2. DK

      Yeah. All right. So it should be actually Morris-Pratt-Knuth-

    3. LF

      (laughs)

    4. DK

      ... but we decided to use alphabetical order when we published the paper. The problem is, uh, something that everybody knows now if they're, if they're using a search engine, uh, uh, you k- you have a, a large collection of texts, and, and you wanna know if, if the word Knuth appears anywhere in the text we'll say, or, or some, some other word that's less interesting than Knuth.

    5. LF

      (laughs)

    6. DK

      Okay? But anyway, like, like-

    7. LF

      That's the most interesting word, yeah.

    8. DK

      ... Morris or something.

    9. LF

      Like Morris, right. (laughs)

    10. DK

      So anyway, we have, we have, uh, a large piece of text, and, and it, it's all one long one-dimensional thing, you know? It's first letter, second letter, and et cetera, et cetera, et cetera. And so, uh, the, the ques- uh, uh, you would like to be able to do this quickly. Um-And the obvious way is, uh, cl- let's say we're looking for Morris (soft music plays) , then, okay, go there. So we would, we would go through and wait till we get to letter M. Then we look at the next word and, uh, sure enough, it's an O, and then a- an R. But then there, oh, oop, too bad, um, you know, the next letter is, is E.

Episode duration: 2:21:26

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

Transcript of episode EE1R8FYUJm0

Get more out of YouTube videos.

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

Add to Chrome