← Lex Fridman

Richard Karp: Algorithms and Computational Complexity

第111期2020-07-26English

嘉宾:Richard Karp

收听本集00:00 / 2:08:00
阅读设置
按你的习惯阅读
正文字号
下载播客精读
把这一篇,带走慢慢读

精读待补充

下载功能还未开放

§01Transcript · 00:00–10:38

00:00The following is a conversation with Richard Karp,

00:02a professor at Berkeley and one of the most important figures

00:06in the history of theoretical computer science.

00:09In 1985, he received the Turing Award

00:12for his research in the theory of algorithms,

00:15including the development of the admirance Karp algorithm

00:18for solving the max flow problem on networks,

00:21Hopcroft-Karp algorithm for finding

00:24maximum cardinality matchings in bipartite graphs,

00:27and his landmark paper in complexity theory

00:31called "Reducibility Among Combinatorial Problems,"

00:35in which he proved 21 problems to be NP-complete.

00:39This paper was probably the most important catalyst

00:41in the explosion of interest in the study of NP-completeness

00:45and the P versus NP problem in general.

00:48Quick summary of the ads.

00:50Two sponsors, 8Sleep Mattress and Cash App.

00:53Please consider supporting this podcast

00:55by going to 8sleep.com/lex

00:58and downloading Cash App and using code LEXPODCAST.

01:03Click the links, buy the stuff.

01:04It really is the best way to support this podcast.

01:08If you enjoy this thing, subscribe on YouTube,

01:10review it with Firestarz and Apple Podcast,

01:12support it on Patreon,

01:13or connect with me on Twitter @lexfriedman.

01:16As usual, I'll do a few minutes of ads now

01:18and never any ads in the middle

01:20that can break the flow of the conversation.

01:23This show is sponsored by 8Sleep and its Pod Pro mattress

01:27that you can check out at 8sleep.com/lex to get $200 off.

01:32It controls temperature with an app.

01:35It can cool down to as low as 55 degrees

01:38on each side of the bed separately.

01:41Research shows that temperature has a big impact

01:43on the quality of our sleep.

01:45Anecdotally, it's been a game changer for me.

01:47I love it.

01:48It's been a couple of weeks now.

01:50I've just been really enjoying it,

01:52both in the fact that I'm getting better sleep

01:54and that it's a smart mattress, essentially.

01:58I kind of imagine this being the early days

02:00of artificial intelligence being a part

02:02of every aspect of our lives.

02:04And certainly infusing AI

02:06in one of the most important aspects of life,

02:08which is sleep, I think has a lot of potential

02:11for being beneficial.

02:13The Pod Pro is packed with sensors

02:15that track heart rate, heart rate variability,

02:17and respiratory rate, showing it all in their app.

02:21The app's health metrics are amazing,

02:24but the cooling alone is honestly worth the money.

02:27I don't always sleep, but when I do,

02:29I choose the 8Sleep Pod Pro mattress.

02:32Check it out at 8sleep.com/flex to get $200 off.

02:37And remember, just visiting the site

02:39and considering the purchase helps convince the folks

02:42at 8Sleep that this silly old podcast

02:44is worth sponsoring in the future.

02:46This show is also presented by the great

02:50and powerful Cash App, the number one finance app

02:54in the App Store.

02:55When you get it, use code LEXPODCAST.

02:58Cash App lets you send money to friends,

03:00buy Bitcoin, and invest in the stock market

03:02with as little as $1.

03:04It's one of the best designed interfaces

03:06of an app that I've ever used.

03:08To me, good design is when everything is easy and natural.

03:12Bad design is when the app gets in the way,

03:15either because it's buggy

03:16or because it tries too hard to be helpful.

03:19I'm looking at you, Clippy, from Microsoft,

03:21even though I love you.

03:23Anyway, there's a big part of my brain and heart

03:25that loves to design things

03:27and also to appreciate great design by others.

03:30So again, if you get Cash App

03:31from the App Store or Google Play

03:33and use the code LEXPODCAST, you get $10.

03:36Cash App will also donate $10 to FIRST,

03:39an organization that is helping to advance robotics

03:42and STEM education for young people around the world.

03:45And now, here's my conversation with Richard Karp.

03:49You wrote that at the age of 13,

03:52you were first exposed to plane geometry

03:55and was wonderstruck by the power

03:57and elegance of formal proofs.

04:00Are there problems, proofs, properties, ideas

04:02in plane geometry that, from that time,

04:04that you remember being mesmerized by

04:07or just enjoying to go through to prove various aspects?

04:13- So Michael Rabin told me this story

04:15about an experience he had when he was a young student

04:19who was tossed out of his classroom for bad behavior

04:25and was wandering through the corridors of his school

04:28and came upon two older students

04:31who were studying the problem

04:35of finding the shortest distance

04:37between two non-overlapping circles.

04:41And Michael thought about it and said,

04:45"You take the straight line between the two centers

04:52"and the segment between the two circles is the shortest

04:56"because a straight line is the shortest distance

04:58"between the two centers.

05:00"And any other line connecting the circles

05:03"would be on a longer line."

05:07And I thought, and he thought,

05:09and I agreed that this was just elegant,

05:13that pure reasoning could come up with such a result.

05:17- Certainly the shortest distance

05:21from the two centers of the circles is a straight line.

05:24Could you once again say what's the next step in that proof?

05:29- Well, any segment joining the two circles,

05:36if you extend it by taking the radius on each side,

05:41you get a path with three edges

05:46which connects the two centers.

05:48And this has to be at least as long as the shortest path,

05:52which is the straight line.

05:53- The straight line, yeah.

05:54Wow, yeah, that's quite simple.

05:58So what is it about that elegance

06:00that you just find compelling?

06:04- Well, just that you could establish a fact

06:09about geometry beyond dispute by pure reasoning.

06:15I also enjoy the challenge

06:20of solving puzzles in plane geometry.

06:23It was much more fun than the earlier mathematics courses

06:27which were mostly about arithmetic operations

06:31and manipulating them.

06:33- Was there something about geometry itself,

06:36the slightly visual component of it,

06:38that you can visualize? - Oh, yes, absolutely.

06:40Although I lacked three-dimensional vision.

06:44I wasn't very good at three-dimensional vision.

06:47- You mean being able to visualize three-dimensional objects?

06:49- Three-dimensional objects or surfaces,

06:54hyperplanes and so on.

06:55So there I didn't have an intuition,

07:01but for example, the fact that the sum of the angles

07:06of a triangle is 180 degrees is proved convincingly,

07:12and it comes as a surprise that that can be done.

07:19- Why is that surprising?

07:22- Well-- - Well, it is a surprising idea,

07:29I suppose.

07:30- Why is that proved difficult?

07:32- It's not.

07:33That's the point.

07:34It's so easy, and yet it's so convincing.

07:36- Do you remember what is the proof

07:39that it adds up to 180?

07:41- You start at a corner and draw a line

07:48parallel to the opposite side,

07:56and that line sort of trisects the angle

08:00between the other two sides,

08:04and you get a half-plane which has to add up

08:10to 180 degrees, and it consists,

08:15and the angles, by the equality of alternate angles,

08:20what's it called?

08:24You get a correspondence between the angles

08:27created along the side of the triangle

08:31and the three angles of the triangle.

08:34- Has geometry had an impact on,

08:37when you look into the future of your work

08:39with combinatorial algorithms,

08:41has it had some kind of impact in terms of,

08:45yeah, being able, the puzzles, the visual aspects

08:48that were first so compelling to you?

08:51- Not Euclidean geometry particularly.

08:54I think I use tools like linear programming

08:59and integer programming a lot,

09:01but those require high-dimensional visualization,

09:08and so I tend to go by the algebraic properties.

09:12- Right, you go by the linear algebra

09:16and not by the visualization.

09:19- Well, the interpretation in terms of, for example,

09:23finding the highest point on a polyhedron,

09:26as in linear programming, is motivating,

09:31but again, I don't have the high-dimensional intuition

09:37that would particularly inform me,

09:40so I sort of lean on the algebra.

09:43- So to linger on that point,

09:46what kind of visualization do you do

09:51when you're trying to think about,

09:53we'll get to combinatorial algorithms,

09:55but just algorithms in general.

09:57- Yeah.

09:58- What's inside your mind when you're thinking

10:00about designing algorithms?

10:02Or even just tackling any mathematical problem?

10:07- Well, I think that usually an algorithm

10:13involves a repetition of some inner loop,

10:18and so I can sort of visualize the distance

10:24from the desired solution as iteratively reducing

10:29until you finally hit the exact solution.

10:33- And try to take steps that get you closer to the--

10:35- Try to take steps that get closer

10:38and having the certainty of converging.

§02Transcript · 10:41–21:48

10:41So it's basically the mechanics of the algorithm

10:46is often very simple,

10:48but especially when you're trying something out

10:52on the computer.

10:53So for example, I did some work

10:57on the traveling salesman problem,

10:58and I could see there was a particular function

11:03that had to be minimized,

11:04and it was fascinating to see the successive approaches

11:08to the optimum.

11:11- You mean, so first of all,

11:13traveling salesman problem is where you have to visit

11:16every city without ever, only once.

11:21- Yeah, that's right.

11:22Find the shortest path through a set of cities.

11:25- Yeah, which is sort of a canonical,

11:27a standard, a really nice problem

11:29that's really hard in computer science.

11:31- Exactly, yes.

11:32- So can you say again what was nice

11:34about being able to think about the objective function there

11:38and maximizing it or minimizing it?

11:41- Well, it's just that as the algorithm proceeded,

11:45you were making progress, continual progress,

11:49and eventually getting to the optimum point.

11:53- So there's two parts, maybe.

11:57Maybe you can correct me,

11:58but first is like getting an intuition

12:00about what the solution would look like,

12:02and or even maybe coming up with a solution,

12:05and two is proving that this thing

12:07is actually going to be pretty good.

12:09What part is harder for you?

12:13Where does the magic happen?

12:14Is it in the first sets of intuitions,

12:17or is it in the messy details of actually showing

12:22that it is going to get to the exact solution

12:25and it's gonna run at a certain complexity?

12:32- Well, the magic is just the fact

12:34that the gap from the optimum decreases monotonically,

12:39and you can see it happening,

12:44and various metrics of what's going on

12:48are improving all along until finally you hit the optimum.

12:53Perhaps later we'll talk about the assignment problem,

12:56and I can illustrate.

12:58- Illustrate a little better.

12:59- Yeah.

13:00- Now zooming out again, as you write,

13:03Don Knuth has called attention to a breed of people

13:06who derive great aesthetic pleasure

13:10from contemplating the structure of computational processes.

13:13So Don calls these folks geeks,

13:16and you write that you remember the moment

13:18you realized you were such a person,

13:20you were shown the Hungarian algorithm

13:23to solve the assignment problem.

13:25So perhaps you can explain what the assignment problem is

13:29and what the Hungarian algorithm is.

13:32- So in the assignment problem,

13:35you have n boys and n girls,

13:40and you are given the desirability of,

13:45or the cost of matching the i-th boy

13:50with the j-th girl for all i and j.

13:52You're given a matrix of numbers,

13:55and you want to find the one-to-one matching

14:00of the boys with the girls,

14:04such that the sum of the associated costs will be minimized.

14:08So the best way to match the boys with the girls

14:13or men with jobs or any two sets.

14:16- Now any possible matching is possible?

14:20Or there's constraints?

14:21- All one-to-one correspondences are permissible.

14:26If there is a connection that is not allowed,

14:29then you can think of it as having an infinite cost.

14:32- I see, yeah.

14:32- So what you do is to depend on the observation

14:39that the identity of the optimal assignment,

14:50or as we call it, the optimal permutation,

14:53is not changed if you subtract a constant

14:58from any row or column of the matrix.

15:04You can see that the comparison

15:06between the different assignments is not changed by that.

15:09Because if you decrease a particular row,

15:15all the elements of a row by some constant,

15:18all solutions decrease by the cost of that,

15:21by an amount equal to that constant.

15:24So the idea of the algorithm is to start

15:27with a matrix of non-negative numbers

15:30and keep subtracting from rows or entire columns

15:36in such a way that you subtract the same constant

15:44from all the elements of that row or column,

15:48while maintaining the property

15:50that all the elements are non-negative.

15:55- Simple.

15:59- Yeah, and so what you have to do

16:04is find small moves which will decrease the total cost

16:09while subtracting constants from rows or columns.

16:17And there's a particular way of doing that

16:19by computing the kind of shortest path

16:22through the elements in the matrix.

16:24And you just keep going in this way

16:28until you finally get a full permutation of zeros

16:33while the matrix is non-negative,

16:34and then you know that that has to be the cheapest.

16:37- Is that as simple as it sounds?

16:42So the shortest path through the matrix part?

16:45- Yeah, the simplicity lies in how you find,

16:48I oversimplified slightly,

16:52you will end up subtracting a constant

16:56from some rows or columns

16:59and adding the same constant back to other rows and columns.

17:04So as not to reduce any of the zero elements,

17:09you leave them unchanged.

17:13But each individual step modifies

17:18several rows and columns by the same amount,

17:24but overall decreases the cost.

17:26- So there's something about that elegance

17:29that made you go, "Aha, this is a beautiful,"

17:32like it's amazing that something like this,

17:35something so simple can solve a problem like this.

17:38- Yeah, it's really cool.

17:39If I had mechanical ability,

17:42I would probably like to do woodworking

17:44or other activities where you sort of shape something

17:49into something beautiful and orderly.

17:55And there's something about the orderly,

17:58systematic nature of that iterative algorithm

18:03that is pleasing to me.

18:05- So what do you think about this idea of geeks,

18:09as Don Knuth calls them?

18:11What do you think, is it something specific

18:15to a mindset that allows you to discover the elegance

18:19in computational processes, or is this all of us?

18:23Can all of us discover this beauty?

18:25Were you born this way? (laughs)

18:28- I think so, I always like to play with numbers.

18:30I used to amuse myself

18:35by multiplying four-digit decimal numbers in my head.

18:40And putting myself to sleep by starting with one

18:44and doubling the number as long as I could go.

18:48And testing my memory,

18:50my ability to retain the information.

18:52- And I also read somewhere that you wrote

18:55that you enjoyed showing off to your friends

18:59by, I believe, multiplying four-digit numbers.

19:03- Right.

19:05- A couple of four-digit numbers.

19:07- Yeah, I had a summer job at a beach resort

19:10outside of Boston.

19:12And the other employee,

19:16I was the barker at a skee-ball game.

19:20- Yeah.

19:21- I used to sit at a microphone saying,

19:25"Come one, come all, come in and play skee-ball.

19:28"Five cents to play, a nickel to win," and so on.

19:31- That's what a barker, I wasn't sure if I should know,

19:33but barker, you're the charming, outgoing person

19:38that's getting people to come in.

19:41- Yeah, well, I wasn't particularly charming,

19:43but I could be very repetitious and loud.

19:46And the other employees were sort of juvenile delinquents

19:52who had no academic bent,

19:57but somehow I found that I could impress them

20:00by performing this mental arithmetic.

20:05- Yeah, there's something to that.

20:08Some of the most popular videos on the internet is,

20:14there's a YouTube channel called Numberphile

20:18that shows off different mathematical ideas.

20:20- I see.

20:21- There's still something really profoundly interesting

20:23to people about math, the beauty of it.

20:27Something, even if they don't understand

20:30the basic concept even being discussed,

20:33there's something compelling to it.

20:35What do you think that is?

20:36Any lessons you drew from your early teen years

20:40when you were showing off to your friends with the numbers?

20:45What is it that attracts us

20:47to the beauty of mathematics, do you think?

20:50The general population, not just the computer scientists

20:54and mathematicians.

20:56- I think that you can do amazing things.

20:59You can test whether large numbers are prime.

21:03You can solve little puzzles

21:09about cannibals and missionaries.

21:12(laughing)

21:13- Yeah.

21:14- And there's a kind of achievement, it's puzzle solving.

21:19And at a higher level, the fact that you can do

21:22this reasoning, that you can prove

21:24in an absolutely ironclad way that some of the angles

21:29of a triangle is 180 degrees.

21:31- Yeah, it's a nice escape from the messiness

21:35of the real world where nothing can be proved.

21:38So, and we'll talk about it, but sometimes the ability

21:41to map the real world into such problems

21:43where you can't prove it is a powerful step.

21:47- Yeah.

21:47- It's amazing that we can do it.

21:48- Of course, another attribute of geeks

§03Transcript · 21:50–32:53

21:50is they're not necessarily endowed

21:53with emotional intelligence.

21:55And so they can live in a world of abstractions

21:59without having to master the complexities

22:03of dealing with people.

22:05- So just to link on the historical note,

22:09as a PhD student in 1955, you joined

22:12the computational lab at Harvard

22:14where Howard Aiken had built the Mark I

22:17and the Mark IV computers.

22:19Just to take a step back into that history,

22:22what were those computers like?

22:23- The Mark IV filled a large room,

22:30much bigger than this large office

22:33that we're talking in now.

22:36And you could walk around inside it.

22:39There were rows of relays.

22:43You could just walk around the interior

22:45and the machine would sometimes fail

22:50because of bugs, which literally meant

22:55flying creatures landing on the switches.

22:57So I never used that machine for any practical purpose.

23:04The lab eventually acquired

23:09one of the earlier commercial computers.

23:14- This is already in the '60s.

23:16- No, in the mid '50s.

23:17- The mid '50s?

23:18- Or the late '50s.

23:19- There was already commercial computers in the--

23:21- Yeah, we had a UNIVAC with 2,000 words of storage.

23:26And so you had to work hard to allocate

23:30the memory properly to also the excess time

23:34from one word to another depended on the number

23:38of the particular words.

23:41And so there was an art to sort of arranging

23:44the storage allocation to make fetching data rapid.

23:49- Were you attracted to this actual physical world

23:55implementation of mathematics?

23:58So it's a mathematical machine that's actually

24:00doing the math physically for you?

24:03- No, not at all.

24:04I think I was attracted to the underlying algorithms.

24:10- But did you draw any inspiration?

24:12So could you have imagined,

24:15like what did you imagine was the future

24:18of these giant computers?

24:20Could you have imagined that 60 years later

24:22we'd have billions of these computers all over the world?

24:25- I couldn't imagine that,

24:27but there was a sense in the laboratory

24:32that this was the wave of the future.

24:36In fact, my mother influenced me.

24:38She told me that data processing was gonna be really big

24:42and I should get into it.

24:43- She's a smart woman.

24:47- Yeah, she was a smart woman.

24:49And there was just a feeling that this was going

24:53to change the world, but I didn't think of it

24:55in terms of personal computing.

24:57I had no anticipation that we would be walking around

25:02with computers in our pockets or anything like that.

25:06- Did you see computers as tools,

25:11as mathematical mechanisms to analyze

25:13sort of theoretical computer science,

25:16or as the AI folks, which is an entire other community

25:21of dreamers, as something that could one day

25:24have human level intelligence?

25:26- Well, AI wasn't very much on my radar.

25:29I did read Turing's paper about the

25:33- The Turing test, computing and intelligence?

25:38- Yeah, the Turing test.

25:39- What'd you think about that paper?

25:41Was that just like science fiction?

25:43- I thought that it wasn't a very good test

25:48because it was too subjective.

25:50So I didn't feel that the Turing test

25:55was really the right way to calibrate

25:58how intelligent an algorithm could be.

26:01- But to linger on that, do you think it's part,

26:03because you've come up with some incredible tests

26:06later on, tests on algorithms, right?

26:09That are strong, reliable, robust

26:13across a bunch of different classes of algorithms.

26:16But returning to this emotional mess that is intelligence,

26:21do you think it's possible to come up with a test

26:24that's as ironclad as some of the

26:28computational complexity work?

26:31- Well, I think the greater question

26:32is whether it's possible to achieve

26:35human level intelligence.

26:38- Right, so that's, so first of all,

26:40let me, at the philosophical level,

26:42do you think it's possible to create algorithms

26:46that reason and would seem to us

26:51to have the same kind of intelligence as human beings?

26:54- It's an open question.

26:58It seems to me that most of the achievements

27:03have operate within a very limited set of ground rules

27:09and for a very limited, precise task,

27:15which is a quite different situation

27:17from the processes that go on in the minds of humans,

27:22which, where they have to sort of function

27:25in changing environments.

27:27They have emotions, they have physical attributes

27:32for exploring their environment.

27:38They have intuition, they have desires, emotions.

27:44And I don't see anything in the current achievements

27:52of what's called AI that come close to that capability.

27:56I don't think there's any computer program

28:01which surpasses a six-month-old child

28:05in terms of comprehension of the world.

28:09- Do you think this complexity of human intelligence,

28:15all the cognitive abilities we have, all the emotion,

28:18do you think that could be reduced one day

28:21or just fundamentally, can it be reduced

28:23to a set of algorithms or an algorithm?

28:27So can a Turing machine achieve human-level intelligence?

28:31- I am doubtful about that.

28:35I guess the argument in favor of it

28:38is that the human brain seems to achieve

28:43what we call intelligence,

28:47cognitive abilities of different kinds.

28:50And if you buy the premise that the human brain

28:54is just an enormous interconnected set of switches,

28:58so to speak, then in principle,

29:02you should be able to diagnose

29:04what that interconnection structure is like,

29:07characterize the individual switches,

29:09and build a simulation outside.

29:12But while that may be true in principle,

29:17that cannot be the way we're eventually

29:19gonna tackle this problem.

29:21That's, you know, that does not seem

29:26like a feasible way to go about it.

29:29So there is, however, an existence proof that

29:32if you believe that the brain is just a network

29:40of neurons operating by rules,

29:44I guess you could say that that's an existence proof

29:46of the ability to build,

29:49the capabilities of a mechanism.

29:51But it would be almost impossible

29:55to acquire the information

29:57unless we got enough insight

30:00into the operation of the brain.

30:02- But there's so much mystery there.

30:04Do you think, what do you make of consciousness,

30:06for example?

30:08There's something, as an example,

30:10something we completely have no clue about,

30:13the fact that we have this subjective experience.

30:15- Right.

30:16- Is it possible that this network of,

30:19this circuit of switches is able to create

30:22something like consciousness?

30:24- To know its own identity.

30:26- Yeah, to know the algorithm, to know itself.

30:30- To know itself.

30:32I think if you try to define that rigorously,

30:35you'd have a lot of trouble.

30:36- Yeah, that seems to.

30:37- So I know that there are many who

30:45believe that general intelligence can be achieved,

30:50and there are even some who feel certain

30:55that the singularity will come

30:59and we will be surpassed by the machines,

31:01which will then learn more and more about themselves

31:04and reduce humans to an inferior breed.

31:08I am doubtful that this will ever be achieved.

31:12- Just for the fun of it,

31:14could you linger on what's your intuition,

31:18why you're doubtful?

31:19So there are quite a few people

31:20that are extremely worried about this existential threat

31:25of artificial intelligence, of us being left behind

31:29by the super intelligent new species.

31:32What's your intuition why that's not quite likely?

31:36- Just because none of the achievements

31:41in speech or robotics or natural language processing

31:46or creation of flexible computer assistants

31:52or any of that comes anywhere near close

31:56to that level of cognition.

32:00- What do you think about ideas of sort of,

32:02if we look at Moore's law, an exponential improvement

32:05to allow us, that would surprise us?

32:09Sort of our intuition fall apart

32:11with exponential improvement because,

32:14I mean, we're not able to kind of,

32:16we kind of think in linear improvement.

32:18- Yeah.

32:18- We're not able to imagine a world

32:20that goes from the Mark I computer to an iPhone 10.

32:25- Yeah.

32:27- So do you think we could be really surprised

32:31by the exponential growth?

32:33Or on the flip side, is it possible

32:37that also intelligence is actually way, way, way, way harder

32:42even with exponential improvement to be able to crack?

32:47- I don't think any constant factor improvement

32:50could change things.

32:53I mean, given our current comprehension

§04Transcript · 32:57–44:31

32:57of what cognition requires,

33:04it seems to me that multiplying the speed of the switches

33:08by a factor of a thousand or a million

33:10will not be useful until we really understand

33:16the organizational principle behind the network of switches.

33:21- Well, let's jump into the network of switches

33:25and talk about combinatorial algorithms if we could.

33:28Let's step back for the very basics.

33:31What are combinatorial algorithms?

33:33And what are some major examples

33:35of problems they aim to solve?

33:36- A combinatorial algorithm is one which deals

33:43with a system of discrete objects

33:48that can occupy various states

33:52or take on various values from a discrete set of values

33:59and need to be arranged or selected in such a way

34:04as to achieve some, to minimize some cost function

34:12or to prove the existence

34:16of some combinatorial configuration.

34:19So an example would be coloring the vertices of a graph.

34:24- What's a graph?

34:25Let's step back.

34:28So what, it's fun to ask one of the greatest

34:33computer scientists of all time

34:36the most basic questions in the beginning of most books.

34:39But for people who might not know,

34:41but in general how you think about it, what is a graph?

34:44- A graph, that's simple.

34:47It's a set of points, certain pairs of which

34:51are joined by lines called edges.

34:55And they sort of represent the,

34:57in different applications represent the interconnections

35:02between discrete objects.

35:05So they could be the interactions,

35:07interconnections between switches in a digital circuit

35:12or interconnections indicating the communication patterns

35:16of a human community.

35:17- And they could be directed or undirected.

35:21And then as you've mentioned before,

35:23you might have costs.

35:25- Right, they can be directed or undirected.

35:27They can be, you can think of them as,

35:30if you think if a graph were representing

35:34a communication network,

35:36then the edge could be undirected,

35:38meaning that information could flow along it

35:41in both directions, or it could be directed

35:44with only one way communication.

35:47A road system is another example of a graph

35:49with weights on the edges.

35:52And then a lot of problems of optimizing

35:57the efficiency of such networks or learning about

36:02the performance of such networks

36:05are the object of combinatorial algorithms.

36:11So it could be scheduling classes at a school

36:15where the vertices, the nodes of the network

36:20are the individual classes and the edges indicate

36:25the constraints which say that certain classes

36:30cannot take place at the same time,

36:32or certain teachers are available only

36:35for certain classes, et cetera.

36:38Or I talked earlier about the assignment problem

36:43of matching the boys with the girls,

36:47where you have a, there a graph with an edge

36:52from each boy to each girl

36:54with a weight indicating the cost.

36:58Or in logical design of computers,

37:02you might want to find a set of so-called gates,

37:07switches that perform logical functions,

37:11which can be interconnected to realize some function.

37:15So you might ask how many gates do you need

37:20in order to, for a circuit to give a yes output

37:27if at least a given number of its inputs are ones

37:37and no if fewer are present.

37:42- My favorite is probably all the work with network flows.

37:46So anytime you have, I don't know why it's so compelling,

37:50but there's something just beautiful about it.

37:52It seems like there's so many applications

37:54and communication networks and traffic flow

37:59that you can map into these.

38:02And then you can think of pipes and water

38:04going through pipes and you can optimize it

38:06in different ways.

38:07There's something always visually

38:09and intellectually compelling to me about it.

38:12And of course you've done work there.

38:14- Yeah, so there the edges represent channels

38:20along which some commodity can flow.

38:24It might be gas, it might be water,

38:28it might be information.

38:29- Maybe supply chain as well, like products being--

38:33- Products flowing from one operation to another.

38:36- Yeah.

38:37- And the edges have a capacity,

38:40which is the rate at which the commodity can flow.

38:43And a central problem is to determine,

38:48given a network of these channels,

38:51in this case, the edges are communication channels.

38:54The challenge is to find the maximum rate

39:01at which the information can flow along these channels

39:05to get from a source to a destination.

39:09And that's a fundamental combinatorial problem

39:12that I've worked on.

39:14Jointly with the scientist, Jack Edmonds,

39:19we, I think we're the first to give a formal proof

39:22that this maximum flow problem through a network

39:27can be solved in polynomial time.

39:30- Which I remember the first time I learned that,

39:33just learning that in maybe even grad school,

39:39I don't think it was even undergrad, no.

39:42Algorithm, yeah.

39:43Do network flows get taught in basic algorithms courses?

39:48- Yes, probably.

39:51- Okay, so yeah, I remember being very surprised

39:53that max flow is a polynomial time algorithm.

39:56- Yeah.

39:57- That there's a nice, fast algorithm that solves max flow.

40:00But, so there is an algorithm named after you in Edmonds.

40:05The Edmond-Karp algorithm for max flow.

40:08So what was it like tackling that problem

40:12and trying to arrive at a polynomial time solution?

40:15And maybe you can describe the algorithm,

40:17maybe you can describe what's the running time complexity

40:19that you showed.

40:20- Yeah, well, first of all,

40:23what is a polynomial time algorithm?

40:25- Yeah.

40:26- Perhaps we could discuss that.

40:28- So yeah, let's actually just even, yeah.

40:31That's what is algorithmic complexity?

40:34What are the major classes of algorithm complexity?

40:38So we, in a problem like the assignment problem

40:41or scheduling schools or any of these applications,

40:46you have a set of input data,

40:51which might, for example, be a set of vertices

40:57connected by edges with,

41:01you're given for each edge, the capacity of the edge.

41:07And you have algorithms,

41:10which are, think of them as computer programs

41:14with operations such as addition, subtraction,

41:18multiplication, division, comparison of numbers and so on.

41:22And you're trying to construct an algorithm

41:26based on those operations,

41:32which will determine in a minimum number

41:35of computational steps, the answer to the problem.

41:38In this case, the computational step

41:41is one of those operations.

41:43And the answer to the problem is, let's say,

41:46the configuration of the network

41:50that carries the maximum amount of flow.

41:52And an algorithm is said to run in polynomial time

41:58if as a function of the size of the input,

42:04the number of vertices, the number of edges and so on.

42:07The number of basic computational steps

42:12grows only as some fixed power of that size.

42:15A linear algorithm would execute a number of steps

42:21linearly proportional to the size.

42:24Quadratic algorithm would be steps proportional

42:27to the square of the size and so on.

42:29And algorithms whose running time is bounded

42:34by some fixed power of the size

42:37are called polynomial algorithms.

42:39- And that's supposed to be

42:42relatively fast class of algorithms.

42:44- That's right.

42:45Theoreticians take that to be the definition

42:49of an algorithm being efficient.

42:53And we're interested in which problems can be solved

42:57by such efficient algorithms.

43:02One can argue whether that's the right definition

43:04of efficient because you could have an algorithm

43:08whose running time is the 10,000th power

43:11of the size of the input,

43:12and that wouldn't be really efficient.

43:15- And in practice, it's oftentimes reducing

43:19from an N squared algorithm to an N log N

43:22or a linear time is practically the jump

43:26that you wanna make to allow a real world system

43:30to solve a problem.

43:31- Yeah, that's also true because especially

43:33as we get very large networks,

43:35the size can be in the millions

43:38and then anything above N log N,

43:43where N is the size,

43:45would be too much for a practical solution.

43:50- Okay, so that's polynomial time algorithms.

43:52What other classes of algorithms are there?

43:57So that usually they designate polynomials

44:01as a letter P.

44:02- Yeah.

44:03- There's also NP, NP complete, NP hard.

44:06- Yeah.

44:07- So can you try to disentangle those

44:09by trying to define them simply?

44:14- Right, so a polynomial time algorithm

44:16is one whose running time is bounded

44:20by a polynomial in the size of the input.

44:24Then the class of such algorithms is called P.

44:29- In the worst case, by the way, we should say, right?

44:31- Yeah.

§05Transcript · 44:32–56:29

44:32- So for every case of the problem.

44:33- Yes, that's right, and that's very important

44:34that in this theory,

44:36when we measure the complexity of an algorithm,

44:40we really measure the number of steps,

44:45the growth of the number of steps in the worst case.

44:48So you may have an algorithm

44:50that runs very rapidly in most cases,

44:55but if there's any case

44:56where it gets into a very long computation,

45:00that would increase the computational complexity

45:03by this measure.

45:04And that's a very important issue

45:07because there, as we may discuss later,

45:10there are some very important algorithms

45:13which don't have a good standing

45:15from the point of view of their worst case performance

45:18and yet are very effective.

45:19So theoreticians are interested in P,

45:24the class of problems solvable in polynomial time.

45:27Then there's NP, which is the class of problems

45:34which may be hard to solve,

45:38but where the, where when confronted with a solution,

45:43you can check it in polynomial time.

45:46Let me give you an example there.

45:49So if we look at the assignment problem,

45:52so you have n boys, you have n girls,

45:56the number of numbers that you need to write down

45:58to specify the problem instances, n squared.

46:02And the question is

46:06how many steps are needed to solve it.

46:11And Jack Edmonds and I were the first to show

46:15that it could be done in time n cubed.

46:18Earlier algorithms required n to the fourth.

46:23So as a polynomial function of the size of the input,

46:27this is a fast algorithm.

46:29Now to illustrate the class NP,

46:33the question is how long would it take to verify

46:37that a solution is optimal?

46:42So for example, if the input was a graph,

46:47we might want to find the largest clique in the graph,

46:53or a clique is a set of vertices such that any vertex,

46:58each vertex in the set is adjacent to each of the others.

47:03So the clique is a complete subgraph.

47:08- Yeah, so if it's a Facebook social network,

47:11everybody's friends with everybody else,

47:14close clique of friends.

47:14- No, that would be what's called a complete graph,

47:17it would be.

47:18- No, I mean within that clique.

47:20- Within that clique, yeah.

47:22They're all friends.

47:25- So a complete graph is when--

47:27- Everybody is friendly.

47:28- Is everybody is friends with everybody, yeah.

47:31- So the problem might be to determine

47:35whether in a given graph there exists a clique

47:39of a certain size.

47:41- Well, that turns out to be a very hard problem,

47:45but if somebody hands you a clique

47:49and asks you to check whether it is,

47:52hands you a set of vertices and asks you to check

47:56whether it's a clique, you could do that simply

48:00by exhaustively looking at all of the edges

48:02between the vertices in the clique

48:05and verifying that they're all there.

48:08- And that's a polynomial time algorithm.

48:10- That's a polynomial, so the problem of finding the clique

48:15appears to be extremely hard,

48:19but the problem of verifying a clique

48:21to see if it reaches a target number of vertices

48:26is easy to verify.

48:31So finding the clique is hard, checking it is easy.

48:35Problems of that nature are called

48:39non-deterministic polynomial time algorithms,

48:42and that's the class NP.

48:44- And what about NP complete and NP hard?

48:48- Okay, let's talk about problems

48:50where you're getting a yes or no answer

48:53rather than a numerical value.

48:55So either there is a perfect matching

48:58of the boys with the girls or there isn't.

49:04It's clear that every problem in NP is also in NP.

49:09If you can solve the problem exactly,

49:12then you can certainly verify the solution.

49:17On the other hand, there are problems in the class NP.

49:22This is the class of problems that are easy to check,

49:27although they may be hard to solve.

49:29It's not at all clear that problems in NP lie in P.

49:33So for example, if we're looking at scheduling classes

49:37at a school, the fact that you can verify

49:42when handed a schedule for the school,

49:45whether it meets all the requirements,

49:47that doesn't mean that you can find the schedule rapidly.

49:51So intuitively, NP, non-deterministic polynomial,

49:55checking rather than finding,

49:58is going to be harder than,

50:01is going to include, is easier.

50:06Checking is easier, and therefore the class of problems

50:08that can be checked appears to be much larger

50:11than the class of problems that can be solved.

50:14- And then you keep adding appears to

50:17and sort of these additional words

50:21that designate that we don't know for sure yet.

50:24- We don't know for sure.

50:25So the theoretical question,

50:27which is considered to be the most central problem

50:30in theoretical computer science,

50:32or at least computational complexity theory,

50:35combinatorial algorithm theory,

50:38question is whether P is equal to NP.

50:42If P were equal to NP, it would be amazing.

50:46It would mean that every problem

50:54where a solution can be rapidly checked

50:56can actually be solved in polynomial time.

51:00We don't really believe that's true.

51:03If you're scheduling classes at a school,

51:05we expect that if somebody hands you a satisfying schedule,

51:13you can verify that it works.

51:15That doesn't mean that you should be able

51:17to find such a schedule.

51:18So intuitively, NP encompasses a lot more problems than P.

51:24- So can we take a small tangent

51:28and break apart that intuition?

51:30So do you, first of all, think that the biggest

51:34sort of open problem in computer science,

51:36maybe mathematics, is whether P equals NP?

51:40Do you think P equals NP?

51:43Or do you think P is not equal to NP?

51:46If you had to bet all your money on it.

51:48- I would bet that P is unequal to NP,

51:52simply because there are problems

51:54that have been around for centuries

51:55and have been studied intensively in mathematics,

51:59and even more so in the last 50 years

52:02since the P versus NP was stated.

52:05And no polynomial time algorithms have been found

52:10for these easy to check problems.

52:13So one example is a problem that goes back

52:17to the mathematician Gauss,

52:19who was interested in factoring large numbers.

52:24So we know what a number is prime

52:27if it cannot be written as the product

52:31of two or more numbers unequal to one.

52:35So if we can factor a number like 91, it's seven times 13.

52:41But if I give you 20 digit or 30 digit numbers,

52:49you're probably going to be at a loss

52:52to have any idea whether they can be factored.

52:55So the problem of factoring very large numbers

53:00does not appear to have an efficient solution.

53:05But once you have found the factors,

53:09expressed the number as a product of two smaller numbers,

53:16you can quickly verify that they are factors of the number.

53:19- And your intuition is a lot of people finding,

53:22you know, a lot of brilliant people

53:24have tried to find algorithms.

53:25This one particular problem, there's many others like it

53:28that are really well studied,

53:30and it would be great to find an efficient algorithm for.

53:33- Right, and in fact, we have some results

53:38that I was instrumental in obtaining,

53:43following up on work by the mathematician Stephen Cook,

53:46to show that within the class NP,

53:52of easy to check problems,

53:55there's a huge number that are equivalent in the sense

53:59that either all of them or none of them lie in P.

54:03And this happens only if P is equal to NP.

54:06So if P is unequal to NP, we would also know

54:10that virtually all the standard combinatorial problems,

54:15if P is unequal to NP,

54:22none of them can be solved in polynomial time.

54:25- Can you explain how that's possible

54:28to tie together so many problems in a nice bunch

54:32that if one is proven to be efficient, then all are?

54:36- The first and most important stage of progress

54:40was a result by Stephen Cook,

54:44who showed that a certain problem

54:49called the satisfiability problem of propositional logic

54:54is as hard as any problem in the class P.

55:00So the propositional logic problem is expressed

55:05in terms of expressions involving the logical operations

55:11and or and not operating on variables

55:16that can be either true or false.

55:19So an instance of the problem would be some formula

55:24involving and or and not.

55:26And the question would be whether there is an assignment

55:31of truth values to the variables in the problem

55:34that would make the formula true.

55:37So for example, if I take the formula A or B

55:42and A or not B and not A or B and not A or not B

55:47and take the conjunction of all four

55:51of those so-called expressions,

55:54you can determine that no assignment of truth values

55:59to the variables A and B will allow that conjunction

56:03of what are called clauses to be true.

56:08So that's an example of a formula in propositional logic

56:14involving expressions based on the operations and or and not.

56:21That's an example of a problem which is not satisfiable.

56:27There is no solution that satisfies

56:29all of those constraints.

§06Transcript · 56:31–1:08:21

56:31- And that's like one of the cleanest

56:32and fundamental problems in computer science.

56:35It's like a nice statement of a really hard problem.

56:37- It's a nice statement of a really hard problem.

56:39And what Cook showed is that every problem in NP

56:44can be re-expressed as an instance

56:53of the satisfiability problem.

56:56So to do that, he used the observation

57:02that a very simple abstract machine

57:04called the Turing machine can be used

57:08to describe any algorithm.

57:12An algorithm for any realistic computer

57:17can be translated into an equivalent algorithm

57:22on one of these Turing machines,

57:25which are extremely simple.

57:27- So Turing machine, there's a tape

57:29and you can walk along that tape.

57:32- Yeah, you have data on a tape

57:33and you have basic instructions,

57:35a finite list of instructions,

57:37which say if you're reading a particular symbol on the tape

57:42and you're in a particular state,

57:45then you can move to a different state

57:49and change the state of the number,

57:52the element that you were looking at,

57:53the cell of the tape that you were looking at.

57:55- And that was like a metaphor and a mathematical construct

57:58that Turing put together

57:59to represent all possible computation.

58:02- All possible computation.

58:03Now, one of these so-called Turing machines

58:06is too simple to be useful in practice,

58:09but for theoretical purposes,

58:11we can depend on the fact that an algorithm

58:15for any computer can be translated

58:18into one that would run on a Turing machine.

58:21And then using that fact,

58:26he could sort of describe

58:29any possible non-deterministic polynomial time algorithm,

58:35any algorithm for a problem in NP

58:40could be expressed as a sequence of moves

58:44of the Turing machine described

58:47in terms of reading a symbol on the tape

58:51while you're in a given state

58:55and moving to a new state

58:56and leaving behind a new symbol.

58:59And given that fact that any

59:04non-deterministic polynomial time algorithm

59:07can be described by a list of such instructions,

59:12you could translate the problem

59:15into the language of the satisfiability problem.

59:19- Is that amazing to you, by the way,

59:20if you take yourself back when you were first thinking

59:22about this space of problems?

59:23How amazing is that?

59:26- It's astonishing.

59:27When you look at Cook's proof,

59:30it's not too difficult to sort of figure out

59:34why this is so,

59:38but the implications are staggering.

59:40It tells us that this, of all the problems in NP,

59:46all the problems where solutions are easy to check,

59:51they can all be rewritten in terms of

59:54the satisfiability problem.

59:57- Yeah, it's adding so much more weight

60:04to the P equals NP question,

60:06because all it takes is to show that one--

60:09- That's right.

60:10- One algorithm in this class--

60:11- So the P versus NP can be re-expressed

60:13as simply asking whether the satisfiability problem

60:17of propositional logic is solvable in polynomial time.

60:21But there's more.

60:25I encountered Cook's paper

60:30when he published it in a conference in 1971.

60:34Yeah, so when I saw Cook's paper

60:37and saw this reduction of each of the problems in NP

60:44by a uniform method to the satisfiability problem

60:49of propositional logic,

60:50that meant that the satisfiability problem

60:54was a universal combinatorial problem.

60:57And it occurred to me through experience I had had

61:04in trying to solve other combinatorial problems

61:07that there were many other problems

61:10which seemed to have that universal structure.

61:14And so I began looking for reductions

61:19from the satisfiability to other problems.

61:26One of the other problems would be

61:32the so-called integer programming problem

61:35of determining whether there's a solution

61:40to a set of linear inequalities

61:45involving integer variables.

61:47- Just like linear programming,

61:49but there's a constraint

61:50that the variables must remain integers.

61:53- Integers, in fact, must be either zero or one.

61:56It could only take on those values.

61:58- And that makes the problem much harder.

62:00- Yes, that makes the problem much harder.

62:03And it was not difficult to show

62:07that the satisfiability problem can be restated

62:11as an integer programming problem.

62:13- So can you pause on that?

62:15Was that one of the first problem mappings

62:17that you tried to do?

62:19And how hard is that map?

62:20And you said it wasn't hard to show,

62:21but that's a big leap.

62:26- It is a big leap, yeah.

62:29Well, let me give you another example.

62:32Another problem in NP

62:35is whether a graph contains a clique of a given size.

62:39And now the question is,

62:46can we reduce the propositional logic problem

62:51to the problem of whether there's a clique

62:55of a certain size?

62:56Well, if you look at the propositional logic problem,

63:01it can be expressed as a number of clauses,

63:05each of which is of the form A or B or C,

63:10where A is either one of the variables in the problem

63:18or the negation of one of the variables.

63:20And an instance of the propositional logic problem

63:30can be rewritten using operations of Boolean logic.

63:35Can be rewritten as the conjunction of a set of clauses,

63:41the and of a set of ors,

63:43where each clause is a disjunction,

63:48an or of variables or negated variables.

63:51So the question of,

63:58in the satisfiability problem,

64:01is whether those clauses can be simultaneously satisfied.

64:05Now to satisfy all those clauses,

64:09you have to find one of the terms in each clause,

64:13which is going to be true in your truth assignment,

64:18but you can't make the same variable both true and false.

64:24So if you have the variable A in one clause

64:29and you want to satisfy that clause by making A true,

64:34you can't also make the complement of A true

64:38in some other clause.

64:39- And so the goal is to make every single clause true

64:43if it's possible to satisfy this.

64:45And the way you make it true is at least...

64:47- One term in the clause must be true.

64:52- Got it.

64:53So now we, to convert this problem

64:58to something called the independent set problem,

65:01where you're just sort of asking for a set of vertices

65:06in a graph such that no two of them are adjacent,

65:08sort of the opposite of the clique problem.

65:11So we've seen that we can now express that as...

65:19Finding a set of terms, one in each clause,

65:24without picking both the variable

65:36and the negation of that variable.

65:39Because if the variable is assigned the truth value,

65:42the negated variable has to have the opposite truth value.

65:46- Right.

65:47- And so we can construct a graph

65:50where the vertices are the terms in all of the clauses.

65:55And you have an edge between two terms,

66:03if an edge between two occurrences of terms.

66:14Either if they're both in the same clause,

66:17because you're only picking one element from each clause.

66:20And also an edge between them

66:23if they represent opposite values of the same variable,

66:27because you can't make a variable both true and false.

66:30And so you get a graph

66:32where you have all of these occurrences of variables.

66:35You have edges, which mean that you're not allowed

66:38to choose both of the variables.

66:42Both ends of the edge,

66:44either because they're in the same clause

66:46or they're negations of one another.

66:50- Right, and that's a, first of all,

66:53sort of to zoom out, that's a really powerful idea

66:56that you could take a graph

66:59and connect it to a logic equation somehow.

67:03And do that mapping for all possible formulations

67:08of a particular problem on a graph.

67:10- Yeah.

67:11- I mean, that still is hard for me to believe

67:15that that's possible.

67:17Like, what do you make of that,

67:20that there's such a union of,

67:24there's such a friendship among all these problems across

67:28that somehow are akin to combinatorial algorithms,

67:33that they're all somehow related.

67:35I know it can be proven, but what do you make of it,

67:39that that's true?

67:41- Well, that they just have the same expressive power.

67:46You can take any one of them

67:49and translate it into the terms of the other.

67:53- The fact that they have the same expressive power

67:55also somehow means that they can be translatable.

67:59- Right.

68:00And what I did in the 1971 paper

68:03was to take 21 fundamental problems,

68:09commonly occurring problems of packing,

68:12covering, matching, and so forth,

68:14lying in the class NP,

68:19and show that the satisfiability problem

68:21can be re-expressed as any of those,

§07Transcript · 1:08:24–1:19:40

68:24that any of those have the same expressive power.

68:29So--

68:30- And that was like throwing down the gauntlet

68:31of saying there's probably many more problems like this.

68:35- Right.

68:36- But that's just saying that,

68:37look, that they're all the same.

68:39- They're all the same, but not exactly.

68:43Yeah, they're all the same in terms of

68:45whether they are rich enough to express any of the others.

68:50But that doesn't mean that they have

68:55the same computational complexity.

68:57But what we can say is that either all of these problems

69:02or none of them are solvable in polynomial time.

69:05- Yeah, so where does NP completeness and NP hard

69:10as classes fit?

69:11- Oh, that's just a small technicality.

69:14So when we're talking about decision problems,

69:17that means that the answer is just yes or no.

69:20There is a clique of size 15

69:23or there's not a clique of size 15.

69:25On the other hand, an optimization problem would be asking,

69:29find the largest clique.

69:33The answer would not be yes or no,

69:34it would be 15.

69:36So when you're asking for the,

69:41when you're putting a valuation on the different solutions

69:46and you're asking for the one with the highest valuation,

69:49that's an optimization problem.

69:51And there's a very close affinity

69:52between the two kinds of problems.

69:55But the counterpart of being the hardest decision problem,

70:00the hardest yes/no problem,

70:04the counterpart of that is to minimize

70:09or maximize an objective function.

70:13And so a problem that's hardest in the class

70:16when viewed in terms of optimization,

70:19those are called NP hard rather than NP complete.

70:24- And NP complete is for decision problems.

70:26- And NP complete is for decision problems.

70:29- So if somebody shows that P equals NP,

70:34what do you think that proof will look like

70:39if you were to put on yourself,

70:41if it's possible to show that as a proof

70:45or to demonstrate an algorithm?

70:47- All I can say is that it will involve concepts

70:52that we do not now have and approaches that we don't have.

70:56- Do you think those concepts are out there

70:58in terms of inside complexity theory,

71:01inside of computational analysis of algorithms?

71:04Do you think there's concepts

71:05that are totally outside of the box

71:07that we haven't considered yet?

71:09- I think that if there is a proof that P is equal to NP

71:13or that P is not equal to NP,

71:15it'll depend on concepts that are now outside the box.

71:21- Now if that's shown, either way, P equals NP or P not,

71:25well, actually P equals NP,

71:28what impact, you kind of mentioned a little bit,

71:32but can you linger on it?

71:34What kind of impact would it have

71:36on theoretical computer science

71:38and perhaps software systems in general?

71:42- Well, I think it would have enormous impact

71:44on the world in either way case.

71:49If P is unequal to NP, which is what we expect,

71:52then we know that for the great majority

71:56of the combinatorial problems that come up,

71:59since they're known to be NP complete,

72:02we're not going to be able to solve them

72:05by efficient algorithms.

72:07However, there's a little bit of hope

72:11in that it may be that we can solve most instances.

72:16All we know is that if a problem is not in P,

72:19then it can't be solved efficiently on all instances.

72:25But basically, it will,

72:27if we find that P is unequal to NP,

72:32it will mean that we can't expect always

72:35to get the optimal solutions to these problems.

72:38And we have to depend on heuristics

72:41that perhaps work most of the time

72:43or give us good approximate solutions.

72:45- So we would turn our eye towards the heuristics

72:52with a little bit more acceptance and comfort on our hearts.

72:56- Exactly.

72:57- Okay, so let me ask a romanticized question.

73:01What to you is one of the most

73:04or the most beautiful combinatorial algorithm

73:08in your own life or just in general

73:10in the field that you've ever come across

73:12or have developed yourself?

73:14- I like the stable matching problem

73:17or the stable marriage problem very much.

73:22- What's the stable matching problem?

73:25- Yeah.

73:26Imagine that you want to marry off N boys

73:31with N girls.

73:34And each boy has an ordered list

73:39of his preferences among the girls,

73:42his first choice, his second choice,

73:44through her Nth choice.

73:47And each girl also has an ordering of the boys,

73:52his first choice, second choice, and so on.

73:57And we'll say that a matching,

74:03a one-to-one matching of the boys with the girls is stable

74:07if there are no two couples in the matching

74:15such that the boy in the first couple

74:18prefers the girl in the second couple to her mate

74:23and she prefers the boy to her current mate.

74:27In other words, if there is, the matching is stable

74:31if there is no pair who want to run away with each other,

74:35leaving their partners behind.

74:37- Gotcha. (laughs)

74:41Yeah.

74:44- Actually, this is relevant to matching residents

74:49with hospitals and some other real-life problems,

74:52although not quite in the form that I described.

74:55So it turns out that there is,

74:59that for any set of preferences, a stable matching exists.

75:04And moreover, it can be computed by a simple algorithm

75:14in which each boy starts making proposals to girls.

75:19And if a girl receives a proposal,

75:23she accepts it tentatively, but she can drop it if,

75:27she can end it, she can drop it later

75:32if she gets a better proposal from her point of view.

75:35And the boys start going down their list,

75:39proposing to their first, second, third choices

75:41until stopping when a proposal is accepted.

75:46But the girls, meanwhile, are watching the proposals

75:53that are coming into them,

75:55and the girl will drop her current partner

75:58if she gets a better proposal.

76:03- And the boys never go back through the list?

76:06- They never go back, yeah.

76:07So once they've been denied.

76:09(both laugh)

76:11- They don't try again?

76:12- They don't try again,

76:14because the girls are always improving their status

76:19as they receive better and better proposals.

76:22The boys are going down their list,

76:25starting with their top preferences.

76:28And one can prove that the process will come to an end

76:39where everybody will get matched with somebody,

76:43and you won't have any pair that want to abscond

76:48from each other.

76:50- Do you find the proof or the algorithm itself beautiful,

76:54or is it the fact that with the simplicity

76:56of just the two marching,

76:59I mean, the simplicity of the underlying rule

77:01of the algorithm, is that the beautiful part?

77:04- Both, I would say.

77:07And you also have the observation that you might ask,

77:11who is better off, the boys who are doing the proposing

77:14or the girls who are reacting to proposals?

77:17And it turns out that it's the boys who are doing the best,

77:22and as each boy is doing at least as well

77:25as he could do in any other staple matching.

77:30So there's a sort of lesson for the boys

77:33that you should go out and be proactive

77:36and make those proposals, go for broke.

77:39- I don't know if this is directly mappable

77:43philosophically to our society,

77:45but certainly seems like a compelling notion.

77:48And like you said, there's probably a lot

77:51of actual real-world problems that this could be mapped to.

77:54- Yeah, well, you get complications.

77:58For example, what happens when a husband and wife

78:01want to be assigned to the same hospital?

78:03So you have to take those constraints into account.

78:08And then the problem becomes NP-hard.

78:13- Why is it a problem for the husband and wife

78:18to be assigned to the same hospital?

78:19- No, it's desirable.

78:21- Desirable.

78:22- Or at least go to the same city.

78:24So you can't, if you're--

78:26- I see.

78:27- If you're assigning residents to hospitals.

78:29- And then you have some preferences

78:32for the husband and wife or for the hospitals.

78:34- The residents have their own preferences.

78:37References, residents, both male and female,

78:41have their own preferences.

78:43The hospitals have their preferences.

78:47But if resident A, the boy, is going to Philadelphia,

78:52then you'd like his wife also to be assigned to a hospital.

79:01- To be assigned to a hospital in Philadelphia.

79:04- Which step makes it a NP-hard problem that you mentioned?

79:08- The fact that you have this additional constraint.

79:11That it's not just the preferences of individuals,

79:15but the fact that the two partners to a marriage

79:19have to be assigned to the same place.

79:22- I'm being a little dense.

79:29The perfect matching?

79:30No, not the perfect, stable matching is what you refer to.

79:33That's when two partners are trying to--

79:36- Okay, what's confusing you is that in the first

79:39interpretation of the problem,

79:40I had boys matching with girls.

§08Transcript · 1:19:42–1:32:39

79:42- Yes.

79:44- In the second interpretation,

79:46you have humans matching with institutions.

79:49- With institutions.

79:50And there's a coupling between within the,

79:54gotcha, within the humans.

79:56- Any added little constraint will make it

79:59an NP-hard problem.

80:00- Well, yeah.

80:01- Okay.

80:04By the way, the algalene you mentioned,

80:06was it one of yours?

80:07- No, no, that was due to Gale and Shapley.

80:11My friend David Gale passed away before he could get part

80:16of the Nobel Prize, but his partner Shapley shared

80:21in the Nobel Prize with somebody else for--

80:24- Economics?

80:25- For economics, for ideas stemming

80:29from the stable matching idea.

80:31- So you've also developed yourself some elegant,

80:36beautiful algorithms.

80:37Again, picking your children, so the Robin Karp algorithm

80:42for string searching, pattern matching, Edmund Karp

80:45algorithm for max flows we mentioned,

80:46Hopcroft Karp algorithm for finding maximum cardinality

80:50matchings in bipartite graphs.

80:52Is there ones that stand out to you,

80:55ones you're most proud of, or just whether it's beauty,

81:00elegance, or just being the right discovery,

81:05development in your life that you're especially proud of?

81:08- I like the Robin Karp algorithm because it illustrates

81:13the power of randomization.

81:17So the problem there is to decide whether a given long string

81:22of symbols from some alphabet contains a given word,

81:38whether a particular word occurs within some very much

81:42longer word, and so the idea of the algorithm

81:47is to associate with the word that we're looking for,

81:57a fingerprint, some number or some combinatorial object

82:02that describes that word, and then to look for an occurrence

82:12of that same fingerprint as you slide along the longer word.

82:15And what we do is we associate with each word a number.

82:23So we, first of all, we think of the letters that occur

82:29in a word as the digits of, let's say, decimal

82:33or whatever base here, whatever number of different symbols

82:38there are in the alphabet.

82:42- That's the base of the numbers, yeah.

82:44- Right, so every word can then be thought of as a number

82:48with the letters being the digits of that number.

82:52And then we pick a random prime number in a certain range

82:58and we take that word viewed as a number

83:03and take the remainder on dividing that number by the prime.

83:09- So coming up with a nice hash function.

83:14- It's a kind of hash function.

83:16- Yeah, it gives you a little shortcut

83:20for that particular word.

83:22- Yeah, so that's the--

83:26- It's very different than other algorithms of its kind

83:31that were trying to do search, string matching.

83:35- Yeah, which usually are combinatorial

83:38and don't involve the idea of taking a random fingerprint.

83:42- Yes.

83:43- And doing the fingerprinting has two advantages.

83:48One is that as we slide along the long word,

83:51digit by digit, we keep a window of a certain size,

83:56the size of the word we're looking for.

84:00And we compute the fingerprint of every stretch

84:05of that length and it turns out that just a couple

84:09of arithmetical operations will take you

84:11from the fingerprint of one part to what you get

84:16when you slide over by one position.

84:18So the computation of all the fingerprints is simple.

84:24And secondly, it's unlikely if the prime is chosen randomly

84:32from a certain range that you will get two of the segments

84:37in question having the same fingerprint.

84:40And so there's a small probability of error

84:43which can be checked after the fact

84:46and also the ease of doing the computation

84:48because you're working with these fingerprints

84:51which are remainder's modulo some big prime.

84:54- So that's the magical thing about randomized algorithms

84:58is that if you add a little bit of randomness,

85:02it somehow allows you to take a pretty naive approach,

85:05a simple looking approach

85:07and allow it to run extremely well.

85:10So can you maybe take a step back and say,

85:14like what is a randomized algorithm,

85:16this category of algorithms?

85:18- Well, it's just the ability to draw a random number

85:22from some range or to associate a random number

85:30with some object or to draw at random from some set.

85:35So another example is very simple

85:40if we're conducting a presidential election

85:45and we would like to pick the winner.

85:50In principle, we could draw a random sample

85:57of all of the voters in the country.

86:00And if it was of substantial size, say a few thousand

86:05then the most popular candidate in that group

86:08would be very likely to be the correct choice

86:12that would come out of counting all the millions of votes.

86:15And of course we can't do this

86:17because first of all,

86:18everybody has to feel that his or her vote counted.

86:21And secondly, we can't really do a purely random sample

86:25from that population.

86:28And I guess thirdly, there could be a tie in which case

86:31we wouldn't have a significant difference

86:34between two candidates.

86:36- But those things aside,

86:37if you didn't have all that messiness of human beings,

86:40you could prove that that kind of random picking would--

86:43- You guess that random picking would solve the problem

86:48with a very low probability of error.

86:51Another example is testing whether a number is prime.

86:55So if I want to test whether 17 is prime,

87:00I could pick any number between one and 17

87:06and raise it to the 16th power modulo 17

87:12and you should get back the original number.

87:15That's a famous formula due to Fermat

87:18about it's called Fermat's little theorem

87:21that if you take any number A in the range

87:26zero through N minus one

87:31and raise it to the N minus one power modulo N,

87:37you'll get back the number A if A is prime.

87:43So if you don't get back the number A,

87:45that's a proof that a number is not prime.

87:49- Wow. (laughs)

87:52- And you can show that suitably define

87:57the probability that you will get a value unequal,

88:05you will get a violation of Fermat's result is very high

88:14and so this gives you a way of rapidly proving

88:18that a number is not prime.

88:20It's a little more complicated than that

88:22because there are certain values of N

88:26where something a little more elaborate has to be done

88:28but that's the basic idea.

88:30Taking an identity that holds for primes

88:34and therefore if it ever fails on any instance

88:39for a non-prime, you know that the number is not prime.

88:43It's a quick choice, a fast choice,

88:45fast proof that a number is not prime.

88:48- Can you maybe elaborate a little bit more

88:50of what's your intuition why randomness works so well

88:54and results in such simple algorithms?

88:56- Well, the example of conducting an election

89:00where you could take in theory, you could take a sample

89:04and depend on the validity of the sample

89:07to really represent the whole,

89:09is it just the basic fact of statistics

89:12which gives a lot of opportunities.

89:17And I actually exploited that sort of random sampling idea

89:22in designing an algorithm for counting the number

89:28of solutions that satisfy a particular formula

89:33and propositional logic.

89:36- A particular, so some version

89:41of the satisfiability problem or?

89:44- A version of the satisfiability problem.

89:47- Is there some interesting insight

89:49that you wanna elaborate on?

89:50Like what some aspect of that algorithm

89:53that might be useful to describe?

89:57- So you have a collection of formulas

90:02and you want to count the number of solutions

90:14that satisfy at least one of the formulas.

90:18And you can count the number of solutions

90:23that satisfy any particular one of the formulas,

90:27but you have to account for the fact

90:29that that solution might be counted many times

90:33if it solves more than one of the formulas.

90:40And so what you do is you sample from the formulas

90:45according to the number of solutions

90:49that satisfy each individual one.

90:52And that way you draw a random solution,

90:55but then you correct by looking at the number of formulas

91:00that satisfy that random solution and don't double count.

91:08So if you, you can think of it this way.

91:11So you have a matrix of zeros and ones,

91:15and you wanna know how many columns

91:18of that matrix contain at least one one.

91:20And you can count in each row how many ones there are.

91:26So what you can do is draw from the rows

91:29according to the number of ones.

91:31If a row has more ones, it gets drawn more frequently.

91:35But then if you draw from that row,

91:39you have to go up the column and looking at

91:42where that same one is repeated in different rows

91:45and only count it as a success or a hit

91:51if it's the earliest row that contains the one.

91:54- Right.

91:55- And that gives you a robust statistical estimate

92:00of the total number of columns

92:02that contain at least one of the ones.

92:04So that is an example of the same principle

92:09that was used in studying random sampling.

92:13Another viewpoint is that if you have a phenomenon

92:18that occurs almost all the time,

92:21then if you sample one of the occasions where it occurs,

92:27you're most likely to, and you're looking for an occurrence,

92:32a random occurrence is likely to work.

92:34So that comes up in solving identities,

92:39solving algebraic identities.

§09Transcript · 1:32:42–1:43:22

92:42You get two formulas that may look very different.

92:46You wanna know if they're really identical.

92:48What you can do is just pick a random value

92:52and evaluate the formulas at that value

92:55and seeing if they agree.

92:58And you depend on the fact

93:01that if the formulas are distinct,

93:04then they're gonna disagree a lot.

93:06And so therefore a random choice

93:08will exhibit the disagreement.

93:10And if there are many ways for the two to disagree,

93:15and you only need to find one disagreement,

93:18then random choice is likely to yield it.

93:22- And in general,

93:23so we've just talked about randomized algorithms,

93:26but we can look at the probabilistic analysis

93:28of algorithms.

93:29And that gives us an opportunity to step back.

93:32And as we've said,

93:34everything we've been talking about is worst case analysis.

93:37- Right.

93:38- Could you maybe comment on the usefulness

93:43and the power of worst case analysis

93:45versus best case analysis, average case, probabilistic?

93:50How do we think about the future

93:52of theoretical computer science, computer science,

93:56in the kind of analysis we do of algorithms?

93:59Does worst case analysis still have a place,

94:01an important place,

94:02or do we want to try to move forward

94:04towards kind of average case analysis?

94:06- Yeah.

94:07- And what are the challenges there?

94:09- So if worst case analysis shows

94:11that an algorithm is always good, that's fine.

94:16If worst case analysis is used to show

94:23that the problem, that the solution is not always good,

94:28then you have to step back and do something else to ask,

94:32how often will you get a good solution?

94:34- Just to pause on that for a second,

94:38that's so beautifully put,

94:40because I think we tend to judge algorithms.

94:43We throw them in the trash the moment

94:46their worst case is shown to be bad.

94:48- Right.

94:49And that's unfortunate.

94:50I think a good example is going back

94:55to the satisfiability problem.

94:58There are very powerful programs called SAT solvers,

95:04which in practice fairly reliably solve instances

95:09with many millions of variables that arise

95:12in a digital design or in proving programs correct

95:16in other applications.

95:20And so in many application areas,

95:24even though satisfiability,

95:25as we've already discussed, is NP-complete,

95:29the SAT solvers will work so well

95:34that the people in that discipline tend to think

95:37of satisfiability as an easy problem.

95:40So in other words, just for some reason

95:45that we don't entirely understand,

95:47the instances that people formulate

95:50in designing digital circuits or other applications

95:54are such that satisfiability is not hard to check.

95:59And even searching for a satisfying solution

96:07can be done efficiently in practice.

96:10And there are many examples.

96:13For example, we talked about

96:15the traveling salesman problem.

96:17So just to refresh our memories,

96:21the problem is you've got a set of cities,

96:23you have pairwise distances between cities,

96:27and you want to find a tour through all the cities

96:31that minimizes the total cost of all the edges traversed,

96:36all the trips between cities.

96:38The problem is NP-hard,

96:42but people using integer programming codes

96:46together with some other mathematical tricks

96:50can solve geometric instances of the problem

96:56where the cities are, let's say, points in the plane,

96:59and get optimal solutions to problems

97:03with tens of thousands of cities.

97:05Actually, it'll take a few computer months

97:08to solve a problem of that size,

97:10but for problems of size 1,000 or 2,

97:13it'll rapidly get optimal solutions,

97:16provably optimal solutions,

97:19even though, again, we know that it's unlikely

97:23that the traveling salesman problem

97:25can be solved in polynomial time.

97:28- Are there methodologies,

97:31like rigorous systematic methodologies for,

97:35you said in practice.

97:38In practice, this algorithm is pretty good.

97:40Are there systematic ways of saying,

97:42in practice, this one is pretty good?

97:43So in other words, average case analysis,

97:46or you've also mentioned that average case

97:49kind of requires you to understand

97:50what the typical case is, typical instances,

97:53and that might be really difficult.

97:55- That's very difficult.

97:56So after I did my original work

97:59on getting, showing all these problems to be NP-complete,

98:06I looked around for a way to get some,

98:09shed some positive light on combinatorial algorithms,

98:13and what I tried to do was to study

98:16problems, behavior on the average or with high probability,

98:23but I had to make some assumptions

98:26about what's the probability space,

98:29what's the sample space,

98:30what do we mean by typical problems?

98:33That's very hard to say,

98:35so I took the easy way out

98:37and made some very simplistic assumptions.

98:40So I assumed, for example,

98:42that if we were generating a graph

98:44with a certain number of vertices and edges,

98:47then we would generate the graph

98:48by simply choosing one edge at a time at random

98:53until we got the right number of edges.

98:56That's a particular model of random graphs

98:59that has been studied mathematically a lot,

99:02and within that model,

99:05I could prove all kinds of wonderful things,

99:07I and others who also worked on this.

99:10So we could show that we know exactly how many edges

99:15there have to be in order for

99:17there be a so-called Hamiltonian circuit

99:24that's a cycle that visits each vertex exactly once.

99:31We know that if the number of edges

99:35is a little bit more than n log n,

99:37where n is the number of vertices,

99:39then such a cycle is very likely to exist,

99:44and we can give a heuristic

99:45that'll find it with high probability.

99:47And we got the community in which I was working,

99:53got a lot of results along these lines,

99:58but the field tended to be rather lukewarm

100:03about accepting these results as meaningful

100:07because we were making such a simplistic assumption

100:09about the kinds of graphs that we would be dealing with.

100:13So we could show all kinds of wonderful things,

100:16it was a great playground, I enjoyed doing it,

100:18but after a while, I concluded that

100:27it didn't have a lot of bite

100:29in terms of the practical application.

100:31- Okay, so there's too much into the world of toy problems.

100:35- Yeah.

100:36- Okay, but all right, is there a way to find

100:41nice representative real-world impactful instances

100:45of a problem on which demonstrate that an algorithm is good?

100:48So this is kind of like the machine learning world,

100:51that's kind of what they at its best tries to do

100:54is find a dataset from the real world

100:57and show the performance,

100:59all the conferences are all focused

101:02on beating the performance on that real-world dataset.

101:07Is there an equivalent in the complexity analysis?

101:10- Not really.

101:12Don Knuth started to collect examples of graphs

101:19coming from various places,

101:21so he would have a whole zoo of different graphs

101:26that he could choose from

101:27and he could study the performance of algorithms

101:30on different types of graphs.

101:31- But there it's really important and compelling

101:37to be able to define a class of graphs.

101:39The actual act of defining a class of graphs

101:44that you're interested in,

101:44it seems to be a non-trivial step

101:47if we're talking about instances

101:49that we should care about in the real world.

101:51- Yeah, there's nothing available there

101:55that would be analogous to the training set

101:58for supervised learning,

102:00where you sort of assume that the world

102:03has given you a bunch of examples to work with.

102:08We don't really have that for problems,

102:14for combinatorial problems on graphs and networks.

102:18- You know, there's been a huge growth,

102:20a big growth of data sets available.

102:23Do you think some aspect of theoretical computer science,

102:28I might be contradicting my own question while saying it,

102:30but will there be some aspect,

102:33an empirical aspect of theoretical computer science

102:36which will allow the fact that these data sets are huge,

102:41we'll start using them for analysis?

102:45- If you want to say something about a graph algorithm,

102:48you might take a social network like Facebook

102:53and looking at subgraphs of that

102:55and prove something about the Facebook graph

102:58and at the same time be respected

103:01in the theoretical computer science community.

103:03- That hasn't been achieved yet, I'm afraid.

103:06- Is that P equals NP, is that impossible?

103:10Is it impossible to publish a successful paper

103:14in the theoretical computer science community

103:17that shows some performance on a real world data set?

103:22Or is that really just those are two different worlds?

§10Transcript · 1:43:26–1:55:29

103:26- They haven't really come together.

103:27I would say that there is a field

103:31of experimental algorithmics where people,

103:35sometimes they're given some family of examples.

103:39Sometimes they just generate them at random

103:42and they report on performance,

103:44but there's no convincing evidence

103:51that the sample is representative of anything at all.

103:56- So let me ask in terms of breakthroughs and open problems,

104:02what are the most compelling open problems to you

104:05and what possible breakthroughs do you see in the near term

104:08in terms of theoretical computer science?

104:12- Well, there are all kinds of relationships

104:15among complexity classes that can be studied.

104:18Just to mention one thing,

104:21I wrote a paper with Richard Lipton in 1979

104:26where we asked the following question.

104:30If you take a problem, a combinatorial problem in NP,

104:40let's say, and you choose,

104:45and you pick the size of the problem,

104:51say it's a traveling salesman problem, but of size 52.

104:58And you ask, could you get an efficient,

105:03a small Boolean circuit tailored for that size, 52,

105:09where you could feed the edges of the graph

105:12in as Boolean inputs and get as an output,

105:16the question of whether or not

105:17there's a tour of a certain length.

105:20And that would, in other words,

105:23briefly what you would say in that case

105:25is that the problem has small circuits,

105:28polynomial size circuits.

105:30Now we know that if P is equal to NP,

105:35then in fact, these problems will have small circuits,

105:39but what about the converse?

105:41Could a problem have small circuits,

105:43meaning that an algorithm tailored

105:45to any particular size could work well

105:48and yet not be a polynomial time algorithm?

105:52That is, you couldn't write it

105:53as a single uniform algorithm good for all sizes.

105:56- Just to clarify, small circuits

105:59for a problem of particular size

106:02or even further constraint,

106:03small circuit for a particular--

106:06- No, for all the inputs of that size.

106:09- Of that size.

106:10Is that a trivial problem for a particular instance?

106:13So coming up, an automated way of coming up with a circuit,

106:17I guess that's just--

106:18- That would be hard, yeah.

106:21But there's the existential question.

106:25Everybody talks nowadays about existential questions,

106:28existential challenges.

106:33You could ask the question,

106:38does the Hamiltonian circuit problem

106:43have a small circuit for every size?

106:48For each size, a different small circuit?

106:51In other words, could you tailor solutions

106:55depending on the size and get polynomial size?

107:00- Even if P is not equal to NP.

107:02- Right.

107:03- That would be fascinating if that's true.

107:08- Yeah, what we proved is that if that were possible,

107:13then something strange would happen in complexity theory.

107:18Some high-level class, which I could briefly describe,

107:23something strange would happen.

107:28So I'll take a stab at describing what I mean by that.

107:33- Let's go there.

107:33- So we have to define this hierarchy

107:37in which the first level of the hierarchy is P

107:41and the second level is NP.

107:44And what is NP?

107:45NP involves statements of the form,

107:48there exists a something such that something holds.

107:52So for example,

107:56there exists a coloring such that a graph can be colored

108:01with only that number of colors.

108:06Or there exists a Hamiltonian circuit.

108:09- There's a statement about this graph.

108:10- Yeah.

108:11And NP deals with statements of that kind,

108:22that there exists a solution.

108:24Now you could imagine a more complicated expression,

108:32which says for all X, there exists a Y

108:37such that some proposition holds involving both X and Y.

108:43So that would say, for example, in game theory,

108:50for all strategies for the first player,

108:55there exists a strategy for the second player

108:57such that the first player wins.

108:59That would be at the second level of the hierarchy.

109:03The third level would be, there exists an A

109:06such that for all B, there exists a C that something holds.

109:09And you can imagine going higher and higher in the hierarchy

109:12and you'd expect that the complexity classes

109:17that correspond to those different cases

109:22would get bigger and bigger.

109:25- What do you mean by bigger and bigger?

109:28- Sorry, they'd get harder and harder to solve.

109:31- Harder and harder, right.

109:32- Harder and harder to solve.

109:34And what Lyfton and I showed was that

109:38if NP had small circuits,

109:41then this hierarchy would collapse down to the second level.

109:45In other words, you wouldn't get any more mileage

109:48by complicating your expressions with three quantifiers

109:51or four quantifiers or any number.

109:53- I'm not sure what to make of that exactly.

109:57- Well, I think it would be evidence

109:59that NP doesn't have small circuits

110:03'cause something so bizarre would happen.

110:07But again, it's only evidence, not proof.

110:09- Well, yeah, that's not even evidence

110:12because you're saying P's not equal to NP

110:17because something bizarre has to happen.

110:19I mean, that's proof by the lack of bizarreness

110:25in our science, but it seems like

110:27just the very notion of P equals NP would be bizarre.

110:33So any way you arrive at, there's no way.

110:36You have to fight the dragon at some point.

110:38- Yeah, okay, well, anyway.

110:40For whatever it's worth, that's what we proved.

110:43- Awesome, so that's a potential space

110:47of open, interesting problems.

110:49Let me ask you about this other world

110:54of machine learning, of deep learning.

110:57What's your thoughts on the history

110:59and the current progress of machine learning field

111:02that's often progressed sort of separately

111:05as a space of ideas and space of people

111:08than the theoretical computer science

111:11or just even computer science world?

111:12- Yeah, it's really very different

111:15from the theoretical computer science world

111:17because the results about it,

111:22algorithmic performance tend to be empirical.

111:25It's more akin to the world of SAT solvers

111:28where we observe that for formulas arising in practice,

111:33the solver does well.

111:36So it's of that type.

111:37It's where we're moving into the empirical

111:42evaluation of algorithms.

111:45Now, it's clear that there've been huge successes

111:47in image processing, robotics,

111:52natural language processing, a little less so,

111:55but across the spectrum of game playing is another one.

112:00There've been great successes.

112:02And one of those effects is that it's not too hard

112:09to become a millionaire if you can get a reputation

112:11in machine learning and there'll be all kinds

112:13of companies that will be willing to offer you the moon

112:16because they think that if they have AI at their disposal,

112:21then they can solve all kinds of problems.

112:25But there are limitations.

112:30One is that the solutions that you get

112:38by from to supervise learning problems

112:46through convolutional neural networks

112:50seem to perform amazingly well,

112:56even for inputs that are outside the training set.

112:59But we don't have any theoretical understanding

113:06of why that's true.

113:07Secondly, the solutions, the networks that you get

113:14are very hard to understand.

113:16And so very little insight comes out.

113:18So yeah, yeah, they may seem to work on your training set

113:24and you may be able to discover whether your photos occur

113:29in a different sample of inputs or not,

113:34but we don't really know what's going on.

113:37We don't know the features that distinguish the photographs

113:41or the objects are not easy to characterize.

113:46- Well, it's interesting 'cause you mentioned

113:51coming up with a small circuit

113:53to solve a particular size problem.

113:56It seems that neural networks are kind of small circuits.

113:59- In a way, yeah.

114:01- But they're not programs.

114:02Sort of like the things you've designed are algorithms,

114:05programs, algorithms.

114:08Neural networks aren't able to develop algorithms

114:12to solve a problem.

114:13It's more of a function.

114:15- They are algorithms, it's just that they're--

114:18- But sort of, yeah, it could be a semantic question,

114:25but there's not a algorithmic style

114:30manipulation of the input.

114:32Perhaps you could argue there is.

114:35- Yeah, well--

114:37- It feels a lot more like a function of the input.

114:40- It's a function, it's a computable function.

114:43Once you have the network, you can simulate it

114:48on a given input and figure out the output.

114:51But if you're trying to recognize images,

114:56then you don't know what features of the image

115:00are really being determined by the input.

115:06Determinant of what the circuit is doing.

115:09The circuit is sort of very intricate,

115:13and it's not clear that the simple characteristics

115:18that you're looking for, the edges of the objects

115:23or whatever they may be, they're not emerging

115:27from the structure of the circuit.

115:29- Well, it's not clear to us humans,

§11Transcript · 1:55:31–2:06:52

115:31but it's clear to the circuit.

115:33- Yeah, well, right.

115:34I mean, it's not clear to sort of the elephant

115:39how the human brain works, but it's clear to us humans,

115:46we can explain to each other our reasoning,

115:49and that's why the cognitive science

115:50and psychology field exists.

115:52Maybe the whole thing of being explainable to humans

115:56is a little bit overrated.

115:57- Oh, maybe, yeah.

115:59I guess you can say the same thing about our brain,

116:02that when we perform acts of cognition,

116:06we have no idea how we do it, really.

116:07- That's true.

116:08- We do, though.

116:09I mean, we, at least for the visual system,

116:13the auditory system, and so on,

116:15we do get some understanding of the principles

116:19that they operate under, but for many deeper

116:23cognitive tasks, we don't have that.

116:25- That's right.

116:26Let me ask.

116:27- Yeah.

116:28- You've also been doing work on bioinformatics.

116:33Does it amaze you that the fundamental building blocks,

116:37so if we take a step back and look at us humans,

116:39the building blocks used by evolution

116:41to build us intelligent human beings

116:44is all contained there in our DNA?

116:47- It's amazing, and what's really amazing

116:51is that we are beginning to learn how to edit,

116:57how to edit DNA, which is very, very fascinating,

117:02this ability to take a sequence,

117:10find it in the genome, and do something to it.

117:18- I mean, that's really taking our biological system

117:21towards the worlds of algorithms.

117:24- Yeah, but it raises a lot of questions.

117:27You have to distinguish between doing it on an individual

117:33or doing it on somebody's germline,

117:35which means that all of their descendants will be affected.

117:38- So that's like an ethical...

117:42- Yeah, so it raises very severe ethical questions,

117:46and even doing it on individuals.

117:53Um, is, there's a lot of hubris involved

117:58that you can assume that knocking out a particular gene

118:04is going to be beneficial because you don't know

118:06what the side effects are going to be.

118:08So we have this wonderful new world of gene editing,

118:20which is very, very impressive,

118:23and it could be used in agriculture,

118:27it could be used in medicine in various ways,

118:31but very serious ethical problems arise.

118:35- What are, to you, the most interesting places

118:39where algorithms, sort of the ethical side,

118:44is an exceptionally challenging thing

118:46that I think we're going to have to tackle

118:48with all of genetic engineering.

118:51But on the algorithmic side,

118:53there's a lot of benefit that's possible.

118:55So is there areas where you see exciting possibilities

119:00for algorithms to help model,

119:02optimize, study biological systems?

119:05- Yeah, I mean, we can certainly analyze genomic data

119:11to figure out which genes are operative in the cell

119:17and under what conditions

119:18and which proteins affect one another,

119:21which proteins physically interact.

119:26We can sequence proteins and modify them.

119:30- Is there some aspect of that

119:33that's a computer science problem,

119:35or is that still fundamentally a biology problem?

119:39- Well, it's a big data,

119:41it's a statistical big data problem for sure.

119:45So, you know, the biological data sets

119:48are increasing our ability to study our ancestry,

119:53to study the tendencies towards disease,

119:59to personalize treatment according to what's in our genomes

120:04and what tendencies for disease we have,

120:09to be able to predict what troubles might come upon us

120:13in the future and anticipate them,

120:16to understand whether you,

120:21for a woman, whether her proclivity for breast cancer

120:29is so strong enough that she would want to take action

120:34to avoid it.

120:36- You dedicate your 1985 Turing Award lecture

120:41to the memory of your father.

120:42- Mm-hmm.

120:43- What's your fondest memory of your dad?

120:47- Seeing him standing in front of a class

120:56at the blackboard, drawing perfect circles by hand,

121:00and showing his ability to attract the interest

121:11of the motley collection of eighth grade students

121:14that he was teaching.

121:15- When did you get a chance to see him

121:21draw the perfect circles?

121:23- On rare occasions, I would get a chance

121:27to sneak into his classroom and observe it.

121:32And I think he was at his best in the classroom.

121:36I think he really came to life

121:40and had fun not only teaching,

121:43but engaging in chit-chat with the students

121:48and ingratiating himself with the students.

121:53And what I inherited from that

121:57is a great desire to be a teacher.

122:01I retired recently and a lot of my former students came,

122:08students with whom I had done research

122:11or who had read my papers or who had been in my classes.

122:14And when they talked about me,

122:19they talked not about my 1979 paper or my 1992 paper,

122:27but about what came away in my classes.

122:33And not just the details, but just the approach

122:36and the manner of teaching.

122:39And so I sort of take pride in the,

122:43at least in my early years as a faculty member at Berkeley,

122:47I was exemplary in preparing my lectures

122:51and I always came in prepared to the teeth

122:56and able therefore to deviate

122:58according to what happened in the class

123:01and to really provide a model

123:06for the students.

123:08- So is there advice you can give out

123:12for others on how to be a good teacher?

123:16So preparation is one thing you've mentioned,

123:19being exceptionally well prepared,

123:20but are there other things,

123:21pieces of advice that you can impart?

123:24- Well, the top three would be preparation,

123:26preparation, and preparation.

123:28(laughing)

123:29- Why is preparation so important, I guess?

123:31- It's because it gives you the ease

123:34to deal with any situation that comes up in the classroom.

123:38And if you discover that you're not getting through

123:43one way, you can do it another way.

123:45If the students have questions,

123:47you can handle the questions.

123:48- Ultimately, you're also feeling the crowd,

123:53the students of what they're struggling with,

123:57what they're picking up,

123:57just looking at them through the questions,

123:59but even just through their eyes.

124:01- Yeah, that's right.

124:02- So the preparation, you can dance.

124:05- You can dance, you can say it another way,

124:09give it another angle.

124:11- Are there, in particular, ideas and algorithms

124:14of computer science that you find

124:17were big aha moments for students,

124:19where they, for some reason, once they got it,

124:22it clicked for them and they fell in love

124:24with computer science?

124:26Or is it individual, is it different for everybody?

124:29- It's different for everybody.

124:30You have to work differently with students.

124:33Some of them just don't need much influence.

124:38They're just running with what they're doing

124:42and they just need an ear now and then.

124:44Others need a little prodding.

124:47Others need to be persuaded to collaborate

124:49among themselves rather than working alone.

124:52They have their personal ups and downs.

124:57So you have to deal with each student as a human being

125:02and bring out the best.

125:06- Humans are complicated.

125:08- Yeah.

125:09- Perhaps a silly question.

125:11If you could relive a moment in your life outside of family

125:15because it made you truly happy,

125:17or perhaps because it changed the direction of your life

125:19in a profound way, what moment would you pick?

125:24- I was kind of a lazy student as an undergraduate

125:28and even in my first year in graduate school.

125:32And I think it was when I started doing research.

125:37I had a couple of summer jobs where I was able to contribute

125:41and I had an idea.

125:45And then there was one particular course

125:47on mathematical methods and operations research

125:50where I just gobbled up the material

125:53and I scored 20 points higher than anybody else in the class

125:57then came to the attention of the faculty.

126:00And it made me realize that I had some ability

126:04that was going somewhere.

126:06- You realize you're pretty good at this thing.

126:11I don't think there's a better way to end it, Richard.

126:14It was a huge honor.

126:15Thank you for decades of incredible work.

126:18Thank you for talking to me.

126:19- Thank you, it's been a great pleasure.

126:21You're a superb interviewer.

126:23(laughing)

126:25- I'll stop it.

126:25Thanks for listening to this conversation with Richard Karp

126:29and thank you to our sponsors, Eight Sleep and Cash App.

126:34Please consider supporting this podcast

126:35by going to eightsleep.com/lex

126:39to check out their awesome mattress

126:41and downloading Cash App and using code LEXPODCAST.

126:46Click the links, buy the stuff, even just visiting the site

126:49but also considering the purchase helps them know

126:52that this podcast is worth supporting in the future.

§12Transcript · 2:06:55–2:07:26

126:55It really is the best way to support this journey I'm on.

126:59If you enjoy this thing, subscribe on YouTube,

127:02review it with Five Stars and Apple Podcast,

127:04support it on Patreon, connect with me on Twitter

127:07at Lex Friedman if you can figure out how to spell that.

127:11And now let me leave you with some words from Isaac Asimov.

127:16I do not fear computers.

127:18I fear lack of them.

127:19Thank you for listening and hope to see you next time.

127:23(upbeat music)

127:26(upbeat music)

— 读到这里,多懂一点。 —