Transcript
00:00:00 The following is a conversation with Donald Knuth,
00:00:03 one of the greatest and most impactful computer scientists
00:00:06 and mathematicians ever.
00:00:09 He’s the recipient of the 1974 Turing Award,
00:00:13 considered the Nobel Prize of Computing.
00:00:16 He’s the author of the multi volume work,
00:00:18 the Magnum Opus, The Art of Computer Programming.
00:00:23 He made several key contributions
00:00:25 to the rigorous analysis of computational complexity
00:00:28 of algorithms, including the popularization
00:00:31 of asymptotic notation, that we all affectionately
00:00:34 know as the big O notation.
00:00:37 He also created the tech typesetting system,
00:00:40 which most computer scientists, physicists, mathematicians,
00:00:44 and scientists and engineers in general
00:00:47 use to write technical papers and make them look beautiful.
00:00:51 I can imagine no better guest to end 2019 with than Don,
00:00:56 one of the kindest, most brilliant people in our field.
00:01:00 This podcast was recorded many months ago.
00:01:03 It’s one I avoided because perhaps counterintuitively,
00:01:06 the conversation meant so much to me.
00:01:08 If you can believe it, I knew even less
00:01:10 about recording back then, so the camera angle is a bit off.
00:01:14 I hope that’s OK with you.
00:01:16 The office space was a big cramp for filming,
00:01:19 but it was a magical space where Don does most of his work.
00:01:24 It meant a lot to me that he would welcome me into his home.
00:01:27 It was quite a journey to get there.
00:01:28 As many people know, he doesn’t check email,
00:01:31 so I had to get creative.
00:01:33 The effort was worth it.
00:01:35 I’ve been doing this podcast on the side
00:01:37 for just over a year.
00:01:38 Sometimes I had to sacrifice a bit of sleep,
00:01:41 but always happy to do it and to be
00:01:43 part of an amazing community of curious minds.
00:01:46 Thank you for your kind words of support
00:01:48 and for the interesting discussions,
00:01:50 and I look forward to many more of those in 2020.
00:01:54 This is the Artificial Intelligence Podcast.
00:01:57 If you enjoy it, subscribe on YouTube,
00:01:59 give it five stars on Apple Podcast, follow on Spotify,
00:02:03 support on Patreon, or simply connect with me on Twitter
00:02:06 at Lex Friedman, spelled F R I D M A N.
00:02:10 I recently started doing ads at the end of the introduction.
00:02:13 I’ll do one or two minutes after introducing the episode
00:02:16 and never any ads in the middle that break
00:02:18 the flow of the conversation.
00:02:19 I hope that works for you
00:02:21 and doesn’t hurt the listening experience.
00:02:23 I provide timestamps for the start of the conversation
00:02:26 that you can skip to, but it helps
00:02:28 if you listen to the ad and support this podcast
00:02:31 by trying out the product or service being advertised.
00:02:34 This show is presented by Cash App,
00:02:36 the number one finance app in the App Store.
00:02:39 I personally use Cash App to send money to friends,
00:02:41 but you can also use it to buy, sell,
00:02:44 and deposit Bitcoin in just seconds.
00:02:46 Cash App also has a new investing feature.
00:02:49 You can buy fractions of a stock, say $1 worth,
00:02:52 no matter what the stock price is.
00:02:54 Broker services are provided by Cash App Investing,
00:02:57 a subsidiary of Square and member SIPC.
00:03:01 I’m excited to be working with Cash App
00:03:03 to support one of my favorite organizations called First,
00:03:06 best known for their first robotics and Lego competitions.
00:03:10 They educate and inspire hundreds of thousands of students
00:03:14 in over 110 countries and have a perfect rating
00:03:17 on Charity Navigator, which means that donated money
00:03:19 is used to maximum effectiveness.
00:03:23 When you get Cash App from the App Store or Google Play
00:03:26 and use code LexPodcast, you’ll get $10
00:03:30 and Cash App will also donate $10 to First,
00:03:32 which again is an organization
00:03:34 that I’ve personally seen inspire girls and boys
00:03:37 to dream of engineering a better world.
00:03:40 And now here’s my conversation with Donald Knuth.
00:03:44 In 1957 at Case Tech, you were once allowed
00:03:50 to spend several evenings with a IBM 650 computer
00:03:55 as you’ve talked about in the past
00:03:57 and you fell in love with computing then.
00:04:00 Can you take me back to that moment with the IBM 650?
00:04:06 What was it that grabbed you about that computer?
00:04:09 So the IBM 650 was this machine
00:04:14 that, well, it didn’t fill a room,
00:04:16 but it was big and noisy.
00:04:20 But when I first saw it, it was through a window
00:04:23 and there were just a lot of lights flashing on it.
00:04:26 And I was a freshman, I had a job with the statistics group
00:04:34 and I was supposed to punch cards for data
00:04:38 and then sort them on another machine,
00:04:40 but then they got this new computer, came in
00:04:43 and it had interesting lights, okay.
00:04:48 So, well, but I had a key to the building
00:04:51 so I could get in and look at it and got a manual for it.
00:04:55 And my first experience was based on the fact
00:04:58 that I could punch cards, basically,
00:05:00 which is a big thing for the,
00:05:02 but the IBM 650 was big in size,
00:05:06 but incredibly small in power.
00:05:10 In resources.
00:05:11 In memory, it had 2,000 words of memory
00:05:16 and a word of memory was 10 decimal digits plus a sign.
00:05:20 And it would do, to add two numbers together,
00:05:24 you could probably expect that would take,
00:05:28 I’ll say three milliseconds.
00:05:30 So.
00:05:31 It took pretty fast, the memory is the constraint,
00:05:33 the memory is the problem.
00:05:34 That was why it took three milliseconds,
00:05:36 because it took five milliseconds for the drum to go around
00:05:40 and you had to wait, I don’t know, five cycle times.
00:05:45 If you have an instruction, one position on the drum,
00:05:49 then it would be ready to read the data for the instruction
00:05:51 and go three notches.
00:05:55 The drum is 50 cycles around and you go three cycles
00:05:59 and you can get the data and then you can go
00:06:01 another three cycles and get to your next instruction
00:06:04 if the instruction is there, otherwise you spin
00:06:07 until you get to the right place.
00:06:09 And we had no random access memory whatsoever
00:06:13 until my senior year.
00:06:14 Senior year, we got 50 words of random access memory
00:06:17 which were priceless and we would move stuff
00:06:20 up to the random access memory in 60 word chunks
00:06:26 and then we would start again.
00:06:28 So subroutine wanted to go up there.
00:06:31 Could you have predicted the future 60 years later
00:06:35 of computing from then?
00:06:37 You know, in fact, the hardest question I was ever asked
00:06:39 was what could I have predicted?
00:06:44 In other words, the interviewer asked me,
00:06:47 she said, you know, what about computing has surprised you?
00:06:51 And immediately I ran, I rattled off a couple dozen things
00:06:54 and then she said, okay, so what didn’t surprise?
00:06:57 And I tried for five minutes to think of something
00:07:01 that I would have predicted and I couldn’t.
00:07:04 But let me say that this machine, I didn’t know,
00:07:09 well, there wasn’t much else in the world at that time.
00:07:13 The 650 was the first machine that there were more
00:07:17 than a thousand of ever.
00:07:19 Before that there were, you know, each machine
00:07:22 there might be a half a dozen examples,
00:07:25 maybe a couple dozen.
00:07:25 The first mass market, mass produced.
00:07:28 The first one, yeah, done in quantity.
00:07:30 And IBM didn’t sell them, they rented them,
00:07:36 but they rented them to universities that had a great deal.
00:07:44 And so that’s why a lot of students learned
00:07:48 about computers at that time.
00:07:51 So you refer to people, including yourself,
00:07:55 who gravitate toward a kind of computational thinking
00:07:59 as geeks, at least I’ve heard you use that terminology.
00:08:03 It’s true that I think there’s something
00:08:06 that happened to me as I was growing up
00:08:08 that made my brain structure in a certain way
00:08:11 that resonates with computers.
00:08:14 So there’s this space of people, 2% of the population,
00:08:17 you empirically estimate.
00:08:19 That’s been fairly constant over most of my career.
00:08:24 However, it might be different now
00:08:28 because kids have different experiences when they’re young.
00:08:30 Obviously.
00:08:31 So what does the world look like to a geek?
00:08:35 What is this aspect of thinking that is unique to,
00:08:43 that makes a geek?
00:08:45 This is a hugely important question.
00:08:48 In the 50s, IBM noticed that there were geeks
00:08:53 and nongeeks, and so they tried to hire geeks.
00:08:56 And they put out ads with papers saying,
00:08:58 if you play chess, come to Madison Avenue
00:09:01 for an interview or something like this.
00:09:03 They were trying for some things.
00:09:04 So what is it that I find easy
00:09:08 and other people tend to find harder?
00:09:11 And I think there’s two main things.
00:09:14 One is this, is the ability to jump levels
00:09:19 of abstraction.
00:09:26 So you see something in the large
00:09:29 and you see something in the small
00:09:31 and you pass between those unconsciously.
00:09:35 So you know that in order to solve some big problem,
00:09:40 what you need to do is add one to a certain register
00:09:44 and that gets you to another step.
00:09:47 And below the, I don’t go down to the electron level,
00:09:51 but I knew what those milliseconds were,
00:09:54 what the drum was like on the 650.
00:09:56 I knew how I was gonna factor a number
00:09:59 or find a root of an equation or something
00:10:03 because of what was doing.
00:10:04 And as I’m debugging, I’m going through,
00:10:08 did I make a key punch error?
00:10:09 Did I write the wrong instruction?
00:10:13 Do I have the wrong thing in a register?
00:10:15 And each level is different.
00:10:20 And this idea of being able to see something
00:10:25 at lots of levels and fluently go between them
00:10:30 seems to me to be much more pronounced
00:10:32 in the people that resonate with computers like I do.
00:10:37 So in my books, I also don’t stick just to the high level,
00:10:42 but I mix low level stuff with high level
00:10:48 and this means that some people think
00:10:54 that I should write better books and it’s probably true.
00:10:58 But other people say, well, but that’s,
00:11:01 if you think like that, then that’s the way
00:11:04 to train yourself, keep mixing the levels
00:11:06 and learn more and more how to jump between.
00:11:10 So that’s the one thing.
00:11:11 The other thing is that it’s more of a talent
00:11:17 to be able to deal with non uniformity
00:11:20 where there’s case one, case two, case three,
00:11:25 instead of having one or two rules that govern everything.
00:11:30 So it doesn’t bother me if I need,
00:11:35 like an algorithm has 10 steps to it,
00:11:38 each step does something else that doesn’t bother me,
00:11:41 but a lot of pure mathematics is based on one or two rules
00:11:45 which are universal and so this means
00:11:49 that people like me sometimes work with systems
00:11:53 that are more complicated than necessary
00:11:54 because it doesn’t bother us that we didn’t figure out
00:11:58 the simple rule.
00:12:00 And you mentioned that while Jacobi, Boole, Abel,
00:12:05 all the mathematicians in the 19th century
00:12:07 may have had symptoms of geek,
00:12:11 the first 100% legit geek was Turing, Alan Turing.
00:12:16 I think he had, yeah, a lot more of this quality
00:12:21 than anybody, just from reading the kind of stuff he did.
00:12:26 So how does Turing, what influence has Turing had on you
00:12:33 in your way of thinking?
00:12:35 I didn’t know that aspect of him
00:12:38 until after I graduated some years.
00:12:40 As undergraduate we had a class that talked about
00:12:44 computability theory and Turing machines
00:12:46 and it was all, it sounded like a very specific kind
00:12:52 of purely theoretical approach to stuff.
00:12:56 So when, how old were they when I learned
00:12:59 that he had a design machine and that he wrote a wonderful
00:13:08 manual for Manchester machines and he invented
00:13:14 all kinds of subroutines and he was a real hacker
00:13:21 that he had his hands dirty.
00:13:24 I thought for many years that he had only done
00:13:28 purely formal work, as I started reading
00:13:31 his own publications, I could feel this kinship
00:13:36 and of course he had a lot of peculiarities,
00:13:41 like he wrote numbers backwards because I mean,
00:13:45 left to right instead of right to left
00:13:47 because that’s, it was easier for computers
00:13:50 to process them that way.
00:13:52 What do you mean left to right?
00:13:54 He would write pi as 9, 5, 1, 4.3, I mean, okay.
00:14:05 Right, got it.
00:14:07 4, 1.3, on the blackboard.
00:14:10 I mean, he had trained himself to do that
00:14:16 because the computers he was working with
00:14:19 worked that way inside.
00:14:21 Trained himself to think like a computer.
00:14:22 There you go, that’s geek thinking.
00:14:26 You’ve practiced some of the most elegant
00:14:28 formalism in computer science and yet you’re
00:14:33 the creator of a concept like literate programming
00:14:36 which seems to move closer to natural language
00:14:40 type of description of programming.
00:14:43 Yeah, absolutely.
00:14:44 How do you see those two as conflicting
00:14:47 as the formalism of theory and the idea
00:14:50 of literate programming?
00:14:51 So there we are in a nonuniform system
00:14:54 where I don’t think one size fits all
00:14:57 and I don’t think all truth lies in one kind of expertise.
00:15:03 And so somehow, in a way you’d say my life
00:15:07 is a convex combination of English and mathematics.
00:15:13 And you’re okay with that.
00:15:14 And not only that, I think.
00:15:16 Thrive in it.
00:15:17 I wish, you know, I want my kids to be that way,
00:15:18 I want, et cetera, you know, use left brain,
00:15:21 right brain at the same time.
00:15:23 You got a lot more done.
00:15:25 That was part of the bargain.
00:15:28 And I’ve heard that you didn’t really read
00:15:32 for pleasure until into your 30s, you know, literature.
00:15:37 That’s true.
00:15:37 You know more about me than I do
00:15:39 but I’ll try to be consistent with what you read.
00:15:41 Yeah, no, just believe me.
00:15:42 I just go with whatever story I tell you.
00:15:45 It’ll be easier that way.
00:15:46 The conversation works.
00:15:47 Right, yeah, no, that’s true.
00:15:49 So I’ve heard mention of Philip Roth’s American Pastoral,
00:15:53 which I love as a book.
00:15:56 I don’t know if, it was mentioned as something,
00:15:59 I think, that was meaningful to you as well.
00:16:03 In either case, what literary books
00:16:05 had a lasting impact on you?
00:16:07 What literature, what poetry?
00:16:08 Yeah, okay, good question.
00:16:09 So I met Roth.
00:16:12 Oh, really?
00:16:13 Well, we both got doctors from Harvard on the same day,
00:16:16 so we had lunch together and stuff like that.
00:16:21 But he knew that, you know, computer books would never sell.
00:16:25 Well, all right, so you say you were a teenager
00:16:32 when you left Russia, so I have to say
00:16:36 that Tolstoy was one of the big influences on me,
00:16:39 especially like Anna Karnina,
00:16:42 not because of particularly of the plot of the story,
00:16:48 but because there’s this character who,
00:16:53 you know, the philosophical discussions,
00:17:00 the whole way of life is worked out there
00:17:02 among the characters,
00:17:03 and so that I thought was especially beautiful.
00:17:08 On the other hand, Dostoevsky, I didn’t like at all
00:17:12 because I felt that his genius was mostly
00:17:16 because he kept forgetting what he had started out to do,
00:17:18 and he was just sloppy.
00:17:21 I didn’t think that he polished his stuff at all,
00:17:26 and I tend to admire somebody
00:17:29 who dots the I’s and crosses the T’s.
00:17:32 So the music of the pros is what you admire more than…
00:17:36 I certainly do admire the music of the language,
00:17:39 which I couldn’t appreciate in the Russian original,
00:17:42 but I can in Victor Hugo, because French is closer.
00:17:47 But Tolstoy, I like the same reason.
00:17:51 I like Herman Wouk as a novelist.
00:17:54 I think like his book, Marjorie Morningstar,
00:17:59 has a similar character in Hugo
00:18:02 who developed his own personal philosophy,
00:18:04 and it goes in the…
00:18:08 What’s consistent?
00:18:10 Yeah, right, and it’s worth pondering.
00:18:14 So, yeah.
00:18:15 So you don’t like Nietzsche, and…
00:18:18 Like what?
00:18:18 You don’t like Friedrich Nietzsche, or…
00:18:20 Nietzsche, yeah, no, no, yeah, this has…
00:18:23 I keep seeing quotations from Nietzsche,
00:18:26 and he never tempt me to read any further.
00:18:30 Well, he’s full of contradictions,
00:18:31 and you will certainly not appreciate him.
00:18:34 But Schiller, I’m trying to get across
00:18:38 what I appreciate in literature,
00:18:40 and part of it is, as you say,
00:18:44 the music of the language, the way it flows,
00:18:48 and take Raymond Chandler versus Dashiell Hammett.
00:18:52 Dashiell Hammett’s sentences are awful,
00:18:55 and Raymond Chandler’s are beautiful, they just flow.
00:18:59 So I don’t read literature
00:19:04 because it’s supposed to be good for me,
00:19:07 or because somebody said it’s great,
00:19:09 but I find things that I like.
00:19:14 I mean, you mentioned you were dressed like James Bond,
00:19:18 so I love Ian Fleming.
00:19:20 I think he had a really great gift for…
00:19:23 If he has a golf game, or a game of bridge,
00:19:26 or something and this comes into his story,
00:19:29 it’ll be the most exciting golf game,
00:19:32 or the absolute best possible hands of bridge that exists,
00:19:38 and he exploits it and tells it beautifully.
00:19:45 So in connecting some things here,
00:19:49 looking at literate programming
00:19:51 and being able to convey in code algorithms
00:19:56 to a computer in a way that mimics how humans speak,
00:20:05 what do you think about natural language in general
00:20:08 and the messiness of our human world,
00:20:11 about trying to express difficult things?
00:20:15 So the idea of literate programming
00:20:17 is really to try to understand something better
00:20:22 by seeing it from at least two perspectives,
00:20:25 the formal and the informal.
00:20:27 If we’re trying to understand a complicated thing,
00:20:30 if we can look at it in different ways.
00:20:32 And so this is in fact the key to technical writing,
00:20:36 a good technical writer trying not to be obvious about it,
00:20:40 but says everything twice, formally and informally,
00:20:43 or maybe three times, but you try to give the reader
00:20:48 a way to put the concept into his own brain
00:20:56 or her own brain.
00:20:57 Is that better for the writer or the reader or both?
00:21:01 Well, the writer just tries to understand the reader.
00:21:06 That’s the goal of a writer,
00:21:08 is to have a good mental image of the reader
00:21:12 and to say what the reader expects next
00:21:15 and to impress the reader with what has impressed the writer
00:21:22 why something is interesting.
00:21:24 So when you have a computer program,
00:21:26 we try to, instead of looking at it as something
00:21:29 that we’re just trying to give instruction to the computer,
00:21:31 what we really wanna be is giving insight
00:21:35 to the person who’s gonna be maintaining this program
00:21:40 or to the programmer himself when he’s debugging it
00:21:44 as to why this stuff is being done.
00:21:47 And so all the techniques of exposition
00:21:51 that a teacher uses or a book writer uses
00:21:54 make you a better programmer
00:21:55 if your program is gonna be not just a one shot deal.
00:22:00 So how difficult is that?
00:22:04 Do you see hope for the combination of informal and formal
00:22:10 for the programming task?
00:22:12 Yeah, I’m the wrong person to ask, I guess,
00:22:15 because I’m a geek, but I think for a geek it’s easy.
00:22:21 Some people have difficulty writing
00:22:24 and that might be because there’s something
00:22:29 in their brain structure that makes it hard
00:22:31 for them to write or it might be something
00:22:34 just that they haven’t had enough practice.
00:22:36 I’m not the right one to judge,
00:22:39 but I don’t think you can teach any person
00:22:42 any particular skill.
00:22:44 I do think that writing is half of my life
00:22:49 and so I put it together in a literate program.
00:22:53 Even when I’m writing a one shot program,
00:22:55 I write it in a literate way
00:23:00 because I get it right faster that way.
00:23:04 Now does it get compiled automatically?
00:23:07 Or?
00:23:08 So I guess on the technical side, my question was
00:23:12 how difficult is it to design a system
00:23:14 where much of the programming is done informally?
00:23:19 Informally?
00:23:20 Yeah, informally.
00:23:22 I think whatever works to make it understandable is good,
00:23:28 but then you have to also understand how informal is.
00:23:33 You have to know the limitations.
00:23:35 So by putting the formal and informal together,
00:23:39 this is where it gets locked into your brain.
00:23:45 You can say informally, well,
00:23:50 I’m working on a problem right now, so.
00:23:52 Let’s go there.
00:23:54 Can you give me an example of connecting
00:23:58 the informal and the formal?
00:24:00 Well, it’s a little too complicated an example.
00:24:03 There’s a puzzle that’s self referential.
00:24:06 It’s called a Japanese arrow puzzle.
00:24:09 And you’re given a bunch of boxes.
00:24:13 Each one points north, east, south, or west.
00:24:16 And at the end, you’re supposed to fill in each box
00:24:19 with the number of distinct numbers that it points to.
00:24:25 So if I put a three in a box, that means that,
00:24:28 and it’s pointing to five other boxes,
00:24:30 that means that there’s gonna be three different numbers
00:24:32 in those five boxes.
00:24:34 And those boxes are pointing,
00:24:36 one of them might be pointing to me,
00:24:38 one of them might be pointing the other way.
00:24:40 But anyway, I’m supposed to find a set of numbers
00:24:45 that obeys this complicated condition
00:24:48 that each number counts how many distinct numbers
00:24:52 it points to.
00:24:54 And so a guy sent me his solution to this problem
00:24:58 where he presents formal statements
00:25:04 that say either this is true or this is true
00:25:07 or this is true.
00:25:08 And so I try to render that formal statement informally
00:25:13 and I try to say, I contain a three
00:25:17 and the guys I’m pointing to contain the numbers one,
00:25:23 two, and six.
00:25:25 So by putting it informally and also I convert it
00:25:27 into a dialogue statement,
00:25:32 that helps me understand the logical statement
00:25:35 that he’s written down as a string of numbers
00:25:37 in terms of some abstract variables that he had.
00:25:41 That’s really interesting.
00:25:42 So maybe an extension of that,
00:25:45 there has been a resurgence in computer science
00:25:48 and machine learning and neural networks.
00:25:52 So using data to construct algorithms.
00:25:56 So it’s another way to construct algorithms, really.
00:25:59 Yes, exactly.
00:26:00 If you can think of it that way.
00:26:03 So as opposed to natural language to construct algorithms,
00:26:06 use data to construct algorithms.
00:26:08 So what’s your view of this branch of computer science
00:26:13 where data is almost more important
00:26:15 than the mechanism of the algorithm?
00:26:18 It seems to be suited to a certain kind of non geek,
00:26:22 which is probably why it’s taken off.
00:26:29 It has its own community that really resonates with that.
00:26:34 But it’s hard to trust something like that
00:26:38 because nobody, even the people who work with it,
00:26:43 they have no idea what has been learned.
00:26:47 That’s a really interesting thought
00:26:49 that it makes algorithms more accessible
00:26:54 to a different community, a different type of brain.
00:26:58 Yep.
00:26:59 And that’s really interesting
00:27:01 because just like literate programming perhaps
00:27:05 could make programming more accessible
00:27:08 to a certain kind of brain.
00:27:10 There are people who think it’s just a matter of education
00:27:13 and anybody can learn to be a great programmer.
00:27:16 Anybody can learn to be a great skier.
00:27:23 I wish that were true,
00:27:24 but I know that there’s a lot of things
00:27:27 that I’ve tried to do and I was well motivated
00:27:31 and I kept trying to build myself up
00:27:33 and I never got past a certain level.
00:27:36 I can’t view, for example,
00:27:38 I can’t view three dimensional objects in my head.
00:27:43 I have to make a model and look at it
00:27:46 and study it from all points of view
00:27:48 and then I start to get some idea.
00:27:50 But other people are good at four dimensions.
00:27:54 Physicists.
00:27:55 Yeah.
00:27:57 So let’s go to the art of computer programming.
00:28:05 In 1962, you set the table of contents
00:28:09 for this magnum opus, right?
00:28:12 Yep.
00:28:13 It was supposed to be a single book with 12 chapters.
00:28:16 Now today, what is it, 57 years later,
00:28:22 you’re in the middle of volume four of seven?
00:28:26 In the middle of volume four B is.
00:28:28 Four B.
00:28:29 More precisely.
00:28:30 Can I ask you for an impossible task,
00:28:32 which is try to summarize the book so far
00:28:38 maybe by giving a little examples.
00:28:41 So from the sorting and the search
00:28:43 and the combinatorial algorithms,
00:28:46 if you were to give a summary, a quick elevator summary.
00:28:50 Elevator, that’s great.
00:28:51 Yeah, right.
00:28:52 But depending how many floors there are in the building.
00:28:54 Yeah.
00:28:56 The first volume called Fundamental Algorithms
00:28:58 talks about something that you can’t,
00:29:02 the stuff you can’t do without.
00:29:04 You have to know the basic concepts of what is a program,
00:29:09 what is an algorithm.
00:29:11 And it also talks about a low level machine
00:29:15 so you can have some kind of an idea what’s going on.
00:29:20 And it has basic concepts of input and output
00:29:24 and subroutines.
00:29:26 Induction.
00:29:27 Induction, right.
00:29:29 Mathematical, preliminary.
00:29:31 So the thing that makes my book different
00:29:34 from a lot of others is that I try to,
00:29:39 not only present the algorithm,
00:29:40 but I try to analyze them,
00:29:42 which means quantitatively I say,
00:29:44 not only does it work, but it works this fast.
00:29:47 Okay, and so I need math for that.
00:29:49 And then there’s the standard way to structure data inside
00:29:52 and represent information in the computer.
00:29:56 So that’s all volume one.
00:29:58 Volume two talks, it’s called Seminumerical Algorithms.
00:30:01 And here we’re writing programs,
00:30:04 but we’re also dealing with numbers.
00:30:07 Algorithms deal with any kinds of objects,
00:30:10 but specific when there’s objects or numbers,
00:30:13 well then we have certain special paradigms
00:30:17 that apply to things that involve numbers.
00:30:20 And so there’s arithmetic on numbers
00:30:24 and there’s matrices full of numbers,
00:30:27 there’s random numbers,
00:30:29 and there’s power series full of numbers.
00:30:31 There’s different algebraic concepts
00:30:34 that have numbers in structured ways.
00:30:37 And arithmetic in the way a computer
00:30:38 would think about arithmetic, so floating point.
00:30:41 Floating point arithmetic, high precision arithmetic,
00:30:44 not only addition, subtraction, multiplication,
00:30:47 but also comparison of numbers.
00:30:50 So then volume three talks about.
00:30:53 I like that one, sorting and search.
00:30:55 Sorting and search. I love sorting.
00:30:57 Right, so here we’re not dealing necessarily with numbers
00:31:00 because you sort letters and other objects
00:31:03 and searching we’re doing all the time with Google nowadays,
00:31:06 but I mean, we have to find stuff.
00:31:09 So again, algorithms that underlie
00:31:14 all kinds of applications.
00:31:16 None of these volumes is about a particular application,
00:31:19 but the applications are examples
00:31:20 of why people want to know about sorting,
00:31:23 why people want to know about random numbers.
00:31:26 So then volume four goes into combinatorial algorithm.
00:31:31 This is where we have zillions of things to deal with
00:31:34 and here we keep finding cases where one good idea
00:31:41 can make something go more than a million times faster.
00:31:45 And we’re dealing with problems
00:31:49 that are probably never gonna be solved efficiently,
00:31:53 but that doesn’t mean we give up on them
00:31:56 and we have this chance to have good ideas
00:32:00 and go much, much faster on them.
00:32:02 So that’s combinatorial algorithms
00:32:04 and those are the ones that are,
00:32:06 I mean, you said sorting is most fun for you.
00:32:09 It’s true, it’s fun, but combinatorial algorithms
00:32:13 are the ones that I always enjoyed the most
00:32:18 because that’s when my skillet programming had most payoff.
00:32:22 The difference between an obvious algorithm
00:32:26 that you think up first thing and an interesting,
00:32:31 subtle algorithm that’s not so obvious,
00:32:34 but run circles around the other one,
00:32:37 that’s where computer science really comes in.
00:32:43 And a lot of these combinatorial methods
00:32:46 were found first in applications
00:32:49 to artificial intelligence or cryptography.
00:32:52 And in my case, I just liked them
00:32:58 and it was associated more with puzzles.
00:33:01 Do you like them most in the domain of graphs
00:33:04 and graph theory?
00:33:04 Graphs are great because they’re terrific models
00:33:08 of so many things in the real world
00:33:10 and you throw numbers on a graph,
00:33:13 you got a network and so there you have many more things.
00:33:18 But combinatorial in general is any arrangement
00:33:24 of objects that has some kind of higher structure,
00:33:30 nonrandom structure and is it possible
00:33:35 to put something together satisfying all these conditions?
00:33:39 Like I mentioned arrows a minute ago,
00:33:41 is there a way to put these numbers
00:33:44 on a bunch of boxes that are pointing to each other?
00:33:47 Is that gonna be possible at all?
00:33:48 That’s volume four.
00:33:50 That’s volume four.
00:33:52 What does the future hold?
00:33:52 Volume four A was part one.
00:33:54 And what happened was in 1962,
00:33:58 when I started writing down a table of contents,
00:34:03 it wasn’t gonna be a book
00:34:04 about computer programming in general,
00:34:07 it was gonna be a book about how to write compilers.
00:34:10 And I was asked to write a book
00:34:14 explaining how to write a compiler.
00:34:16 And at that time, there were only a few dozen people
00:34:22 in the world who had written compilers
00:34:24 and I happened to be one of them.
00:34:25 And I also had some experience writing
00:34:30 for like the campus newspaper and things like that.
00:34:35 So I said, okay, great.
00:34:38 I’m the only person I know who’s written a compiler
00:34:42 but hasn’t invented any new techniques
00:34:43 for writing compilers.
00:34:45 And all the other people I knew had super ideas
00:34:49 but I couldn’t see that they would be able to write a book
00:34:52 that would describe anybody else’s ideas with their own.
00:34:55 So I could be the journalist and I could explain
00:34:59 what all these cool ideas about compiler writing were.
00:35:04 And then I started putting down,
00:35:07 well, yeah, you need to have a chapter
00:35:10 about data structures.
00:35:11 You need to have some introductory material.
00:35:13 I wanna talk about searching
00:35:15 because a compiler writer has to look up the variables
00:35:21 in a symbol table and find out which,
00:35:27 when you write the name of a variable in one place,
00:35:29 it’s supposed to be the same
00:35:31 as the one you put somewhere else.
00:35:32 So you need all these basic techniques
00:35:35 and I kinda know some arithmetic and stuff.
00:35:40 So I threw in these chapters
00:35:42 and I threw in a chapter on combinatorics
00:35:44 because that was what I really enjoyed programming the most
00:35:48 but there weren’t many algorithms known
00:35:50 about combinatorial methods in 1962.
00:35:53 So that was a kind of a short chapter
00:35:55 but it was sort of thrown in just for fun.
00:35:58 And chapter 12 was gonna be actual compilers,
00:36:01 applying all the stuff in chapters one to 11
00:36:05 to make compilers.
00:36:06 Well, okay, so that was my table of contents from 1962.
00:36:10 And during the 70s, the whole field of combinatorics
00:36:15 went through a huge explosion.
00:36:17 People talk about a combinatorial explosion
00:36:20 and they usually mean by that that the number of cases
00:36:23 goes up, you know, you change end to end plus one
00:36:26 and all of a sudden your problem
00:36:28 has gotten more than 10 times harder.
00:36:31 But there was an explosion of ideas
00:36:35 about combinatorics in the 70s to the point
00:36:38 that like take 1975, I bet you more than half
00:36:44 of all the journals of computer science
00:36:46 were about combinatorial methods.
00:36:49 What kind of problems were occupying people’s minds?
00:36:52 What kind of problems in combinatorics?
00:36:54 Was it satisfiability, graph theory?
00:36:57 Yeah, graph theory was quite dominant.
00:36:59 I mean, but all of the NP hard problems
00:37:04 that you have like Hamiltonian path.
00:37:08 Travel salesman.
00:37:09 Going beyond graphs, you had operation research
00:37:14 whenever there was a small class of problems
00:37:17 that had efficient solutions and they were usually
00:37:20 associated with matron theory,
00:37:21 special mathematical construction.
00:37:24 But once we went to things that involve
00:37:27 three things at a time instead of two,
00:37:30 all of a sudden things got harder.
00:37:32 So we had satisfiability problems where if you have clauses,
00:37:37 every clause has two logical elements in it,
00:37:40 then we can satisfy it in linear time.
00:37:43 We can test for satisfiability in linear time,
00:37:45 but if you allow yourself three variables in the clause,
00:37:49 then nobody knows how to do it.
00:37:52 So these articles were about trying to find better ways
00:37:56 to solve cryptography problems and graph theory problems.
00:38:01 We have lots of data, but we didn’t know how to find
00:38:05 the best subsets of the data.
00:38:07 Like with sorting, we could get the answer.
00:38:12 Didn’t take long.
00:38:12 So how did it continue to change from the 70s to today?
00:38:16 Yeah, so now there may be half a dozen conferences
00:38:20 whose topic is combinatorics, a different kind,
00:38:24 but fortunately I don’t have to rewrite my book every month
00:38:28 like I had to in the 70s.
00:38:31 But still there’s huge amount of work being done
00:38:34 and people getting better ideas on these problems
00:38:37 that don’t seem to have really efficient solutions,
00:38:41 but we still do a lot more with them.
00:38:44 And so this book that I’m finishing now is,
00:38:48 I’ve got a whole bunch of brand new methods
00:38:51 that as far as I know, there’s no other book
00:38:55 that covers this particular approach.
00:39:00 And so I’m trying to do my best of exploring
00:39:04 the tip of the iceberg and I try out lots of things
00:39:10 and keep rewriting as I find better method.
00:39:16 So what’s your writing process like?
00:39:18 What’s your thinking and writing process like every day?
00:39:24 What’s your routine even?
00:39:26 Yeah, I guess it’s actually the best question
00:39:29 because I spend seven days a week doing it.
00:39:34 You’re the most prepared to answer it.
00:39:36 Yeah, but okay.
00:39:38 So the chair I’m sitting in is where I do…
00:39:45 It’s where the magic happens.
00:39:46 Well, reading and writing, the chair is usually
00:39:49 sitting over there where I have other books,
00:39:51 some reference books, but I found this chair
00:39:55 which was designed by a Swedish guy anyway.
00:40:00 It turns out this is the only chair I can really sit in
00:40:02 for hours and hours and not know that I’m in a chair.
00:40:05 But then I have the standup desk right next to us
00:40:09 and so after I write something with pencil and eraser,
00:40:13 I get up and I type it and revise and rewrite.
00:40:20 I’m standing up.
00:40:21 The kernel of the idea is first put on paper.
00:40:24 Yeah.
00:40:25 Right.
00:40:26 And I’ll write maybe five programs a week,
00:40:31 of course, literate programming.
00:40:33 And these are, before I describe something in my book,
00:40:36 I always program it to see how it’s working
00:40:39 and I try it a lot.
00:40:41 So for example, I learned at the end of January,
00:40:45 I learned of a breakthrough by four Japanese people
00:40:49 who had extended one of my methods in a new direction.
00:40:54 And so I spent the next five days writing a program
00:40:57 to implement what they did.
00:40:59 And then they had only generalized part of what I had done
00:41:04 so then I had to see if I could generalize more parts of it.
00:41:07 And then I had to take their approach
00:41:10 and I had to try it out on a couple of dozen
00:41:13 of the other problems I had already worked out
00:41:16 with my old methods.
00:41:18 And so that took another couple of weeks.
00:41:20 And then I started to see the light
00:41:23 and I started writing the final draft
00:41:28 and then I would type it up,
00:41:32 involve some new mathematical questions.
00:41:34 And so I wrote to my friends
00:41:36 who might be good at solving those problems
00:41:39 and they solved some of them.
00:41:42 So I put that in as exercises.
00:41:45 And so a month later, I had absorbed one new idea
00:41:50 that I learned and I’m glad I heard about it in time.
00:41:54 Otherwise, I wouldn’t put my book out
00:41:56 before I’d heard about the idea.
00:41:59 On the other hand, this book was supposed to come in
00:42:01 at 300 pages and I’m up to 350 now.
00:42:04 That added 10 pages to the book.
00:42:06 But if I learn about another one,
00:42:09 my publisher is gonna shoot me.
00:42:11 Well, so in that process, in that one month process,
00:42:17 are some days harder than others?
00:42:19 Are some days harder than others?
00:42:20 Well, yeah, my work is fun, but I also work hard
00:42:24 and every big job has parts
00:42:27 that are a lot more fun than others.
00:42:29 And so many days I’ll say,
00:42:31 why do I have to have such high standards?
00:42:35 Why couldn’t I just be sloppy and not try this out
00:42:37 and just report the answer?
00:42:40 But I know that people are calling me to do this
00:42:45 and so, okay, so, okay, Don, I’ll grit my teeth and do it.
00:42:50 And then the joy comes out when I see that actually,
00:42:54 I’m getting good results and I get even more
00:42:58 when I see that somebody has actually read
00:43:01 and understood what I wrote
00:43:02 and told me how to make it even better.
00:43:05 I did wanna mention something about the method.
00:43:10 So I got this tablet here, where I do the first,
00:43:20 the first writing of concepts, okay, so.
00:43:25 And what language is that in?
00:43:27 Right, so take a look at it, but you know,
00:43:29 here, random say, explain how to draw
00:43:33 such skewed pixel diagrams, okay, so.
00:43:36 I got this paper about 40 years ago
00:43:39 when I was visiting my sister in Canada
00:43:42 and they make tablets of paper with this nice large size
00:43:47 and just the right.
00:43:48 A very small space between lines.
00:43:49 Small spaces, yeah, yeah, take a look.
00:43:51 Maybe also just show it.
00:43:54 Yeah.
00:43:56 Yeah.
00:43:57 Wow.
00:43:59 You know, I’ve got these manuscripts
00:44:00 going back to the 60s.
00:44:04 And those are where I’m getting my ideas on paper, okay.
00:44:09 But I’m a good typist.
00:44:10 In fact, I went to typing school when I was in high school
00:44:14 and so I can type faster than I think.
00:44:17 So then when I do the editing, stand up and type,
00:44:21 then I revise this and it comes out a lot different
00:44:24 than what, you know, for style and rhythm
00:44:27 and things like that come out at the typing stage.
00:44:31 And you type in tech.
00:44:32 And I type in tech.
00:44:34 And can you think in tech?
00:44:37 No.
00:44:38 So.
00:44:39 To a certain extent, I have only a small number of idioms
00:44:43 that I use.
00:44:44 Like, you know, I’m beginning with theorem,
00:44:45 I do something for displayed equation,
00:44:47 I do something and so on.
00:44:49 But I have to see it and.
00:44:53 In the way that it’s on paper here.
00:44:55 Yeah, right.
00:44:56 So for example, Turing wrote, what, The Other Direction.
00:44:59 You don’t write macros, you don’t think in macros.
00:45:04 Not particularly, but when I need a macro,
00:45:06 I’ll go ahead and do it.
00:45:09 But the thing is, I also write to fit.
00:45:12 I mean, I’ll change something if I can save a line.
00:45:18 You know, it’s like haiku.
00:45:19 I’ll figure out a way to rewrite the sentence
00:45:21 so that it’ll look better on the page.
00:45:25 And I shouldn’t be wasting my time on that,
00:45:27 but I can’t resist because I know it’s only another 3%
00:45:32 of the time or something like that.
00:45:33 And it could also be argued that
00:45:36 that is what life is about.
00:45:39 Ah, yes, in fact, that’s true.
00:45:43 Like, I work in the garden one day a week
00:45:45 and that’s kind of a description of my life
00:45:48 is getting rid of weeds, you know,
00:45:50 removing bugs for programs.
00:45:52 So, you know, a lot of writers talk about,
00:45:55 you know, basically suffering, the writing processes,
00:45:58 having, you know, it’s extremely difficult.
00:46:02 And I think of programming, especially,
00:46:05 or technical writing that you’re doing can be like that.
00:46:08 Do you find yourself, methodologically,
00:46:13 how do you every day sit down to do the work?
00:46:16 Is it a challenge?
00:46:18 You kind of say it’s, you know, it’s fun.
00:46:24 But it’d be interesting to hear if there are non fun parts
00:46:29 that you really struggle with.
00:46:31 Yeah, so the fun comes when I’m able to put together
00:46:35 ideas of two people who didn’t know about each other.
00:46:39 And so I might be the first person
00:46:41 that saw both of their ideas.
00:46:44 And so then, you know, then I get to make the synthesis
00:46:47 and that gives me a chance to be creative.
00:46:52 But the dredge work is where I’ve got to chase everything
00:46:56 down to its root.
00:46:57 This leads me into really interesting stuff.
00:47:00 I mean, I learn about Sanskrit and I try to give credit
00:47:05 to all the authors.
00:47:06 And so I write to people who know the authors
00:47:12 if they’re dead or I communicate this way.
00:47:16 And I got to get the math right.
00:47:18 And I got to tackle all my programs,
00:47:20 try to find holes in them.
00:47:22 And I rewrite the programs after I get a better idea.
00:47:26 Is there ever dead ends?
00:47:28 Oh yeah, I throw stuff out, yeah.
00:47:31 One of the things that I spend a lot of time preparing,
00:47:36 a major example based on the game of baseball.
00:47:40 And I know a lot of people for whom baseball
00:47:44 is the most important thing in the world.
00:47:46 But I also know a lot of people for whom cricket
00:47:49 is the most important in the world or soccer or something.
00:47:52 You know, and I realized that if I had a big example,
00:47:57 I mean, it was gonna have a fold out illustration
00:47:59 and everything.
00:48:00 And I was saying, well, what am I really teaching
00:48:02 about algorithms here where I had this baseball example?
00:48:06 And if I was a person who knew only cricket,
00:48:10 wouldn’t they, what would they think about this?
00:48:12 And so I’ve ripped the whole thing out.
00:48:14 But I had something that would have really appealed
00:48:19 to people who grew up with baseball
00:48:20 as a major theme in their life.
00:48:24 Which is a lot of people, but still a minority.
00:48:28 Small minority, I took out bowling too.
00:48:33 Even a smaller minority.
00:48:36 What’s the art in the art of programming?
00:48:40 Why is there, of the few words in the title,
00:48:45 why is art one of them?
00:48:46 Yeah, well, that’s what I wrote my Turing lecture about.
00:48:50 And so when people talk about art,
00:48:54 it really, I mean, what the word means is
00:49:00 something that’s not in nature.
00:49:02 So when you have artificial intelligence,
00:49:06 art comes from the same root,
00:49:09 saying that this is something
00:49:11 that was created by human beings.
00:49:14 And then it’s gotten a further meaning often of fine art,
00:49:19 which has this beauty to the mix.
00:49:21 And so we have things that are artistically done,
00:49:25 and this means not only done by humans,
00:49:28 but also done in a way that’s elegant and brings joy.
00:49:35 And has, I guess,
00:49:39 Tolstoy versus Dostoevsky going back.
00:49:44 But anyway, it’s that part that says
00:49:48 that it’s done well, as well as not only different
00:49:53 from nature.
00:49:54 In general, then, art is what human beings
00:49:59 are specifically good at.
00:50:01 And when they say artificial intelligence,
00:50:04 well, they’re trying to mimic human beings.
00:50:07 But there’s an element of fine art and beauty.
00:50:11 You are one.
00:50:12 That’s what I try to also say,
00:50:14 that you can write a program and make a work of art.
00:50:19 So now, in terms of surprising,
00:50:27 what ideas in writing from search
00:50:31 to the combinatorial algorithms,
00:50:34 what ideas have you come across
00:50:37 that were particularly surprising to you
00:50:42 that changed the way you see a space of problems?
00:50:48 I get a surprise every time I have a bug
00:50:49 in my program, obviously.
00:50:51 But that isn’t really what you’re at.
00:50:53 More transformational than surprising.
00:50:57 For example, in volume 4A,
00:50:59 I was especially surprised when I learned
00:51:02 about data structure called BDD,
00:51:05 Boolean Decision Diagram.
00:51:08 Because I sort of had the feeling
00:51:10 that as an old timer,
00:51:14 and I’ve been programming since the 50s,
00:51:19 and BDDs weren’t invented until 1986.
00:51:23 And here comes a brand new idea that revolutionizes
00:51:26 the way to represent a Boolean function.
00:51:29 And Boolean functions are so basic
00:51:32 to all kinds of things in,
00:51:35 I mean, logic is, underlies it.
00:51:39 Everything we can describe,
00:51:41 all of what we know in terms of logic somehow,
00:51:45 and propositional logic,
00:51:49 I thought that was cut and dried
00:51:52 and everything was known.
00:51:55 But here comes
00:51:58 Randy Bryant
00:52:00 and discovers that BDDs are incredibly powerful.
00:52:05 Then, so that means I have a whole new section
00:52:12 to the book that I never would have thought of
00:52:14 until 1986, not even until 1990s,
00:52:17 when people started to use it
00:52:21 for a billion dollar of applications.
00:52:26 And it was the standard way to design computers
00:52:29 for a long time,
00:52:30 until SAT solvers came along in the year 2000.
00:52:34 So that’s another great big surprise.
00:52:36 So a lot of these things have totally changed
00:52:40 the structure of my book.
00:52:42 And the middle third of volume 4B is about SAT solvers,
00:52:47 and that’s 300 plus pages,
00:52:51 which is all about material,
00:52:55 mostly about material that was discovered in this century.
00:52:59 And I had to start from scratch
00:53:02 and meet all the people in the field
00:53:04 and write 15 different SAT solvers
00:53:07 that I wrote while preparing that.
00:53:10 Seven of them are described in the book.
00:53:12 Others were from my own experience.
00:53:16 So newly invented data structures
00:53:17 or ways to represent?
00:53:20 A whole new class of algorithm.
00:53:22 Whole new class of algorithm.
00:53:23 Yeah, and the interesting thing about the BDDs
00:53:27 was that the theoreticians started looking at it
00:53:30 and started to describe all the things
00:53:33 you couldn’t do with BDDs.
00:53:36 And so they were getting a bad name
00:53:42 because, okay, they were useful,
00:53:45 but they didn’t solve every problem.
00:53:48 I’m sure that the theoreticians are,
00:53:50 in the next 10 years,
00:53:51 are gonna show why machine learning
00:53:54 doesn’t solve everything.
00:53:56 But I’m not only worried about the worst case,
00:53:59 I get a huge delight when I can actually solve a problem
00:54:03 that I couldn’t solve before.
00:54:05 Even though I can’t solve the problem
00:54:07 that it suggests is a further problem,
00:54:10 I know that I’m way better than I was before.
00:54:14 And so I found out that BDDs could do
00:54:16 all kinds of miraculous things.
00:54:19 And so I had to spend quite a few years
00:54:27 learning about that territory.
00:54:31 So in general, what brings you more pleasure?
00:54:36 Proving or showing a worst case analysis of an algorithm
00:54:40 or showing a good average case
00:54:43 or just showing a good case?
00:54:45 That something good,
00:54:46 pragmatically can be done with this algorithm.
00:54:49 Yeah, I like a good case
00:54:50 that is maybe only a million times faster
00:54:53 than I was able to do before.
00:54:55 But, and not worry about the fact
00:54:57 that it’s still gonna take too long
00:55:02 if I double the size of the problem.
00:55:05 So that said, you popularized the asymptotic notation
00:55:10 for describing running time,
00:55:13 obviously in the analysis of algorithms.
00:55:15 Worst case is such an important part.
00:55:18 Do you see any aspects of that kind of analysis
00:55:22 as lacking and notation too?
00:55:26 Well, the main purpose should have notations
00:55:29 that help us for the problems we wanna solve.
00:55:33 And so they match our intuitions.
00:55:36 And people who worked in number theory
00:55:38 had used asymptotic notation in a certain way,
00:55:43 but it was only known to a small group of people.
00:55:46 And I realized that, in fact,
00:55:49 it was very useful to be able to have a notation
00:55:52 for something that we don’t know exactly what it is,
00:55:55 but we only know partial about it.
00:55:57 And so instead, so for example,
00:56:00 instead of big O notation,
00:56:02 let’s just take a much simpler notation
00:56:05 where I’d say zero or one, or zero, one or two.
00:56:10 And suppose that when I had been in high school,
00:56:13 we would be allowed to put in the middle of our formula,
00:56:18 X plus zero, one or two equals Y, okay?
00:56:23 And then we would learn how to multiply
00:56:27 two such expressions together and deal with them.
00:56:32 Well, the same thing big O notation says,
00:56:35 here’s something that’s, I’m not sure what it is,
00:56:38 but I know it’s not too big.
00:56:41 I know it’s not bigger than some constant times N squared
00:56:44 or something like that.
00:56:45 So I write big O of N squared.
00:56:47 And now I learned how to add big O of N squared
00:56:50 to big O of N cubed.
00:56:51 And I know how to add big O of N squared to plus one
00:56:55 and square that and how to take logarithmic exponentials
00:56:58 where I have big O’s in the middle of them.
00:57:00 And that turned out to be hugely valuable
00:57:04 in all of the work that I was trying to do
00:57:06 as I’m trying to figure out how good an algorithm is.
00:57:09 So have there been algorithms in your journey
00:57:12 that perform very differently in practice
00:57:16 than they do in theory?
00:57:18 Well, the worst case of a combinatorial algorithm
00:57:21 is almost always horrible.
00:57:25 But we have SAT solvers that are solving,
00:57:28 where one of the last exercises in that part of my book
00:57:33 was to figure out a problem that has 100 variables
00:57:37 that’s difficult for a SAT solver.
00:57:41 But you would think that a problem
00:57:43 with 100 billion variables has,
00:57:46 requires you to do two to the 100th operations
00:57:50 because that’s the number of possibilities
00:57:52 when you have 100 billion variables in two to the 100th.
00:57:57 Two to the 100th is way bigger than we can handle.
00:58:00 10 to the 17th is a lot.
00:58:03 You’ve mentioned over the past few years
00:58:05 that you believe P may be equal to NP,
00:58:08 but that it’s not really,
00:58:11 if somebody does prove that P equals NP,
00:58:14 it will not directly lead to an actual algorithm
00:58:16 to solve difficult problems.
00:58:19 Can you explain your intuition here?
00:58:21 Has it been changed?
00:58:23 And in general, on the difference between
00:58:25 easy and difficult problems of P and NP and so on?
00:58:28 Yeah, so the popular idea is if an algorithm exists,
00:58:34 then somebody will find it.
00:58:36 And it’s just a matter of writing it down.
00:58:44 But many more algorithms exist
00:58:48 than anybody can understand or ever make use of.
00:58:51 Or discover, yeah.
00:58:53 Because they’re just way beyond human comprehension.
00:58:56 The total number of algorithms is more than mind boggling.
00:59:03 So we have situations now
00:59:06 where we know that algorithms exist,
00:59:08 but we don’t have the farthest idea what the algorithms are.
00:59:12 There are simple examples based on game playing
00:59:18 where you have, where you say,
00:59:22 well, there must be an algorithm that exists
00:59:25 to win in the game of Hex because,
00:59:27 for the first player to win in the game of Hex
00:59:29 because Hex is always either a win
00:59:33 for the first player or the second player.
00:59:35 Well, what’s the game of Hex?
00:59:36 There’s a game of Hex which is based
00:59:38 on putting pebbles onto a hexagonal board
00:59:42 and the white player tries to get a white path
00:59:45 from left to right and the black player tries
00:59:47 to get a black path from bottom to top.
00:59:49 And how does capture occur?
00:59:51 Just so I understand.
00:59:51 And there’s no capture.
00:59:53 You just put pebbles down one at a time.
00:59:56 But there’s no draws because after all the white
00:59:58 and black are played, there’s either gonna be a white path
01:00:01 across from east to west or a black path from bottom to top.
01:00:05 So there’s always, it’s the perfect information game
01:00:09 and people take turns like tic tac toe.
01:00:15 And the hex board can be different sizes.
01:00:18 But anyway, there’s no possibility of a draw
01:00:21 and players move one at a time.
01:00:24 And so it’s gotta be either a first player win
01:00:26 or a second player win.
01:00:27 Mathematically, you follow out all the trees
01:00:30 and either there’s always a win for the first player,
01:00:34 second player, okay.
01:00:36 And it’s finite.
01:00:37 The game is finite.
01:00:38 So there’s an algorithm that will decide.
01:00:41 You can show it has to be one or the other
01:00:43 because the second player could mimic the first player
01:00:46 with kind of a pairing strategy.
01:00:49 And so you can show that it has to be one way or the other.
01:00:56 But we don’t know any algorithm anyway.
01:00:58 We don’t know the third or the fourth.
01:01:01 There are cases where you can prove the existence
01:01:03 of a solution but nobody knows any way how to find it.
01:01:08 But more like the algorithm question,
01:01:12 there’s a very powerful theorem in graph theory
01:01:15 by Robinson and Seymour that says that every class
01:01:21 of graphs that is closed under taking minors
01:01:27 has a polynomial time algorithm to determine
01:01:29 whether it’s in this class or not.
01:01:31 Now a class of graphs, for example, planar graphs.
01:01:33 These are graphs that you can draw in a plane
01:01:35 without crossing lines.
01:01:37 And a planar graph, taking minors means
01:01:41 that you can shrink an edge into a point
01:01:45 or you can delete an edge.
01:01:49 And so you start with a planar graph
01:01:51 and shrink any edge to a point is still planar.
01:01:54 Delete an edge is still planar.
01:01:56 Okay, now, but there are millions of different ways
01:02:06 to describe a family of graph that still remains
01:02:11 the same under taking minor.
01:02:14 And Robertson and Seymour proved that any such family
01:02:17 of graphs, there’s a finite number of minimum graphs
01:02:22 that are obstructions so that if it’s not in the family,
01:02:29 then it has to contain, then there has to be a way
01:02:34 to shrink it down until you get one
01:02:37 of these bad minimum graphs that’s not in the family.
01:02:41 In the case of a planar graph, the minimum graph
01:02:44 is a five pointed star where everything points to another
01:02:48 and the minimum graph consisting of trying
01:02:50 to connect three utilities to three houses
01:02:52 without crossing lines.
01:02:54 And so there are two bad graphs that are not planar
01:02:58 and every non planar graph contains one
01:03:01 of these two bad graphs by shrinking and removing edges.
01:03:07 Sorry, can you say it again?
01:03:08 So he proved that there’s a finite number
01:03:11 of these bad graphs.
01:03:11 There’s always a finite number.
01:03:13 So somebody says, here’s a family.
01:03:15 It’s hard to believe.
01:03:16 And they present a sequence of 20 papers.
01:03:20 I mean, it’s deep work, but it’s.
01:03:25 Because that’s for any arbitrary class.
01:03:27 So for any arbitrary class that’s closed
01:03:29 under taking minors.
01:03:31 That’s closed under, maybe I’m not understanding
01:03:33 because it seems like a lot of them
01:03:35 are closed under taking minors.
01:03:36 Almost all the important classes of graphs are.
01:03:39 There are tons of such graphs, but also hundreds
01:03:43 of them that arise in applications.
01:03:48 I have a book over here called classes of graphs
01:03:51 and it’s amazing how many different classes
01:03:57 of graphs that people have looked at.
01:03:58 So why do you bring up this theorem or this proof?
01:04:02 So now there are lots of algorithms that are known
01:04:06 for special class of graphs.
01:04:07 For example, if I have a certain, if I have a chordal graph
01:04:10 then I can color it efficiently.
01:04:12 If I have some kind of graphs, it’ll make a great network.
01:04:17 So you’d like to test, somebody gives you a graph
01:04:22 and says, oh, is it in this family of graphs?
01:04:24 If so, then I can go to the library
01:04:28 and find an algorithm that’s gonna solve my problem
01:04:30 on that graph.
01:04:32 Okay, so we wanna have a graph that says,
01:04:37 an algorithm that says,
01:04:38 you give me a graph, I’ll tell you whether it’s in this
01:04:45 family or not, okay?
01:04:48 And so all I have to do is test whether or not
01:04:53 that does this given graph have a minor,
01:04:55 that’s one of the bad ones.
01:04:57 A minor is everything you can get by shrinking
01:04:59 and removing edges.
01:05:01 And given any minor, there’s a polynomial time algorithm
01:05:04 saying, I can tell whether this is a minor of you.
01:05:09 And there’s a finite number of bad cases.
01:05:11 So I just try, does it have this bad case?
01:05:15 Polynomial time, I got the answer.
01:05:17 Does it have this bad case?
01:05:18 Polynomial time, I got the answer.
01:05:21 Total polynomial time.
01:05:23 And so I’ve solved the problem.
01:05:24 However, all we know is that the number of minors is finite.
01:05:28 We don’t know what, we might only know one or two
01:05:32 of those minors, but we don’t know if we’ve got a,
01:05:34 if we’ve got 20 of them, we don’t know,
01:05:36 there might be 21, 25, there’s just some,
01:05:39 all we know is that it’s finite.
01:05:42 So here we have a polynomial time algorithm
01:05:44 that we don’t know.
01:05:46 That’s a really great example of what you worry about
01:05:49 or why you think P equals NP won’t be useful.
01:05:53 But still, why do you hold the intuition that P equals NP?
01:05:58 P equals NP because you have to rule out
01:06:03 so many possible algorithms as being not working.
01:06:11 You can take the graph and you can represent it
01:06:14 as in terms of certain prime numbers,
01:06:18 and then you can multiply those together,
01:06:20 and then you can take the bitwise AND
01:06:23 and construct some certain constant in polynomial time.
01:06:30 And then that’s perfectly valid algorithm.
01:06:33 And there’s so many algorithms of that kind.
01:06:37 A lot of times we see random,
01:06:42 take data and we get coincidences
01:06:46 that some fairly random looking number actually is useful
01:06:51 because it happens to solve a problem
01:06:59 just because there’s so many hairs on your head.
01:07:06 But it seems like unlikely that two people
01:07:10 are gonna have the same number of hairs on their head.
01:07:14 But they’re obvious, but you can count
01:07:17 how many people there are and how many hairs on the head.
01:07:20 There must be people walking around in the country
01:07:22 that have the same number of hairs on their head.
01:07:24 Well, that’s a kind of a coincidence
01:07:26 that you might say also this particular combination
01:07:30 of operations just happens to prove
01:07:32 that the graph has a Hamiltonian path.
01:07:36 I see lots of cases where unexpected things happen
01:07:41 when you have enough possibilities.
01:07:44 So because the space of possibility is so huge,
01:07:46 your intuition just says it’s not.
01:07:47 You have to rule them all out.
01:07:49 And so that’s the reason for my intuition.
01:07:51 It’s by no means a proof.
01:07:53 I mean, some people say, well, P can’t equal NP
01:07:58 because you’ve had all these smart people.
01:08:02 The smartest designers of algorithms
01:08:05 have been racking their brains for years and years
01:08:09 and there’s million dollar prizes out there
01:08:11 and none of them, nobody has thought of the algorithm.
01:08:16 So there must be no such algorithm.
01:08:19 On the other hand, I can use exactly the same logic
01:08:23 and I can say, well, P must be equal to NP
01:08:25 because there’s so many smart people out here
01:08:27 have been trying to prove it unequal to NP
01:08:30 and they’ve all failed.
01:08:34 This kind of reminds me of the discussion
01:08:36 about the search for aliens.
01:08:39 They’ve been trying to look for them
01:08:40 and we haven’t found them yet, therefore they don’t exist.
01:08:43 But you can show that there’s so many planets out there
01:08:46 that they very possibly could exist.
01:08:48 Yeah, right, and then there’s also the possibility
01:08:52 that they exist but they all discovered machine learning
01:08:57 or something and then blew each other up.
01:09:00 Well, on that small, quick tangent, let me ask,
01:09:03 do you think there’s intelligent life
01:09:05 out there in the universe?
01:09:07 I have no idea.
01:09:08 Do you hope so?
01:09:09 Do you think about it?
01:09:10 I don’t spend my time thinking about things
01:09:14 that I could never know, really.
01:09:16 And yet you do enjoy the fact that there’s many things
01:09:19 you don’t know.
01:09:20 You do enjoy the mystery of things.
01:09:23 I enjoy the fact that I have limits, yeah.
01:09:27 But I don’t take time to answer unsolvable questions.
01:09:34 Got it.
01:09:35 Well, because you’ve taken on some tough questions
01:09:38 that may seem unsolvable.
01:09:40 You have taken on some tough questions
01:09:42 that may seem unsolvable, but they’re in the space.
01:09:44 It gives me a thrill when I can get further
01:09:46 than I ever thought I could, yeah.
01:09:48 But much like with religion, these.
01:09:53 I’m glad that there’s no proof that God exists or not.
01:09:57 I mean, I think.
01:09:59 It would spoil the mystery.
01:10:00 It would be too dull, yeah.
01:10:04 So to quickly talk about the other art
01:10:08 of artificial intelligence, what’s your view?
01:10:14 Artificial intelligence community has developed
01:10:16 as part of computer science and in parallel
01:10:18 with computer science since the 60s.
01:10:21 What’s your view of the AI community from the 60s to now?
01:10:27 So all the way through, it was the people
01:10:29 who were inspired by trying to mimic intelligence
01:10:34 or to do things that were somehow
01:10:37 the greatest achievements of intelligence
01:10:40 that had been inspiration to people
01:10:42 who have pushed the envelope of computer science
01:10:47 maybe more than any other group of people.
01:10:50 So all the way through, it’s been a great source
01:10:53 of good problems to sink teeth into.
01:10:58 Sink teeth into and getting partial answers
01:11:06 and then more and more successful answers over the years.
01:11:10 So this has been the inspiration
01:11:13 for lots of the great discoveries of computer science.
01:11:16 Are you yourself captivated by the possibility
01:11:18 of creating, of algorithms having echoes
01:11:23 of intelligence in them?
01:11:24 Not as much as most of the people in the field, I guess,
01:11:29 I would say, but that’s not to say that they’re wrong
01:11:34 or that it’s just, you asked about my own personal
01:11:36 preferences, but the thing that I worry about
01:11:47 is when people start believing that they’ve actually
01:11:49 succeeded and because the, it seems to me,
01:11:56 there’s a huge gap between really understanding something
01:12:01 and being able to pretend to understand something
01:12:05 and give the illusion of understanding something.
01:12:08 Do you think it’s possible to create without understanding?
01:12:12 Yeah.
01:12:12 So to.
01:12:13 Oh, I do that all the time too, I mean.
01:12:16 So I use random numbers, but there’s still this great gap.
01:12:24 I don’t assert that it’s impossible,
01:12:26 but I don’t see anything coming any closer
01:12:31 to really the kind of stuff
01:12:36 that I would consider intelligence.
01:12:38 So you’ve mentioned something that,
01:12:41 on that line of thinking, which I very much agree with,
01:12:45 so The Art of Computer Programming as the book
01:12:49 is focused on single processor algorithms,
01:12:53 and for the most part, you mentioned.
01:12:57 That’s only because I set the table of contents in 1962,
01:13:00 you have to remember.
01:13:02 For sure, there’s no.
01:13:04 I’m glad I didn’t wait until 1965 or something.
01:13:08 That’s, one book, maybe we’ll touch on the Bible,
01:13:12 but one book can’t always cover the entirety of everything.
01:13:17 So I’m glad the table of contents
01:13:22 for The Art of Computer Programming is what it is.
01:13:25 But you did mention that you thought
01:13:29 that an understanding of the way ant colonies
01:13:31 are able to perform incredibly organized tasks
01:13:35 might well be the key to understanding human cognition.
01:13:38 So these fundamentally distributed systems.
01:13:42 So what do you think is the difference
01:13:43 between the way Don Knuth would sort a list
01:13:47 and an ant colony would sort a list
01:13:49 or perform an algorithm?
01:13:52 Sorting a list isn’t the same as cognition, though,
01:13:55 but I know what you’re getting at is.
01:14:00 Well, the advantage of ant colonies,
01:14:02 at least we can see what they’re doing.
01:14:04 We know which ant has talked to which other ant,
01:14:07 and it’s much harder with the brains
01:14:12 to know to what extent neurons are passing signal.
01:14:18 So I’m just saying that ant colony might be,
01:14:21 if they have the secret of cognition,
01:14:25 think of an ant colony as a cognitive single being
01:14:29 rather than as a colony of lots of different ants.
01:14:32 I mean, just like the cells of our brain
01:14:36 and the microbiome and all that is interacting entities,
01:14:42 but somehow I consider myself to be a single person.
01:14:48 Well, an ant colony, you can say,
01:14:51 might be cognitive somehow.
01:14:55 It’s some suggestion.
01:14:57 Yeah, I mean, okay, I smash a certain ant
01:15:02 and the organism’s saying, hmm, that stung.
01:15:05 What was that?
01:15:06 But if we’re going to crack the secret of cognition,
01:15:10 it might be that we could do so
01:15:13 by psyching out how ants do it
01:15:16 because we have a better chance to measure
01:15:19 their communicating by pheromones
01:15:21 and by touching each other in sight,
01:15:24 but not by much more subtle phenomenon
01:15:27 like electric currents going through.
01:15:30 But even a simpler version of that,
01:15:31 what are your thoughts of maybe Conway’s Game of Life?
01:15:35 Okay, so Conway’s Game of Life
01:15:37 is able to simulate any computable process.
01:15:44 And any deterministic process is…
01:15:46 I like how you went there.
01:15:48 I mean, that’s not its most powerful thing, I would say.
01:15:53 I mean, it can simulate it,
01:15:56 but the magic is that the individual units
01:16:00 are distributed and extremely simple.
01:16:03 Yes, we understand exactly what the primitives are.
01:16:06 The primitives, just like with the ant colony,
01:16:08 even simpler, though.
01:16:09 But still, it doesn’t say that I understand life.
01:16:16 I mean, it gives me a better insight
01:16:24 into what does it mean to have a deterministic universe?
01:16:27 What does it mean to have free choice, for example?
01:16:35 Do you think God plays dice?
01:16:37 Yes.
01:16:38 I don’t see any reason why God should be forbidden
01:16:41 from using the most efficient ways to…
01:16:49 I mean, we know that dice are extremely important
01:16:52 in efficient algorithms.
01:16:54 There are things that couldn’t be done well without randomness.
01:16:58 And so, I don’t see any reason why God should be prohibited.
01:17:03 When the algorithm requires it,
01:17:06 you don’t see why the physics should constrain it.
01:17:11 So, in 2001, you gave a series of lectures at MIT
01:17:15 about religion and science.
01:17:17 No, that was in 1999.
01:17:20 The book came out in 2001.
01:17:22 So, in 1999, you spent a little bit of time in Boston
01:17:26 enough to give those lectures.
01:17:30 And I read the 2001 version, most of it.
01:17:36 It’s quite fascinating to read.
01:17:37 I recommend people, it’s a transcription of your lectures.
01:17:40 So, what did you learn about how ideas get started
01:17:44 and grow from studying the history of the Bible?
01:17:46 So, you’ve rigorously studied a very particular part
01:17:50 of the Bible.
01:17:51 What did you learn from this process
01:17:53 about the way us human beings as a society
01:17:56 develop and grow ideas, share ideas,
01:17:59 and are defined by those ideas?
01:18:01 Well, it’s hard to summarize that.
01:18:05 I wouldn’t say that I learned a great deal
01:18:08 of really definite things where I could make conclusions,
01:18:12 but I learned more about what I don’t know.
01:18:15 You have a complex subject,
01:18:16 which is really beyond human understanding.
01:18:21 So, we give up on saying,
01:18:23 I’m never gonna get to the end of the road
01:18:24 and I’m never gonna understand it,
01:18:26 but you say, but maybe it might be good for me
01:18:29 to get closer and closer
01:18:32 and learn more and more about something.
01:18:34 And so, how can I do that efficiently?
01:18:39 And the answer is, well, use randomness.
01:18:42 And so, try a random subset
01:18:48 of that is within my grasp
01:18:52 and study that in detail,
01:18:56 instead of just studying parts
01:18:59 that somebody tells me to study,
01:19:00 or instead of studying nothing because it’s too hard.
01:19:05 So, I decided, for my own amusement once,
01:19:14 that I would take a subset
01:19:17 of the verses of the Bible
01:19:22 and I would try to find out
01:19:25 what the best thinkers have said about that small subset.
01:19:29 And I had about, let’s say 60 verses out of 3,000,
01:19:35 I think it’s one out of 500 or something like this.
01:19:37 And so, then I went to the libraries,
01:19:39 which are well indexed.
01:19:43 I spent, for example, at Boston Public Library,
01:19:48 I would go once a week for a year
01:19:52 and I went, I have done times to Hanover Harvard Library
01:19:58 to look at this, that weren’t in the Boston Public,
01:20:02 where scholars had looked and you can go down the shelves
01:20:08 and you can look in the index and say,
01:20:12 oh, is this verse mentioned anywhere in this book?
01:20:15 If so, look at page 105.
01:20:17 So, in other words, I could learn not only about the Bible,
01:20:20 but about the secondary literature about the Bible,
01:20:23 the things that scholars have written about it.
01:20:25 And so, that gave me a way to zoom in on parts of the thing,
01:20:33 so that I could get more insight.
01:20:35 And so, I look at it as a way of giving me some firm pegs,
01:20:43 which I could hang pieces of information,
01:20:45 but not as things where I would say,
01:20:48 and therefore, this is true.
01:20:50 In this random approach of sampling the Bible,
01:20:54 what did you learn about the most central,
01:21:03 one of the biggest accumulation of ideas in our history?
01:21:05 It seemed to me that the main thrust was not the one
01:21:09 that most people think of as saying,
01:21:11 oh, don’t have sex or something like this,
01:21:16 but that the main thrust was to try to figure out
01:21:21 how to live in harmony with God’s wishes.
01:21:24 I’m assuming that God exists,
01:21:26 and as I say, I’m glad that there’s no way to prove this,
01:21:30 because I would run through the proof once,
01:21:35 and then I’d forget it,
01:21:36 and I would never speculate about spiritual things
01:21:43 and mysteries otherwise,
01:21:46 and I think my life would be very incomplete.
01:21:51 So, I’m assuming that God exists,
01:21:55 but a lot of the people say God doesn’t exist,
01:22:01 but that’s still important to them.
01:22:03 And so, in a way, that might still be,
01:22:06 whether God is there or not,
01:22:08 in some sense, God is important to them.
01:22:12 One of the verses I studied, Doc,
01:22:16 you can interpret it as saying that it’s much better
01:22:19 to be an atheist than not to care at all.
01:22:24 So, I would say it’s similar to the P equals NP discussion.
01:22:29 You mentioned a mental exercise that I’d love it
01:22:33 if you could partake in yourself,
01:22:36 a mental exercise of being God.
01:22:39 So, if you were God, Doc Neuth,
01:22:42 how would you present yourself to the people of Earth?
01:22:45 You mentioned your love of literature,
01:22:47 and there’s this book that really I can recommend to you.
01:22:52 Yeah, the title, I think, is Blasphemy.
01:22:55 It talks about God revealing Himself
01:22:58 through a computer in Los Alamos,
01:23:02 and it’s the only book that I’ve ever read
01:23:09 where the punchline was really the very last word of the book
01:23:15 and explained the whole idea of the book.
01:23:18 And so, I’d only give that away,
01:23:20 but it’s really very much about this question that you raised.
01:23:27 But suppose God said, okay,
01:23:32 my previous means of communication with the world
01:23:36 are not the best for the 21st century,
01:23:39 so what should I do now?
01:23:41 And it’s conceivable that God would choose
01:23:49 the way that’s described in this book.
01:23:51 Another way to look at this exercise
01:23:53 is looking at the human mind,
01:23:55 looking at the human spirit, the human life in a systematic way.
01:23:59 I think mostly you want to learn humility.
01:24:02 You want to realize that once we solve one problem,
01:24:04 that doesn’t mean that all of a sudden other problems are going to drop out.
01:24:09 And we have to realize that there are things beyond our ability.
01:24:22 I see hubris all around.
01:24:26 Yeah, well said.
01:24:28 If you were to run program analysis on your own life,
01:24:33 how did you do in terms of correctness, running time, resource use,
01:24:39 asymptotically speaking, of course?
01:24:41 Okay, yeah, well, I would say
01:24:45 that question has not been asked me before.
01:24:50 And I started out with library subroutines
01:25:01 and learning how to be an automaton that was obedient,
01:25:08 and I had the great advantage that I didn’t have anybody to blame for my failures.
01:25:18 If I started not understanding something,
01:25:22 I knew that I should stop playing ping pong,
01:25:25 and it was my fault that I wasn’t studying hard enough or something,
01:25:29 rather than that somebody was discriminating against me in some way.
01:25:33 And I don’t know how to avoid the existence of biases in the world,
01:25:39 but I know that that’s an extra burden that I didn’t have to suffer from.
01:25:46 And then I found from parents,
01:25:54 I learned the idea of service to other people
01:26:02 as being more important than what I get out of stuff myself.
01:26:10 I know that I need to be happy enough in order to be able to be of service,
01:26:18 but I came to a philosophy finally that I phrase as,
01:26:25 point eight is enough.
01:26:28 There was a TV show once called Eight is Enough,
01:26:31 which was about somebody had eight kids.
01:26:35 But I say point eight is enough, which means if I can have a way of rating happiness,
01:26:43 I think it’s good design to have an organism that’s happy about 80% of the time.
01:26:55 And if it was 100% of the time, it would be like everybody’s on drugs
01:27:01 and everything collapses and nothing works because everybody’s just too happy.
01:27:09 Do you think you’ve achieved that point eight optimal balance?
01:27:13 There are times when I’m down and I know that I’ve actually been programmed
01:27:22 to be depressed a certain amount of time.
01:27:27 And if that gets out of kilter and I’m more depressed than usual,
01:27:31 sometimes I find myself trying to think, now, who should I be mad at today?
01:27:36 There must be a reason why.
01:27:39 But then I realize it’s just my chemistry telling me that I’m supposed to be mad at somebody,
01:27:45 and so I trigger it up and say, okay, go to sleep and get better.
01:27:49 But if I’m not 100% happy, that doesn’t mean that I should find somebody that’s screwing me
01:27:58 and try to silence them.
01:28:01 But I’m saying, okay, I’m not 100% happy, but I’m happy enough to be part of a sustainable situation.
01:28:14 So that’s kind of the numerical analysis I do.
01:28:21 You’ve converged towards the optimal, which for human life is a point eight.
01:28:25 I hope it’s okay to talk about, as you talked about previously,
01:28:30 in 2006 you were diagnosed with prostate cancer.
01:28:34 Has that encounter with mortality changed you in some way or the way you see the world?
01:28:40 Yeah, it did. The first encounter with mortality was when my dad died,
01:28:45 and I went through a month when I sort of came to be comfortable with the fact that I was going to die someday.
01:28:59 And during that month, I don’t know, I felt okay, but I couldn’t sing.
01:29:09 And I couldn’t do original research either.
01:29:14 I sort of remember after three or four weeks, the first time I started having a technical thought that made sense
01:29:22 and was maybe slightly creative, I could sort of feel that something was starting to move again.
01:29:29 So I felt very empty until I came to grips with it. I learned that this is sort of a standard grief process that people go through.
01:29:42 Okay, so then now I’m at a point in my life, even more so than in 2006,
01:29:48 where all of my goals have been fulfilled except for finishing the art of computer programming.
01:29:54 I had one major unfulfilled goal. I’d wanted all my life to write a piece of music,
01:30:07 and I had an idea for a certain kind of music that I thought ought to be written, at least somebody ought to try to do it.
01:30:15 And I felt that it wasn’t going to be easy, but I wanted proof of concept.
01:30:24 I wanted to know if it was going to work or not, and so I spent a lot of time.
01:30:28 And finally, I finished that piece, and we had the world premiere last year on my 80th birthday,
01:30:36 and we had another premiere in Canada, and there’s talk of concerts in Europe and various things.
01:30:42 But that’s done. It’s part of the world’s music now, and it’s either good or bad, but I did what I was hoping to do.
01:30:50 So the only thing that I have on my agenda is to try to do as well as I can with the art of computer programming until I go to CINA.
01:31:03 Do you think there’s an element of.8 that might apply there?
01:31:07 .8? Well, I look at it more that I got actually to 1.0 when that concert was over with.
01:31:24 So in 2006, I was at.8, so when I was diagnosed with prostate cancer, then I said, okay, well, I’ve had all kinds of good luck all my life,
01:31:38 and I have nothing to complain about, so I might die now, and we’ll see what happens.
01:31:45 And so quite seriously, I had no expectation that I deserved better.
01:31:57 I didn’t make any plans for the future. I came out of the surgery and spent some time learning how to walk again and so on.
01:32:11 It was painful for a while, but I got home, and I realized I hadn’t really thought about what to do next.
01:32:21 I hadn’t any expectation. I said, okay, hey, I’m still alive. Okay, now I can write some more books.
01:32:28 But I didn’t come with the attitude that this was terribly unfair, and I just said, okay, I was accepting whatever turned out.
01:32:44 I’d gotten more than my share already, so why should I?
01:32:58 When I got home, I realized that I had really not thought about the next step, what I would do after I would be able to work again.
01:33:05 I was comfortable with the fact that it was at the end, but I was hoping that I would still be able to learn about satisfiability and also someday even write music.
01:33:29 I didn’t start seriously on the music project until 2012.
01:33:34 So I’m going to be in huge trouble if I don’t talk to you about this.
01:33:39 In the 70s, you’ve created the tech typesetting system together with MetaFont language for font description and computer modern family of typefaces.
01:33:49 That has basically defined the methodology and the aesthetic of countless research fields, math, physics, beyond computer science, so on.
01:34:02 Okay, well, first of all, thank you.
01:34:05 I think I speak for a lot of people in saying that.
01:34:08 But question in terms of beauty.
01:34:11 There’s a beauty to typography that you’ve created, and yet beauty is hard to quantify.
01:34:20 How does one create beautiful letters and beautiful equations?
01:34:28 Perhaps there’s no words to be describing the process.
01:34:35 So the great Harvard mathematician George D. Burkhoff wrote a book in the 30s called Aesthetic Measure where he would have pictures of vases and underneath would be a number.
01:34:50 And this was how beautiful the vase was.
01:34:52 And he had a formula for this.
01:34:54 And he actually also wrote about music.
01:34:58 So I thought maybe part of my musical composition I would try to program his algorithms so that I would write something that had the highest number by his score.
01:35:14 Well, it wasn’t quite rigorous enough for a computer to do.
01:35:19 But anyway, people have tried to put numerical value on beauty, and he did probably the most serious attempt.
01:35:29 And George Gershwin’s teacher also wrote two volumes where he talked about his method of composing music.
01:35:38 But you’re talking about another kind of beauty and letters and letter phrases.
01:35:43 Elegance and whatever that curvature is.
01:35:46 Right. And so that’s in the eye of the beholder, as they say.
01:35:53 But striving for excellence in whatever definition you want to give to beauty, then you try to get as close to that as you can somehow.
01:36:02 I guess I’m trying to ask, and there may not be a good answer, what loose definitions were you operating under with the community of people that you were working under?
01:36:13 Well, the loose definition, I wanted it to appeal to me.
01:36:21 To you personally.
01:36:22 Yeah.
01:36:23 That’s a good start, right?
01:36:24 Yeah. No, and it failed that test when Volume Two came out with the new printing, and I was expecting it to be the happiest day of my life.
01:36:32 And I felt like a burning, like how angry I was that I opened the book and it was in the same beige covers, but it didn’t look right on the page.
01:36:48 The number two was particularly ugly.
01:36:52 I couldn’t stand any page that had a two in its page number.
01:36:55 And I was expecting that. I spent all this time making measurements and I had looked at stuff in different ways and I had great technology, but I wasn’t done.
01:37:15 I had to retune the whole thing after 1961.
01:37:20 Has it ever made you happy, finally?
01:37:22 Oh, yes.
01:37:23 Or is it a 0.8?
01:37:26 No, and so many books have come out that would never have been written without this.
01:37:31 It’s just a joy.
01:37:34 But now, I mean, all these pages that are sitting up there, if I didn’t like them, I would change them.
01:37:44 Nobody else has this ability.
01:37:48 They have to stick with what I gave them.
01:37:50 Yeah. So, in terms of the other side of it, there’s the typography, so the look of the type and the curves and the lines.
01:37:59 What about the spacing?
01:38:01 What about the?
01:38:02 The spacing between the white space.
01:38:05 Yeah.
01:38:06 It seems like you could be a little bit more systematic about the layout or technical.
01:38:12 Oh, yeah. You can always go further.
01:38:13 I didn’t stop at 0.8, but I stopped at about 0.98.
01:38:22 It seems like you’re not following your own rule for happiness.
01:38:27 No, no, no.
01:38:30 Of course, there’s this, what is the Japanese word, wabi sabi or something, where the most beautiful works of art are those that have flaws because then the person who perceives them adds their own appreciation and that gives the viewer more satisfaction or so on.
01:38:53 But no, no, with typography, I wanted it to look as good as I could in the vast majority of cases, and then when it doesn’t, then I say, okay, that’s 2% more work for the author.
01:39:11 But I didn’t want to say that my job was to get to 100% and take all the work away from the author.
01:39:20 That’s what I meant by that.
01:39:22 So if you were to venture a guess, how much of the nature of reality do you think we humans understand?
01:39:31 You mentioned you appreciate mystery.
01:39:34 How much of the world about us is shrouded in mystery?
01:39:38 If you were to put a number on it, what percent of it all do we understand?
01:39:45 How many leading zeros, 0.00?
01:39:49 I don’t know.
01:39:50 I think it’s infinitesimal.
01:39:52 How do we think about that and what do we do about that?
01:39:55 Do we continue one step at a time?
01:39:57 Yeah, we muddle through.
01:39:58 I mean, we do our best.
01:40:01 We realize that nobody’s perfect and we try to keep advancing, but we don’t spend time saying we’re not there, we’re not all the way to the end.
01:40:14 Some mathematicians that would be in the office next to me when I was in the math department, they would never think about anything smaller than countable infinity.
01:40:25 We intersected that countable infinity because I rarely got up to countable infinity.
01:40:31 I was always talking about finite stuff.
01:40:33 But even limiting to finite stuff, which the universe might be, there’s no way to really know whether the universe isn’t just made out of capital N, whatever units you want to call them, quarks or whatever, where capital N is some finite number.
01:41:02 All of the numbers that are comprehensible are still way smaller than almost all finite numbers.
01:41:08 I got this one paper called Supernatural Numbers where I guess you probably ran into something called Knuth arrow notation.
01:41:19 Did you ever run into that?
01:41:20 Anyway, so you take the number, I think it’s like, and I called it Super K, I named it after myself, but arrow notation is something like 10 and then four arrows and a three or something like that.
01:41:36 Now, the arrow notation, if you have no arrows, that means multiplication.
01:41:42 X, Y means X times X times X times X, Y times.
01:41:47 If you have one arrow, that means exponentiation.
01:41:50 So X one arrow Y means X to the X to the X to the X Y times.
01:41:56 So I found out, by the way, that this notation was invented by a guy in 1830 and he was one of the English nobility who spent his time thinking about stuff like this.
01:42:15 And it was exactly the same concept that I used arrows and he used a slightly different notation.
01:42:23 But anyway, and then this Ackermann’s function is based on the same kind of ideas, but Ackermann was 1920s.
01:42:31 But anyway, you’ve got this number 10 quadruple arrow three. So that says, well, we take 10 to the 10 to the 10 to the 10 to the 10th and how many times do we do that?
01:42:47 Oh, 10 double arrow two times or something. I mean, how tall is that stack?
01:42:52 But then we do that again because that was only 10 quadruple arrow two.
01:42:58 It gets to be a pretty large number.
01:43:01 It gets way beyond comprehension.
01:43:05 But it’s so small compared to what finite numbers really are because I’m only using four arrows and 10 and a three.
01:43:18 I mean, let’s have that many number arrows.
01:43:22 The boundary between infinite and finite is incomprehensible for us humans anyway.
01:43:29 Infinity is a useful way for us to think about extremely large things.
01:43:38 And we can manipulate it, but we can never know that the universe is actually anywhere near that.
01:43:51 So I realize how little we know.
01:44:02 But we found an awful lot of things that are too hard for any one person to know, even in our small universe.
01:44:14 Yeah, and we did pretty good.
01:44:16 So when you go up to heaven and meet God and get to ask one question that would get answered, what question would you ask?
01:44:30 What kind of browser do you have up here?
01:44:35 No, actually, I don’t think it’s meaningful to ask this question, but I certainly hope we had good internet.
01:44:49 Okay, on that note, that’s beautiful actually.
01:44:53 Don, thank you so much.
01:44:54 It was a huge honor to talk to you.
01:44:55 I really appreciate it.
01:44:56 Well, thanks for the gamut of questions.
01:44:59 Yeah, it was fun.
01:45:00 Thanks for listening to this conversation with Donald Knuth, and thank you to our presenting sponsor, Cash App.
01:45:07 Download it, use Code Lex Podcast, you’ll get $10, and $10 will go to FIRST, a STEM education nonprofit that inspires hundreds of thousands of young minds to learn and to dream of engineering our future.
01:45:20 If you enjoy this podcast, subscribe on YouTube, give it five stars on Apple Podcast, support it on Patreon, or connect with me on Twitter.
01:45:28 And now, let me leave you with some words of wisdom from Donald Knuth.
01:45:33 We should continually be striving to transform every art into a science, and in the process, we advance the art.
01:45:42 Thank you for listening, and hope to see you next time.