Harvard Professor Explains Algorithms in 5 Levels of Difficulty | WIRED — Transcript
Full transcript
- 0:00hello world my name is David J Ma and
- 0:02I'm a professor of computer science at
- 0:04Harvard University today I've been asked
- 0:05to explain algorithms in five levels of
- 0:08increasing difficulty algorithms are
- 0:11important because they really are
- 0:12everywhere not only in the physical
- 0:14world but certainly in the virtual world
- 0:16as well and in fact what excites me
- 0:17about algorithms is that they really
- 0:19represent an opportunity to solve
- 0:21problems and I dare say no matter what
- 0:23you do in life all of us have problems
- 0:25to
- 0:27solve so I'm a computer science
- 0:29professor so I spend a lot of time with
- 0:31computerss how would you define a
- 0:32computer for them well a computer is
- 0:36electronic like a phone but it's um a
- 0:39rectangle and you like can type like
- 0:43tick tick tick and you work on it nice
- 0:46do you know any of the parts that are
- 0:48inside of a computer um no can I explain
- 0:52a couple of them to you yeah so like
- 0:53inside of every computer is some kind of
- 0:56brain and the technical term for that is
- 0:58CPU or Central processing unit and those
- 1:01are the pieces of Hardware that know how
- 1:04to respond to those instructions like
- 1:06moving up or down or left or right knows
- 1:09how to do math like addition and
- 1:11subtraction and then there's at least
- 1:12one other type of Hardware inside of a
- 1:15computer called memory or Ram if you've
- 1:17heard of this I know memory because you
- 1:19have to memorize stuff yeah exactly and
- 1:21computers have even different types of
- 1:23memory they have what's called Ram
- 1:25random access memory which is where your
- 1:27games where your programs are stored
- 1:29while they being used but then it also
- 1:31has a a hard drive or a solid state
- 1:33drive which is where your data your high
- 1:36scores your documents once you start
- 1:38writing essays and and stories in the
- 1:40future stays there stays permanently so
- 1:42even if the power goes out the computer
- 1:44can still remember that information it's
- 1:46still there because the computer can't
- 1:49just like delete all the words itself
- 1:53because your fingers can only do that
- 1:55like you have to use your finger to
- 1:58delete all the stuff exactly have you
- 2:00heard of an algorithm before um yes
- 2:02algorithm is a list of instructions to
- 2:06tell people what to do or like a robot
- 2:09what to do yeah exactly it's so it's
- 2:11just stepbystep instructions for doing
- 2:14something for solving a problem for yeah
- 2:16so like if you have a bedtime routine
- 2:18then first you say I get dressed I brush
- 2:22my teeth I read a little story and then
- 2:25I go to bed all right well how about
- 2:27another algorithm like um what do you
- 2:28tend to eat for for lunch any types of
- 2:30sandwiches you like uh I eat peanut
- 2:32butter and let me get some supplies from
- 2:34the cupboard here so should we make an
- 2:36algorithm together for why don't we do
- 2:39it this way why don't we pretend like
- 2:40I'm a computer or maybe I'm a robot so I
- 2:42only understand your instructions and so
- 2:45I want you to feed me no pun intended an
- 2:47algorithm so step-by-step instructions
- 2:49for solving this problem but remember
- 2:52algorithms you have to be precise you
- 2:54have to give the right instructions the
- 2:57right instructions just do it for me
- 2:59soep step one was what open the bag okay
- 3:02opening the bag of bread stop now grab
- 3:06the bread and put it on the plate grab
- 3:07the bread and put it on the
- 3:10plate take all the bread back and put it
- 3:13back in there so that's like an undo
- 3:15command little control Z okay take one
- 3:19bread and put it on the plate take the
- 3:21lid off the peanut butter okay take the
- 3:23lid off the peanut butter put the lid
- 3:26down okay take the knife take the knife
- 3:29put the blade inside the peanut butter
- 3:32and spread the peanut butter on the
- 3:34bread I'm going to take out some peanut
- 3:36butter and I'm going to spread the
- 3:38peanut butter on the bread I put a lot
- 3:41of peanut butter on because I love
- 3:42peanut butter apparently I thought I was
- 3:44messing with you here but I think you're
- 3:46happy with this Put The Knife down and
- 3:49then grab one bread and put it on top of
- 3:52the second bread
- 3:53sideways
- 3:56sideways like put it flat on oh flat
- 3:59ways okay and now done you're done with
- 4:01your sandwich should we take a delicious
- 4:03bite yep let's take a bite okay here we
- 4:07go what would be the next step be you
- 4:09here clean all this mess up clean all
- 4:12this mess up right we made an algorithm
- 4:15step-by-step instructions for solving
- 4:17some problem and if you think about now
- 4:18how we made peanut butter and jelly
- 4:20sandwiches sometimes we were imprecise
- 4:22you didn't give me quite enough
- 4:24information to do the algorithm
- 4:25correctly and that's why I took out so
- 4:26much bread Precision being very very
- 4:30correct with your instructions is so
- 4:32important in the real world because for
- 4:33instance when you're using the worldwide
- 4:35web and you're searching for something
- 4:36on Google or being you want to do the
- 4:39right thing so like if you type in just
- 4:42Google then you won't find the answer to
- 4:45your question pretty much everything we
- 4:47do in life is an algorithm even if we
- 4:49don't use that fancy word to describe it
- 4:51because you and I are sort of following
- 4:53instructions either that we came up with
- 4:55ourselves or maybe our parents told us
- 4:57how to do these things and so those are
- 4:59just algorithms but when you start using
- 5:01algorithms in uh computers that's when
- 5:03you start writing
- 5:08code what do you know about algorithms
- 5:11nothing really um at all honestly I
- 5:13think it's just probably a way to store
- 5:15information um in computers and I dare
- 5:17say even though you might not have put
- 5:19this word on it odds are you executed as
- 5:21a human multiple algorithms today even
- 5:25before you came here today like what
- 5:26were a few things that you did I got
- 5:28ready okay and get ready what does that
- 5:30mean brushing my teeth brushing my hair
- 5:32okay put getting dressed okay so all of
- 5:34those frankly if we really um Dove more
- 5:37deeply could be broken down into
- 5:39stepbystep instructions and presumably
- 5:41your mom your dad someone in the past
- 5:44sort of programmed you as a human to
- 5:46know what to do and then after that as a
- 5:48smart human you can sort of take it from
- 5:49there and you don't need their help
- 5:50anymore but that's kind of what we're
- 5:51doing when we program computer something
- 5:54maybe even more familiar nowadays like
- 5:55odds are you have a cell phone your
- 5:57contacts or your dress book but let me
- 5:59ask you why that is like why does Apple
- 6:02or Google or anyone else bother
- 6:03alphabetizing your contacts I just
- 6:05assumed it would be easier to navigate
- 6:07what if your friend happened to be at
- 6:10the very bottom of this randomly
- 6:11organized list like why is that a
- 6:13problem like he or she is still there I
- 6:15guess it would take a while to get to
- 6:16while you're scrolling that in of itself
- 6:17is kind of a problem or it's an
- 6:19inefficient solution to the problem so
- 6:21it turns out that back in my day before
- 6:22there were cell phones like everyone's
- 6:24numbers from high schools like were
- 6:26literally printed in a book and everyone
- 6:27in my town and my city my state was
- 6:29printed in an actual phone book even if
- 6:31you've never seen this technology before
- 6:33how would you propose verbally to find
- 6:35John in this phone book or I would just
- 6:37flip through and just look for the J I
- 6:39guess yeah so let me propose that we
- 6:40start that way I could just start at the
- 6:42beginning and step by step I could just
- 6:44look at each page looking for John
- 6:47looking for John now even if you've
- 6:49never seen this here technology before
- 6:51it turns out this is exactly what your
- 6:52phone could be doing in software like
- 6:55someone from Google or Apple or the like
- 6:57they could write software that uses a
- 6:59technique in programming known as a loop
- 7:01and a loop as the word implies is just
- 7:02sort of do something again and again
- 7:04what if instead of starting from the
- 7:05beginning and going one page at a time
- 7:07what if I or what if your phone goes
- 7:09like two pages or two names at a time
- 7:11would this be correct do you think well
- 7:13you could skip over John I think in what
- 7:15sense if he's in one of the middle pages
- 7:17that you skipped over yeah so sort of
- 7:19accidentally and frankly with like 50/50
- 7:21probability John could get sandwiched in
- 7:22between two pages but does that mean I
- 7:24have to throw that algorithm out alt
- 7:27together maybe you could use that
- 7:28strategy until you get close to the
- 7:30section and then switch to going one by
- 7:31one okay that's nice so you could kind
- 7:33of like go twice as fast but then kind
- 7:35of pump the brakes as you near your exit
- 7:37on the highway or in this case near the
- 7:38J section of the book exactly and maybe
- 7:41alternatively if I get to like a b c d e
- 7:43f g h i j k if I get to the K section
- 7:46then I could just double back like one
- 7:48page just to make sure John didn't get
- 7:50sandwiched between those pages so the
- 7:51nice thing about that second algorithm
- 7:53is that I'm flying through the phone
- 7:54book like two pages at a time so 2 4 6 8
- 7:5710 12 it's not perfect it's not
- 7:59necessarily correct but it is if I just
- 8:00take like one extra step so I think it's
- 8:02fixable but what your phone is probably
- 8:04doing and frankly what I and like my
- 8:06parents and grandparents used to do back
- 8:08in the day is we'd probably go roughly
- 8:09to the middle of the phone book here and
- 8:11just intuitively if this is an
- 8:13alphabetized phone book in English what
- 8:15section am I probably going to find
- 8:16myself in roughly K okay so I'm in the K
- 8:19section is John going to be to the left
- 8:21or to the right to the left yeah so John
- 8:23is going to be to the left to the right
- 8:24and what we can do here though your
- 8:25phone does something smarter is tear the
- 8:27problem in half throw half of the
- 8:29problem away being left with just 500
- 8:32pages now but what might I next do I
- 8:34could sort of naively just start at the
- 8:36beginning again but we've learned to do
- 8:37better I can go roughly to the middle
- 8:39here do it again yeah exactly so now
- 8:41maybe I'm in the E section which is a
- 8:43little to the left so John is clearly
- 8:46going to be to the right so I can again
- 8:48tear the problem portly in half throw
- 8:51this half of the problem away and I
- 8:53claim now that if we started with a
- 8:55th000 Pages now we've gone to 500 250
- 8:57now we're really moving quick
- 9:07not on that page and I can call him
- 9:09roughly how many steps might this third
- 9:11algorithm take if I started with a th000
- 9:13Pages then went to 500 250 125 like how
- 9:17many times can you divide 1,000 and half
- 9:20maybe 10 that's roughly 10 because in
- 9:23the first algorithm looking again for
- 9:24someone like Zoe in the worst case might
- 9:26have to go all the way through thousand
- 9:28pages but the second algorithm you said
- 9:29was 500 maybe 500 in1 essentially the
- 9:32same thing so twice as fast but this
- 9:34third and final algorithm is sort of
- 9:36fundamentally faster because you're
- 9:38you're sort of dividing and conquering
- 9:40it in half and half and half not just
- 9:42taking one or two bites out of it at of
- 9:44a time so this of course is not how we
- 9:46used to use phone books back in the day
- 9:47since otherwise they'd be single use
- 9:49only but it is how your phone is
- 9:51actually searching for zoy for John for
- 9:53anyone else but it's doing it in
- 9:55software oh that's cool so here we've
- 9:57happened to focus on searching
- 9:58algorithms looking for John in the phone
- 10:00book but the technique we just used can
- 10:02indeed be called divide and conquer
- 10:03where you take a big problem and you
- 10:05divide and conquer that is you try to
- 10:07chop it up into smaller smaller smaller
- 10:09pieces a more sophisticated type of
- 10:11algorithm at least depending on how you
- 10:12implement it something known as a
- 10:14recursive algorithm recursive algorithm
- 10:16is essentially an algorithm that uses
- 10:19itself to solve the exact same problem
- 10:21again and again but chops it smaller and
- 10:24smaller and smaller
- 10:26[Music]
- 10:28ultimately hi my name is Patricia
- 10:30Patricia nice to meet you where are you
- 10:31a student at I'm starting my senior year
- 10:33now at NYU oh nice and what have you
- 10:35been studying the past few years I study
- 10:37computer science and data science if you
- 10:38were chatting with a non-cs nonata
- 10:40science friend of yours like how would
- 10:41you explain to them what an algorithm is
- 10:44some kind of like systematic way of like
- 10:46solving a problem or like a set of like
- 10:49steps to kind of solve a certain like
- 10:51problem you have so you probably recall
- 10:53learning topics like binary search
- 10:55versus linear search and the like so
- 10:57I've come here uh complete with a actual
- 10:59chalkboard with some magnetic numbers on
- 11:01it here like how would you tell a friend
- 11:03to sort these I think one of the first
- 11:06things we learned was something called
- 11:07bubble sort it was kind of like focusing
- 11:10on like smaller like bubbles I guess I
- 11:12would say it like of the problem like
- 11:14looking at like smaller segments rather
- 11:16than like the whole thing at once what
- 11:17is I think very true about what you're
- 11:19hinting at is that bubble sort really
- 11:21focuses on like local small problems
- 11:25rather than taking a step back trying to
- 11:26fix the whole thing let's just fix the
- 11:28obvious problem in front of us so for
- 11:29instance when we're trying to get from
- 11:31smallest to largest and the first two
- 11:32things we see are eight followed by one
- 11:35this looks like a problem cuz it's out
- 11:36of order so what would be the simplest
- 11:38fix the least amount of work we can do
- 11:40to at least fix one problem just like
- 11:41switch those two numbers cuz one is
- 11:43obviously smaller than eight perfect so
- 11:45we just swap those two then you would
- 11:47switch those again yeah so that further
- 11:50improves the situation and you can kind
- 11:51of see it that the one and the two are
- 11:53now in place how about 8 and six switch
- 11:55it again switch those again 8 and three
- 11:57switch it again
- 12:00and conversely now the one and the two
- 12:02are closer to and coincidentally are
- 12:04exactly where we want them to be so are
- 12:07we done no okay so obviously not but
- 12:10what could we do now to further improve
- 12:14the situation go through it again but
- 12:16like you don't need to check the last
- 12:18one anymore because we know like that
- 12:20number is bubbled up to the top Yeah
- 12:22because it has indeed bubbled all the
- 12:23way to the top so one and two yeah keep
- 12:26it as is okay two and six keep it as is
- 12:28okay six and three then you switch it
- 12:30okay we switch or swap those six and
- 12:31four swap it again okay so four and uh
- 12:34six and seven uh keep it okay seven and
- 12:36five swap it okay and then I think per
- 12:39your point we're pretty darn close let's
- 12:41go through once more one and two Keep It
- 12:452 three keep it 3 four keep it 4 six
- 12:48keep it 6 five and then switch it all
- 12:49right we'll switch this and now to your
- 12:51point we don't need to bother with the
- 12:52ones that already bubbled their way up
- 12:54now we're 100% sure it's sorted yeah and
- 12:57certainly the search engines of the
- 12:58world Google and Bing and so forth they
- 13:00probably don't keep web pages in sorted
- 13:02order because that would be a crazy long
- 13:04list when you're just trying to search
- 13:05the data but there's probably some
- 13:07algorithm underlying what they do and
- 13:08they probably similarly just like we do
- 13:11a bit of work upfront to get things
- 13:13organized even if it's not strictly
- 13:15sorted in the same way so that people
- 13:16like you and me and others can find that
- 13:19same information so how about social
- 13:21media can you Invision where the
- 13:23algorithms are in that world like maybe
- 13:25for example like Tik Tok like the for
- 13:27you page it's kind of like
- 13:29cuz those are like Rec like
- 13:30recommendations right it's like sort of
- 13:32like Netflix recommendations except more
- 13:34constant because it's just like every
- 13:36video you scroll it's like that's a new
- 13:38recommendation basically and it's like
- 13:39based on like what you've liked
- 13:40previously what you've like saved
- 13:42previously what you search up so I would
- 13:44assume there's some kind of algorithm
- 13:45there kind of figuring out like what to
- 13:47put on your foru page absolutely just
- 13:49trying to keep you presumably more
- 13:50engaged so the better the algorithm is
- 13:52the better your engagement is maybe the
- 13:54more money the company then makes on the
- 13:56platform and so forth so it all sort of
- 13:58feeds together together but what you're
- 13:59describing really is more artificially
- 14:01intelligent if I may because presumably
- 14:04there's not someone at Tik Tok or any of
- 14:05these social media companies saying if
- 14:07Patricia likes this post then show her
- 14:10this post if she likes this post then
- 14:12show her this other post because the
- 14:13code would sort of grow infinitely long
- 14:15and there's just way too much content
- 14:17for a programmer to be having those
- 14:19kinds of conditionals those those
- 14:21decisions being made behind the scenes
- 14:24so it's probably a little more
- 14:25artificially intelligent and in that
- 14:27sense You have topics like neuron
- 14:28networks and uh machine learning which
- 14:30really describe taking as input things
- 14:33like what you watch what you click on
- 14:34what your friends watch what they click
- 14:35on and sort of trying to infer from that
- 14:38instead what should we show Patricia or
- 14:40her friends next okay yeah yeah that
- 14:42makes like the distinction more makes
- 14:44more sense now
- 14:48yeah I am currently a fourth year PhD
- 14:51student at NYU I do robot learning so
- 14:54that's half and half Robotics and
- 14:55Mission learning sounds like you've
- 14:57dabbled with quite a few algorith so how
- 14:59does one actually research algorithms or
- 15:01invent algorithms the most important was
- 15:03just trying to think about
- 15:04inefficiencies and also think about
- 15:06Connecting Threads the way I think about
- 15:08it is that algorithm for me is not just
- 15:11about the way of doing something but
- 15:12it's about doing something efficiently
- 15:14learning algorithms are practically
- 15:16everywhere now CU Google I would say for
- 15:18example is learning every day about like
- 15:21oh what what articles with links might
- 15:23be better than others and reranking them
- 15:26um there are recommender systems all
- 15:28around us
- 15:29right like content feeds and social
- 15:31media or you know like YouTube or
- 15:33Netflix what we see is in a large part
- 15:36determined by this kind of learning
- 15:38algorithms nowadays there's a lot of
- 15:40concerns around some applications of
- 15:42machine learning and like deep fakes
- 15:44where it can kind of learn how I talk
- 15:46and learn how you talk and even how we
- 15:48look and generate videos of us we're
- 15:50doing this for real but you could
- 15:51imagine a computer synthesizing this
- 15:53conversation eventually but how does it
- 15:55even know what I sound like and what I
- 15:57look like and how to replicate that all
- 15:59of this learning algorithms that we talk
- 16:01about right uh a lot like what goes in
- 16:04there is just lots and lots of data so
- 16:06data goes in something else comes out
- 16:08what comes out is whatever objective
- 16:10function that you optimize for like
- 16:11where is the line between algorithms
- 16:13that like play games with and without AI
- 16:17I think when I started off my undergrad
- 16:19the current AI machine learning was not
- 16:23very much synonymous okay and even in my
- 16:25undergraduate in the AI class they
- 16:27learned a lot of classical gorithms for
- 16:29game plays like for example the AAR
- 16:31search right that's a very simple
- 16:33example of how you can play a game
- 16:35without having anything learned this is
- 16:38very much oh you are at a game State you
- 16:40just search down see what are the
- 16:42possibilities and then you pick the best
- 16:45possibility that it can see versus what
- 16:47you think about when you think about I
- 16:49gameplay like the alpha zero for example
- 16:53or Alpha star or there are a lot of you
- 16:55know like fancy new machine learning
- 16:57agents that are you know even like
- 16:59learning very difficult games like go
- 17:01and those are learned agents as in they
- 17:04are getting better as they play more and
- 17:06more games and as they get more games
- 17:09they kind of refine their strategy based
- 17:11on the data that they seen and once
- 17:13again this high level abstraction is
- 17:15still the same you see a lot of data and
- 17:17you learn from that right but the
- 17:19question is what is objective function
- 17:21that you're optimizing for is it winning
- 17:23this game is it forcing a tie or is it
- 17:25you know like opening a door in a
- 17:27kitchen so if the world is very much
- 17:28focused on supervised unsupervised
- 17:31reinforcement learning now like what
- 17:32comes next 5 10 years where's the world
- 17:34going I think that this is just U going
- 17:37to be more and more I don't want to use
- 17:40the word encroachment but that's what it
- 17:42feels like of algorithms into our
- 17:43everyday life like even when I was
- 17:45taking the train here right the trains
- 17:47are being routed with algorithms but
- 17:48this has existed for you know like 50
- 17:51years probably but as I was coming here
- 17:53as I was checking my phone those are
- 17:55different algorithms and you know
- 17:57they're they're kind of getting all
- 17:59around us getting they're with us all
- 18:01the time they're making our life better
- 18:03most places most cases and I think
- 18:06that's just going to be continuation of
- 18:07all of those and it feels like they're
- 18:08even in places you wouldn't expect and
- 18:10there's just so much data about you and
- 18:12me and everyone else online and this
- 18:13data is being mind and analyzed and
- 18:15influencing things we see and here it
- 18:17would seem so there is sort of a
- 18:19Counterpoint which might be good for the
- 18:20marketers but not necessarily good for
- 18:22you and me as individuals you know like
- 18:24we're human beings but for someone we
- 18:26might be just a pair of eyes who are you
- 18:29know carrying a wallet and are there to
- 18:31buy things but there is so much more
- 18:33potential for this algorithms to just
- 18:35make our life better without you know
- 18:38like changing much about our
- 18:42life I'm Chris Wiggins from associate
- 18:44professor of Applied Mathematics at
- 18:45Columbia I'm also the chief data
- 18:47scientist of the New York Times the data
- 18:48science team at the New York Times
- 18:50develops and deploys machine learning
- 18:51for Newsroom and business problems but I
- 18:53would say the things that we do mostly
- 18:55you don't see but it might be things
- 18:56like personalization algorithm are
- 18:58recommending different content and do
- 19:00data scientists which is rather distinct
- 19:02from the phrase computer scientist do
- 19:04data scientists still think in terms of
- 19:06algorithms as driving a lot of it oh
- 19:08absolutely yeah in fact so in data
- 19:10science and Academia often the role of
- 19:12the algorithm is the optimization
- 19:14algorithm that helps you find the best
- 19:16model or the best description of a data
- 19:17set okay in data science and industry
- 19:20the goal often it's centered around an
- 19:22algorithm which becomes a data product
- 19:24right so a data scientist in Industry
- 19:26might be developing and deploying the
- 19:28algorithm which means not only
- 19:30understanding the algorithm and its
- 19:31statistical performance but also all of
- 19:33the software engineering around systems
- 19:35integration making sure that that
- 19:37algorithm receives input that's reliable
- 19:40and has output that's useful as well as
- 19:42I would say the organizational
- 19:43integration which is how does a
- 19:45community of people like the set of
- 19:46people working at the New York Times
- 19:48integrate that algorithm into their
- 19:49process interesting and I feel like AI
- 19:51based startups are all their R and
- 19:53certainly within Academia are there
- 19:54connections between Ai and the world of
- 19:56data science absolutely the algorithms
- 19:58that there in can you connect those dots
- 19:59for you're right that AI as a field has
- 20:01really exploded I would say particularly
- 20:03many people experienced a chatbot that
- 20:05was really really good today when people
- 20:06say I AI they're often thinking about
- 20:09large language models or they're
- 20:11thinking about generative AI or they
- 20:12might be thinking about a chatbot one
- 20:14thing to keep in mind is a chatbot is a
- 20:16special case of generative AI which is a
- 20:18special case of using large language
- 20:20models which is a special case of using
- 20:22machine learning generally which is what
- 20:24most people mean by AI you may have
- 20:26moments that are um what John kthy
- 20:28called look M No Hands results where you
- 20:30do some fantastic trick and you're not
- 20:32quite sure how it worked I think it's
- 20:33still very much early days large
- 20:35language models is still in the point of
- 20:37what might be called alchemy that people
- 20:39are building large language models
- 20:40without a real clear a priori sense of
- 20:42what the right design is for a right
- 20:44problem many people are trying different
- 20:46things out often in large companies
- 20:47where they can afford to have many
- 20:48people trying things out seeing what
- 20:50works publishing that instantiating it
- 20:52as a product and that itself is part of
- 20:54the scientific process I would think too
- 20:56yeah very much well science and
- 20:57engineering because often you're
- 20:59building a thing and the thing does
- 21:01something amazing to large extent we are
- 21:03still looking for basic theoretical
- 21:05results around why deep neural networks
- 21:08generally work why are they able to
- 21:10learn so well they're huge billions of
- 21:12parameter models and it's difficult for
- 21:14us to interpret how they are able to do
- 21:16what they do and is this a good thing do
- 21:18you think or an inevitable thing that we
- 21:20the programmers we the computer
- 21:21scientist the data science who are
- 21:23inventing these things can't actually
- 21:25explain how they work because I feel
- 21:27like friends of mine industry even when
- 21:29it's something simple and relatively
- 21:30familiar like autocomplete they can't
- 21:32actually tell me like why that name is
- 21:34appearing at the top of the list whereas
- 21:36years ago when these algorithms were
- 21:38more deterministic and more procedural
- 21:40you could even point to the line that
- 21:42made that name bubble up to the top so
- 21:44is this a good thing a bad thing that
- 21:45we're sort of losing control perhaps in
- 21:47some sense of the algorithm it has risks
- 21:49I don't know that I would say that it's
- 21:50good or bad but I would say there's lots
- 21:52of scientific precedent there are times
- 21:53when an algorithm works really well and
- 21:55we have finite understanding of why it
- 21:57works or a model works really well and
- 22:00sometimes we have very little
- 22:01understanding of why it works the way it
- 22:02does in classes I teach certainly spend
- 22:04a lot of time on fundamentals algorithms
- 22:06that have been taught in classes for
- 22:08decades now whether it's binary search
- 22:09linear search bubble swort selection
- 22:11sort or the like but are if we're
- 22:14already at the point where I can pull up
- 22:15chat GPT copy paste a whole bunch of
- 22:17numbers or words and say sort these for
- 22:20me does it really matter how chat GPT is
- 22:23sorting it does it really matter to me
- 22:25as the user how the software is sorting
- 22:27it like do the fundamentals become more
- 22:29dated and less important do you think
- 22:31now you're talking about the ways in
- 22:32which code and computation is a special
- 22:35case of Technology right so for driving
- 22:38a car you may not necessarily need to
- 22:39know much about organic chemistry even
- 22:41if if the organic chemistry is how the
- 22:44car works right so you can drive the car
- 22:46and use it in different ways without
- 22:48understanding much about the
- 22:49fundamentals so similarly with
- 22:50computation we're at a point where the
- 22:52computation is so high level right as
- 22:54you you know you can import pyit learn
- 22:56and you can go from zero to machine
- 22:57learning and 30 seconds it's depending
- 22:58on what level you want to understand the
- 23:00technology where in the stack so to
- 23:02speak um it's possible to understand it
- 23:05and make wonderful things and Advance
- 23:06the world without understanding it at
- 23:08the particular level of somebody who
- 23:10actually might have originally designed
- 23:11the actual optimization algorithm I
- 23:13should say though for many of the
- 23:14optimization algorithms there are cases
- 23:16where an algorithm works really well and
- 23:18we publish a paper and there's a proof
- 23:20in the paper and then years later people
- 23:22realize actually that prove was wrong
- 23:23and we're really still not sure why that
- 23:24optimization works but it works really
- 23:26well or it inspires people to make new
- 23:28optimization algorithms so I I do think
- 23:32that the the goal of understanding
- 23:34algorithms is Loosely coupled to our
- 23:36progress in advancing grade algorithms
- 23:38but they don't always necessarily have
- 23:39to require each other and for those
- 23:41students especially or even adults who
- 23:43are thinking of now steering into
- 23:45computer science into programming who
- 23:47were really jazzed about heading in that
- 23:49direction up until for instance November
- 23:50of 2022 when all of a sudden for many
- 23:53people it looked like the world was now
- 23:54changing and now maybe this isn't such a
- 23:57promising path this isn't such a
- 23:58lucrative path anymore are llms are
- 24:01tools like chat GPT reason not to
- 24:03perhaps steer into the field large
- 24:05language models are a particular
- 24:06architecture for predicting let's say
- 24:08the next word or a set of tokens more
- 24:10generally the algorithm comes in when
- 24:12you think about how is that llm to be
- 24:15trained or also how to be fine-tuned so
- 24:19the P of GPT is a pre-trained algorithm
- 24:22the idea is that you train a large
- 24:24language model on some Corpus of text
- 24:27could be encyclopedias or textbooks or
- 24:30what have you and then you might want to
- 24:32fine-tune that model around some
- 24:35particular task or some particular
- 24:37subset of texts so both of those are
- 24:39examples of training algorithms so I
- 24:42would say people's perception of
- 24:43artificial intelligence has really
- 24:45changed a lot in the last 6 months
- 24:47particularly around November of 2022
- 24:51when people experienced a really good
- 24:52chatbot the technology though had been
- 24:54around already before academics had
- 24:56already been working with chat gpt3
- 24:58before that and GPT 2 and gpt1 and and
- 25:01for many people it sort of opened up
- 25:03this conversation about what is
- 25:04artificial intelligence and what could
- 25:05we do with this and what are the
- 25:07possible good and bad right like any
- 25:08other piece of technology cransberg
- 25:10first law of technology technology is
- 25:12neither good nor bad nor is it neutral
- 25:14every time we have some new technology
- 25:15we should think about its capabilities
- 25:17and the good and the possible bad as
- 25:20with any area of study algorithms offer
- 25:22a spectrum from the most basic to the
- 25:24most advanced and even if right now the
- 25:26most advanced of the those algorithms
- 25:28feels Out Of Reach because you just
- 25:29don't have that background with each
- 25:31lesson you learn with each algorithm you
- 25:33study that endgame becomes closer and
- 25:36closer such that it will before long be
- 25:38accessible to you and you will be at the
- 25:40end of that most advanced
- 25:42[Music]
- 25:45Spectrum
About this transcript
This page contains the full transcript of Harvard Professor Explains Algorithms in 5 Levels of Difficulty | WIRED by WIRED, generated from the public captions YouTube serves with the video. The transcript has 5,390 words across 757 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.