YouTube2Text

Harvard Professor Explains Algorithms in 5 Levels of Difficulty | WIRED — Transcript

by WIRED · 5,390 words · 757 segments · language en · Watch on YouTube

Full transcript

  1. 0:00hello world my name is David J Ma and
  2. 0:02I'm a professor of computer science at
  3. 0:04Harvard University today I've been asked
  4. 0:05to explain algorithms in five levels of
  5. 0:08increasing difficulty algorithms are
  6. 0:11important because they really are
  7. 0:12everywhere not only in the physical
  8. 0:14world but certainly in the virtual world
  9. 0:16as well and in fact what excites me
  10. 0:17about algorithms is that they really
  11. 0:19represent an opportunity to solve
  12. 0:21problems and I dare say no matter what
  13. 0:23you do in life all of us have problems
  14. 0:25to
  15. 0:27solve so I'm a computer science
  16. 0:29professor so I spend a lot of time with
  17. 0:31computerss how would you define a
  18. 0:32computer for them well a computer is
  19. 0:36electronic like a phone but it's um a
  20. 0:39rectangle and you like can type like
  21. 0:43tick tick tick and you work on it nice
  22. 0:46do you know any of the parts that are
  23. 0:48inside of a computer um no can I explain
  24. 0:52a couple of them to you yeah so like
  25. 0:53inside of every computer is some kind of
  26. 0:56brain and the technical term for that is
  27. 0:58CPU or Central processing unit and those
  28. 1:01are the pieces of Hardware that know how
  29. 1:04to respond to those instructions like
  30. 1:06moving up or down or left or right knows
  31. 1:09how to do math like addition and
  32. 1:11subtraction and then there's at least
  33. 1:12one other type of Hardware inside of a
  34. 1:15computer called memory or Ram if you've
  35. 1:17heard of this I know memory because you
  36. 1:19have to memorize stuff yeah exactly and
  37. 1:21computers have even different types of
  38. 1:23memory they have what's called Ram
  39. 1:25random access memory which is where your
  40. 1:27games where your programs are stored
  41. 1:29while they being used but then it also
  42. 1:31has a a hard drive or a solid state
  43. 1:33drive which is where your data your high
  44. 1:36scores your documents once you start
  45. 1:38writing essays and and stories in the
  46. 1:40future stays there stays permanently so
  47. 1:42even if the power goes out the computer
  48. 1:44can still remember that information it's
  49. 1:46still there because the computer can't
  50. 1:49just like delete all the words itself
  51. 1:53because your fingers can only do that
  52. 1:55like you have to use your finger to
  53. 1:58delete all the stuff exactly have you
  54. 2:00heard of an algorithm before um yes
  55. 2:02algorithm is a list of instructions to
  56. 2:06tell people what to do or like a robot
  57. 2:09what to do yeah exactly it's so it's
  58. 2:11just stepbystep instructions for doing
  59. 2:14something for solving a problem for yeah
  60. 2:16so like if you have a bedtime routine
  61. 2:18then first you say I get dressed I brush
  62. 2:22my teeth I read a little story and then
  63. 2:25I go to bed all right well how about
  64. 2:27another algorithm like um what do you
  65. 2:28tend to eat for for lunch any types of
  66. 2:30sandwiches you like uh I eat peanut
  67. 2:32butter and let me get some supplies from
  68. 2:34the cupboard here so should we make an
  69. 2:36algorithm together for why don't we do
  70. 2:39it this way why don't we pretend like
  71. 2:40I'm a computer or maybe I'm a robot so I
  72. 2:42only understand your instructions and so
  73. 2:45I want you to feed me no pun intended an
  74. 2:47algorithm so step-by-step instructions
  75. 2:49for solving this problem but remember
  76. 2:52algorithms you have to be precise you
  77. 2:54have to give the right instructions the
  78. 2:57right instructions just do it for me
  79. 2:59soep step one was what open the bag okay
  80. 3:02opening the bag of bread stop now grab
  81. 3:06the bread and put it on the plate grab
  82. 3:07the bread and put it on the
  83. 3:10plate take all the bread back and put it
  84. 3:13back in there so that's like an undo
  85. 3:15command little control Z okay take one
  86. 3:19bread and put it on the plate take the
  87. 3:21lid off the peanut butter okay take the
  88. 3:23lid off the peanut butter put the lid
  89. 3:26down okay take the knife take the knife
  90. 3:29put the blade inside the peanut butter
  91. 3:32and spread the peanut butter on the
  92. 3:34bread I'm going to take out some peanut
  93. 3:36butter and I'm going to spread the
  94. 3:38peanut butter on the bread I put a lot
  95. 3:41of peanut butter on because I love
  96. 3:42peanut butter apparently I thought I was
  97. 3:44messing with you here but I think you're
  98. 3:46happy with this Put The Knife down and
  99. 3:49then grab one bread and put it on top of
  100. 3:52the second bread
  101. 3:53sideways
  102. 3:56sideways like put it flat on oh flat
  103. 3:59ways okay and now done you're done with
  104. 4:01your sandwich should we take a delicious
  105. 4:03bite yep let's take a bite okay here we
  106. 4:07go what would be the next step be you
  107. 4:09here clean all this mess up clean all
  108. 4:12this mess up right we made an algorithm
  109. 4:15step-by-step instructions for solving
  110. 4:17some problem and if you think about now
  111. 4:18how we made peanut butter and jelly
  112. 4:20sandwiches sometimes we were imprecise
  113. 4:22you didn't give me quite enough
  114. 4:24information to do the algorithm
  115. 4:25correctly and that's why I took out so
  116. 4:26much bread Precision being very very
  117. 4:30correct with your instructions is so
  118. 4:32important in the real world because for
  119. 4:33instance when you're using the worldwide
  120. 4:35web and you're searching for something
  121. 4:36on Google or being you want to do the
  122. 4:39right thing so like if you type in just
  123. 4:42Google then you won't find the answer to
  124. 4:45your question pretty much everything we
  125. 4:47do in life is an algorithm even if we
  126. 4:49don't use that fancy word to describe it
  127. 4:51because you and I are sort of following
  128. 4:53instructions either that we came up with
  129. 4:55ourselves or maybe our parents told us
  130. 4:57how to do these things and so those are
  131. 4:59just algorithms but when you start using
  132. 5:01algorithms in uh computers that's when
  133. 5:03you start writing
  134. 5:08code what do you know about algorithms
  135. 5:11nothing really um at all honestly I
  136. 5:13think it's just probably a way to store
  137. 5:15information um in computers and I dare
  138. 5:17say even though you might not have put
  139. 5:19this word on it odds are you executed as
  140. 5:21a human multiple algorithms today even
  141. 5:25before you came here today like what
  142. 5:26were a few things that you did I got
  143. 5:28ready okay and get ready what does that
  144. 5:30mean brushing my teeth brushing my hair
  145. 5:32okay put getting dressed okay so all of
  146. 5:34those frankly if we really um Dove more
  147. 5:37deeply could be broken down into
  148. 5:39stepbystep instructions and presumably
  149. 5:41your mom your dad someone in the past
  150. 5:44sort of programmed you as a human to
  151. 5:46know what to do and then after that as a
  152. 5:48smart human you can sort of take it from
  153. 5:49there and you don't need their help
  154. 5:50anymore but that's kind of what we're
  155. 5:51doing when we program computer something
  156. 5:54maybe even more familiar nowadays like
  157. 5:55odds are you have a cell phone your
  158. 5:57contacts or your dress book but let me
  159. 5:59ask you why that is like why does Apple
  160. 6:02or Google or anyone else bother
  161. 6:03alphabetizing your contacts I just
  162. 6:05assumed it would be easier to navigate
  163. 6:07what if your friend happened to be at
  164. 6:10the very bottom of this randomly
  165. 6:11organized list like why is that a
  166. 6:13problem like he or she is still there I
  167. 6:15guess it would take a while to get to
  168. 6:16while you're scrolling that in of itself
  169. 6:17is kind of a problem or it's an
  170. 6:19inefficient solution to the problem so
  171. 6:21it turns out that back in my day before
  172. 6:22there were cell phones like everyone's
  173. 6:24numbers from high schools like were
  174. 6:26literally printed in a book and everyone
  175. 6:27in my town and my city my state was
  176. 6:29printed in an actual phone book even if
  177. 6:31you've never seen this technology before
  178. 6:33how would you propose verbally to find
  179. 6:35John in this phone book or I would just
  180. 6:37flip through and just look for the J I
  181. 6:39guess yeah so let me propose that we
  182. 6:40start that way I could just start at the
  183. 6:42beginning and step by step I could just
  184. 6:44look at each page looking for John
  185. 6:47looking for John now even if you've
  186. 6:49never seen this here technology before
  187. 6:51it turns out this is exactly what your
  188. 6:52phone could be doing in software like
  189. 6:55someone from Google or Apple or the like
  190. 6:57they could write software that uses a
  191. 6:59technique in programming known as a loop
  192. 7:01and a loop as the word implies is just
  193. 7:02sort of do something again and again
  194. 7:04what if instead of starting from the
  195. 7:05beginning and going one page at a time
  196. 7:07what if I or what if your phone goes
  197. 7:09like two pages or two names at a time
  198. 7:11would this be correct do you think well
  199. 7:13you could skip over John I think in what
  200. 7:15sense if he's in one of the middle pages
  201. 7:17that you skipped over yeah so sort of
  202. 7:19accidentally and frankly with like 50/50
  203. 7:21probability John could get sandwiched in
  204. 7:22between two pages but does that mean I
  205. 7:24have to throw that algorithm out alt
  206. 7:27together maybe you could use that
  207. 7:28strategy until you get close to the
  208. 7:30section and then switch to going one by
  209. 7:31one okay that's nice so you could kind
  210. 7:33of like go twice as fast but then kind
  211. 7:35of pump the brakes as you near your exit
  212. 7:37on the highway or in this case near the
  213. 7:38J section of the book exactly and maybe
  214. 7:41alternatively if I get to like a b c d e
  215. 7:43f g h i j k if I get to the K section
  216. 7:46then I could just double back like one
  217. 7:48page just to make sure John didn't get
  218. 7:50sandwiched between those pages so the
  219. 7:51nice thing about that second algorithm
  220. 7:53is that I'm flying through the phone
  221. 7:54book like two pages at a time so 2 4 6 8
  222. 7:5710 12 it's not perfect it's not
  223. 7:59necessarily correct but it is if I just
  224. 8:00take like one extra step so I think it's
  225. 8:02fixable but what your phone is probably
  226. 8:04doing and frankly what I and like my
  227. 8:06parents and grandparents used to do back
  228. 8:08in the day is we'd probably go roughly
  229. 8:09to the middle of the phone book here and
  230. 8:11just intuitively if this is an
  231. 8:13alphabetized phone book in English what
  232. 8:15section am I probably going to find
  233. 8:16myself in roughly K okay so I'm in the K
  234. 8:19section is John going to be to the left
  235. 8:21or to the right to the left yeah so John
  236. 8:23is going to be to the left to the right
  237. 8:24and what we can do here though your
  238. 8:25phone does something smarter is tear the
  239. 8:27problem in half throw half of the
  240. 8:29problem away being left with just 500
  241. 8:32pages now but what might I next do I
  242. 8:34could sort of naively just start at the
  243. 8:36beginning again but we've learned to do
  244. 8:37better I can go roughly to the middle
  245. 8:39here do it again yeah exactly so now
  246. 8:41maybe I'm in the E section which is a
  247. 8:43little to the left so John is clearly
  248. 8:46going to be to the right so I can again
  249. 8:48tear the problem portly in half throw
  250. 8:51this half of the problem away and I
  251. 8:53claim now that if we started with a
  252. 8:55th000 Pages now we've gone to 500 250
  253. 8:57now we're really moving quick
  254. 9:07not on that page and I can call him
  255. 9:09roughly how many steps might this third
  256. 9:11algorithm take if I started with a th000
  257. 9:13Pages then went to 500 250 125 like how
  258. 9:17many times can you divide 1,000 and half
  259. 9:20maybe 10 that's roughly 10 because in
  260. 9:23the first algorithm looking again for
  261. 9:24someone like Zoe in the worst case might
  262. 9:26have to go all the way through thousand
  263. 9:28pages but the second algorithm you said
  264. 9:29was 500 maybe 500 in1 essentially the
  265. 9:32same thing so twice as fast but this
  266. 9:34third and final algorithm is sort of
  267. 9:36fundamentally faster because you're
  268. 9:38you're sort of dividing and conquering
  269. 9:40it in half and half and half not just
  270. 9:42taking one or two bites out of it at of
  271. 9:44a time so this of course is not how we
  272. 9:46used to use phone books back in the day
  273. 9:47since otherwise they'd be single use
  274. 9:49only but it is how your phone is
  275. 9:51actually searching for zoy for John for
  276. 9:53anyone else but it's doing it in
  277. 9:55software oh that's cool so here we've
  278. 9:57happened to focus on searching
  279. 9:58algorithms looking for John in the phone
  280. 10:00book but the technique we just used can
  281. 10:02indeed be called divide and conquer
  282. 10:03where you take a big problem and you
  283. 10:05divide and conquer that is you try to
  284. 10:07chop it up into smaller smaller smaller
  285. 10:09pieces a more sophisticated type of
  286. 10:11algorithm at least depending on how you
  287. 10:12implement it something known as a
  288. 10:14recursive algorithm recursive algorithm
  289. 10:16is essentially an algorithm that uses
  290. 10:19itself to solve the exact same problem
  291. 10:21again and again but chops it smaller and
  292. 10:24smaller and smaller
  293. 10:26[Music]
  294. 10:28ultimately hi my name is Patricia
  295. 10:30Patricia nice to meet you where are you
  296. 10:31a student at I'm starting my senior year
  297. 10:33now at NYU oh nice and what have you
  298. 10:35been studying the past few years I study
  299. 10:37computer science and data science if you
  300. 10:38were chatting with a non-cs nonata
  301. 10:40science friend of yours like how would
  302. 10:41you explain to them what an algorithm is
  303. 10:44some kind of like systematic way of like
  304. 10:46solving a problem or like a set of like
  305. 10:49steps to kind of solve a certain like
  306. 10:51problem you have so you probably recall
  307. 10:53learning topics like binary search
  308. 10:55versus linear search and the like so
  309. 10:57I've come here uh complete with a actual
  310. 10:59chalkboard with some magnetic numbers on
  311. 11:01it here like how would you tell a friend
  312. 11:03to sort these I think one of the first
  313. 11:06things we learned was something called
  314. 11:07bubble sort it was kind of like focusing
  315. 11:10on like smaller like bubbles I guess I
  316. 11:12would say it like of the problem like
  317. 11:14looking at like smaller segments rather
  318. 11:16than like the whole thing at once what
  319. 11:17is I think very true about what you're
  320. 11:19hinting at is that bubble sort really
  321. 11:21focuses on like local small problems
  322. 11:25rather than taking a step back trying to
  323. 11:26fix the whole thing let's just fix the
  324. 11:28obvious problem in front of us so for
  325. 11:29instance when we're trying to get from
  326. 11:31smallest to largest and the first two
  327. 11:32things we see are eight followed by one
  328. 11:35this looks like a problem cuz it's out
  329. 11:36of order so what would be the simplest
  330. 11:38fix the least amount of work we can do
  331. 11:40to at least fix one problem just like
  332. 11:41switch those two numbers cuz one is
  333. 11:43obviously smaller than eight perfect so
  334. 11:45we just swap those two then you would
  335. 11:47switch those again yeah so that further
  336. 11:50improves the situation and you can kind
  337. 11:51of see it that the one and the two are
  338. 11:53now in place how about 8 and six switch
  339. 11:55it again switch those again 8 and three
  340. 11:57switch it again
  341. 12:00and conversely now the one and the two
  342. 12:02are closer to and coincidentally are
  343. 12:04exactly where we want them to be so are
  344. 12:07we done no okay so obviously not but
  345. 12:10what could we do now to further improve
  346. 12:14the situation go through it again but
  347. 12:16like you don't need to check the last
  348. 12:18one anymore because we know like that
  349. 12:20number is bubbled up to the top Yeah
  350. 12:22because it has indeed bubbled all the
  351. 12:23way to the top so one and two yeah keep
  352. 12:26it as is okay two and six keep it as is
  353. 12:28okay six and three then you switch it
  354. 12:30okay we switch or swap those six and
  355. 12:31four swap it again okay so four and uh
  356. 12:34six and seven uh keep it okay seven and
  357. 12:36five swap it okay and then I think per
  358. 12:39your point we're pretty darn close let's
  359. 12:41go through once more one and two Keep It
  360. 12:452 three keep it 3 four keep it 4 six
  361. 12:48keep it 6 five and then switch it all
  362. 12:49right we'll switch this and now to your
  363. 12:51point we don't need to bother with the
  364. 12:52ones that already bubbled their way up
  365. 12:54now we're 100% sure it's sorted yeah and
  366. 12:57certainly the search engines of the
  367. 12:58world Google and Bing and so forth they
  368. 13:00probably don't keep web pages in sorted
  369. 13:02order because that would be a crazy long
  370. 13:04list when you're just trying to search
  371. 13:05the data but there's probably some
  372. 13:07algorithm underlying what they do and
  373. 13:08they probably similarly just like we do
  374. 13:11a bit of work upfront to get things
  375. 13:13organized even if it's not strictly
  376. 13:15sorted in the same way so that people
  377. 13:16like you and me and others can find that
  378. 13:19same information so how about social
  379. 13:21media can you Invision where the
  380. 13:23algorithms are in that world like maybe
  381. 13:25for example like Tik Tok like the for
  382. 13:27you page it's kind of like
  383. 13:29cuz those are like Rec like
  384. 13:30recommendations right it's like sort of
  385. 13:32like Netflix recommendations except more
  386. 13:34constant because it's just like every
  387. 13:36video you scroll it's like that's a new
  388. 13:38recommendation basically and it's like
  389. 13:39based on like what you've liked
  390. 13:40previously what you've like saved
  391. 13:42previously what you search up so I would
  392. 13:44assume there's some kind of algorithm
  393. 13:45there kind of figuring out like what to
  394. 13:47put on your foru page absolutely just
  395. 13:49trying to keep you presumably more
  396. 13:50engaged so the better the algorithm is
  397. 13:52the better your engagement is maybe the
  398. 13:54more money the company then makes on the
  399. 13:56platform and so forth so it all sort of
  400. 13:58feeds together together but what you're
  401. 13:59describing really is more artificially
  402. 14:01intelligent if I may because presumably
  403. 14:04there's not someone at Tik Tok or any of
  404. 14:05these social media companies saying if
  405. 14:07Patricia likes this post then show her
  406. 14:10this post if she likes this post then
  407. 14:12show her this other post because the
  408. 14:13code would sort of grow infinitely long
  409. 14:15and there's just way too much content
  410. 14:17for a programmer to be having those
  411. 14:19kinds of conditionals those those
  412. 14:21decisions being made behind the scenes
  413. 14:24so it's probably a little more
  414. 14:25artificially intelligent and in that
  415. 14:27sense You have topics like neuron
  416. 14:28networks and uh machine learning which
  417. 14:30really describe taking as input things
  418. 14:33like what you watch what you click on
  419. 14:34what your friends watch what they click
  420. 14:35on and sort of trying to infer from that
  421. 14:38instead what should we show Patricia or
  422. 14:40her friends next okay yeah yeah that
  423. 14:42makes like the distinction more makes
  424. 14:44more sense now
  425. 14:48yeah I am currently a fourth year PhD
  426. 14:51student at NYU I do robot learning so
  427. 14:54that's half and half Robotics and
  428. 14:55Mission learning sounds like you've
  429. 14:57dabbled with quite a few algorith so how
  430. 14:59does one actually research algorithms or
  431. 15:01invent algorithms the most important was
  432. 15:03just trying to think about
  433. 15:04inefficiencies and also think about
  434. 15:06Connecting Threads the way I think about
  435. 15:08it is that algorithm for me is not just
  436. 15:11about the way of doing something but
  437. 15:12it's about doing something efficiently
  438. 15:14learning algorithms are practically
  439. 15:16everywhere now CU Google I would say for
  440. 15:18example is learning every day about like
  441. 15:21oh what what articles with links might
  442. 15:23be better than others and reranking them
  443. 15:26um there are recommender systems all
  444. 15:28around us
  445. 15:29right like content feeds and social
  446. 15:31media or you know like YouTube or
  447. 15:33Netflix what we see is in a large part
  448. 15:36determined by this kind of learning
  449. 15:38algorithms nowadays there's a lot of
  450. 15:40concerns around some applications of
  451. 15:42machine learning and like deep fakes
  452. 15:44where it can kind of learn how I talk
  453. 15:46and learn how you talk and even how we
  454. 15:48look and generate videos of us we're
  455. 15:50doing this for real but you could
  456. 15:51imagine a computer synthesizing this
  457. 15:53conversation eventually but how does it
  458. 15:55even know what I sound like and what I
  459. 15:57look like and how to replicate that all
  460. 15:59of this learning algorithms that we talk
  461. 16:01about right uh a lot like what goes in
  462. 16:04there is just lots and lots of data so
  463. 16:06data goes in something else comes out
  464. 16:08what comes out is whatever objective
  465. 16:10function that you optimize for like
  466. 16:11where is the line between algorithms
  467. 16:13that like play games with and without AI
  468. 16:17I think when I started off my undergrad
  469. 16:19the current AI machine learning was not
  470. 16:23very much synonymous okay and even in my
  471. 16:25undergraduate in the AI class they
  472. 16:27learned a lot of classical gorithms for
  473. 16:29game plays like for example the AAR
  474. 16:31search right that's a very simple
  475. 16:33example of how you can play a game
  476. 16:35without having anything learned this is
  477. 16:38very much oh you are at a game State you
  478. 16:40just search down see what are the
  479. 16:42possibilities and then you pick the best
  480. 16:45possibility that it can see versus what
  481. 16:47you think about when you think about I
  482. 16:49gameplay like the alpha zero for example
  483. 16:53or Alpha star or there are a lot of you
  484. 16:55know like fancy new machine learning
  485. 16:57agents that are you know even like
  486. 16:59learning very difficult games like go
  487. 17:01and those are learned agents as in they
  488. 17:04are getting better as they play more and
  489. 17:06more games and as they get more games
  490. 17:09they kind of refine their strategy based
  491. 17:11on the data that they seen and once
  492. 17:13again this high level abstraction is
  493. 17:15still the same you see a lot of data and
  494. 17:17you learn from that right but the
  495. 17:19question is what is objective function
  496. 17:21that you're optimizing for is it winning
  497. 17:23this game is it forcing a tie or is it
  498. 17:25you know like opening a door in a
  499. 17:27kitchen so if the world is very much
  500. 17:28focused on supervised unsupervised
  501. 17:31reinforcement learning now like what
  502. 17:32comes next 5 10 years where's the world
  503. 17:34going I think that this is just U going
  504. 17:37to be more and more I don't want to use
  505. 17:40the word encroachment but that's what it
  506. 17:42feels like of algorithms into our
  507. 17:43everyday life like even when I was
  508. 17:45taking the train here right the trains
  509. 17:47are being routed with algorithms but
  510. 17:48this has existed for you know like 50
  511. 17:51years probably but as I was coming here
  512. 17:53as I was checking my phone those are
  513. 17:55different algorithms and you know
  514. 17:57they're they're kind of getting all
  515. 17:59around us getting they're with us all
  516. 18:01the time they're making our life better
  517. 18:03most places most cases and I think
  518. 18:06that's just going to be continuation of
  519. 18:07all of those and it feels like they're
  520. 18:08even in places you wouldn't expect and
  521. 18:10there's just so much data about you and
  522. 18:12me and everyone else online and this
  523. 18:13data is being mind and analyzed and
  524. 18:15influencing things we see and here it
  525. 18:17would seem so there is sort of a
  526. 18:19Counterpoint which might be good for the
  527. 18:20marketers but not necessarily good for
  528. 18:22you and me as individuals you know like
  529. 18:24we're human beings but for someone we
  530. 18:26might be just a pair of eyes who are you
  531. 18:29know carrying a wallet and are there to
  532. 18:31buy things but there is so much more
  533. 18:33potential for this algorithms to just
  534. 18:35make our life better without you know
  535. 18:38like changing much about our
  536. 18:42life I'm Chris Wiggins from associate
  537. 18:44professor of Applied Mathematics at
  538. 18:45Columbia I'm also the chief data
  539. 18:47scientist of the New York Times the data
  540. 18:48science team at the New York Times
  541. 18:50develops and deploys machine learning
  542. 18:51for Newsroom and business problems but I
  543. 18:53would say the things that we do mostly
  544. 18:55you don't see but it might be things
  545. 18:56like personalization algorithm are
  546. 18:58recommending different content and do
  547. 19:00data scientists which is rather distinct
  548. 19:02from the phrase computer scientist do
  549. 19:04data scientists still think in terms of
  550. 19:06algorithms as driving a lot of it oh
  551. 19:08absolutely yeah in fact so in data
  552. 19:10science and Academia often the role of
  553. 19:12the algorithm is the optimization
  554. 19:14algorithm that helps you find the best
  555. 19:16model or the best description of a data
  556. 19:17set okay in data science and industry
  557. 19:20the goal often it's centered around an
  558. 19:22algorithm which becomes a data product
  559. 19:24right so a data scientist in Industry
  560. 19:26might be developing and deploying the
  561. 19:28algorithm which means not only
  562. 19:30understanding the algorithm and its
  563. 19:31statistical performance but also all of
  564. 19:33the software engineering around systems
  565. 19:35integration making sure that that
  566. 19:37algorithm receives input that's reliable
  567. 19:40and has output that's useful as well as
  568. 19:42I would say the organizational
  569. 19:43integration which is how does a
  570. 19:45community of people like the set of
  571. 19:46people working at the New York Times
  572. 19:48integrate that algorithm into their
  573. 19:49process interesting and I feel like AI
  574. 19:51based startups are all their R and
  575. 19:53certainly within Academia are there
  576. 19:54connections between Ai and the world of
  577. 19:56data science absolutely the algorithms
  578. 19:58that there in can you connect those dots
  579. 19:59for you're right that AI as a field has
  580. 20:01really exploded I would say particularly
  581. 20:03many people experienced a chatbot that
  582. 20:05was really really good today when people
  583. 20:06say I AI they're often thinking about
  584. 20:09large language models or they're
  585. 20:11thinking about generative AI or they
  586. 20:12might be thinking about a chatbot one
  587. 20:14thing to keep in mind is a chatbot is a
  588. 20:16special case of generative AI which is a
  589. 20:18special case of using large language
  590. 20:20models which is a special case of using
  591. 20:22machine learning generally which is what
  592. 20:24most people mean by AI you may have
  593. 20:26moments that are um what John kthy
  594. 20:28called look M No Hands results where you
  595. 20:30do some fantastic trick and you're not
  596. 20:32quite sure how it worked I think it's
  597. 20:33still very much early days large
  598. 20:35language models is still in the point of
  599. 20:37what might be called alchemy that people
  600. 20:39are building large language models
  601. 20:40without a real clear a priori sense of
  602. 20:42what the right design is for a right
  603. 20:44problem many people are trying different
  604. 20:46things out often in large companies
  605. 20:47where they can afford to have many
  606. 20:48people trying things out seeing what
  607. 20:50works publishing that instantiating it
  608. 20:52as a product and that itself is part of
  609. 20:54the scientific process I would think too
  610. 20:56yeah very much well science and
  611. 20:57engineering because often you're
  612. 20:59building a thing and the thing does
  613. 21:01something amazing to large extent we are
  614. 21:03still looking for basic theoretical
  615. 21:05results around why deep neural networks
  616. 21:08generally work why are they able to
  617. 21:10learn so well they're huge billions of
  618. 21:12parameter models and it's difficult for
  619. 21:14us to interpret how they are able to do
  620. 21:16what they do and is this a good thing do
  621. 21:18you think or an inevitable thing that we
  622. 21:20the programmers we the computer
  623. 21:21scientist the data science who are
  624. 21:23inventing these things can't actually
  625. 21:25explain how they work because I feel
  626. 21:27like friends of mine industry even when
  627. 21:29it's something simple and relatively
  628. 21:30familiar like autocomplete they can't
  629. 21:32actually tell me like why that name is
  630. 21:34appearing at the top of the list whereas
  631. 21:36years ago when these algorithms were
  632. 21:38more deterministic and more procedural
  633. 21:40you could even point to the line that
  634. 21:42made that name bubble up to the top so
  635. 21:44is this a good thing a bad thing that
  636. 21:45we're sort of losing control perhaps in
  637. 21:47some sense of the algorithm it has risks
  638. 21:49I don't know that I would say that it's
  639. 21:50good or bad but I would say there's lots
  640. 21:52of scientific precedent there are times
  641. 21:53when an algorithm works really well and
  642. 21:55we have finite understanding of why it
  643. 21:57works or a model works really well and
  644. 22:00sometimes we have very little
  645. 22:01understanding of why it works the way it
  646. 22:02does in classes I teach certainly spend
  647. 22:04a lot of time on fundamentals algorithms
  648. 22:06that have been taught in classes for
  649. 22:08decades now whether it's binary search
  650. 22:09linear search bubble swort selection
  651. 22:11sort or the like but are if we're
  652. 22:14already at the point where I can pull up
  653. 22:15chat GPT copy paste a whole bunch of
  654. 22:17numbers or words and say sort these for
  655. 22:20me does it really matter how chat GPT is
  656. 22:23sorting it does it really matter to me
  657. 22:25as the user how the software is sorting
  658. 22:27it like do the fundamentals become more
  659. 22:29dated and less important do you think
  660. 22:31now you're talking about the ways in
  661. 22:32which code and computation is a special
  662. 22:35case of Technology right so for driving
  663. 22:38a car you may not necessarily need to
  664. 22:39know much about organic chemistry even
  665. 22:41if if the organic chemistry is how the
  666. 22:44car works right so you can drive the car
  667. 22:46and use it in different ways without
  668. 22:48understanding much about the
  669. 22:49fundamentals so similarly with
  670. 22:50computation we're at a point where the
  671. 22:52computation is so high level right as
  672. 22:54you you know you can import pyit learn
  673. 22:56and you can go from zero to machine
  674. 22:57learning and 30 seconds it's depending
  675. 22:58on what level you want to understand the
  676. 23:00technology where in the stack so to
  677. 23:02speak um it's possible to understand it
  678. 23:05and make wonderful things and Advance
  679. 23:06the world without understanding it at
  680. 23:08the particular level of somebody who
  681. 23:10actually might have originally designed
  682. 23:11the actual optimization algorithm I
  683. 23:13should say though for many of the
  684. 23:14optimization algorithms there are cases
  685. 23:16where an algorithm works really well and
  686. 23:18we publish a paper and there's a proof
  687. 23:20in the paper and then years later people
  688. 23:22realize actually that prove was wrong
  689. 23:23and we're really still not sure why that
  690. 23:24optimization works but it works really
  691. 23:26well or it inspires people to make new
  692. 23:28optimization algorithms so I I do think
  693. 23:32that the the goal of understanding
  694. 23:34algorithms is Loosely coupled to our
  695. 23:36progress in advancing grade algorithms
  696. 23:38but they don't always necessarily have
  697. 23:39to require each other and for those
  698. 23:41students especially or even adults who
  699. 23:43are thinking of now steering into
  700. 23:45computer science into programming who
  701. 23:47were really jazzed about heading in that
  702. 23:49direction up until for instance November
  703. 23:50of 2022 when all of a sudden for many
  704. 23:53people it looked like the world was now
  705. 23:54changing and now maybe this isn't such a
  706. 23:57promising path this isn't such a
  707. 23:58lucrative path anymore are llms are
  708. 24:01tools like chat GPT reason not to
  709. 24:03perhaps steer into the field large
  710. 24:05language models are a particular
  711. 24:06architecture for predicting let's say
  712. 24:08the next word or a set of tokens more
  713. 24:10generally the algorithm comes in when
  714. 24:12you think about how is that llm to be
  715. 24:15trained or also how to be fine-tuned so
  716. 24:19the P of GPT is a pre-trained algorithm
  717. 24:22the idea is that you train a large
  718. 24:24language model on some Corpus of text
  719. 24:27could be encyclopedias or textbooks or
  720. 24:30what have you and then you might want to
  721. 24:32fine-tune that model around some
  722. 24:35particular task or some particular
  723. 24:37subset of texts so both of those are
  724. 24:39examples of training algorithms so I
  725. 24:42would say people's perception of
  726. 24:43artificial intelligence has really
  727. 24:45changed a lot in the last 6 months
  728. 24:47particularly around November of 2022
  729. 24:51when people experienced a really good
  730. 24:52chatbot the technology though had been
  731. 24:54around already before academics had
  732. 24:56already been working with chat gpt3
  733. 24:58before that and GPT 2 and gpt1 and and
  734. 25:01for many people it sort of opened up
  735. 25:03this conversation about what is
  736. 25:04artificial intelligence and what could
  737. 25:05we do with this and what are the
  738. 25:07possible good and bad right like any
  739. 25:08other piece of technology cransberg
  740. 25:10first law of technology technology is
  741. 25:12neither good nor bad nor is it neutral
  742. 25:14every time we have some new technology
  743. 25:15we should think about its capabilities
  744. 25:17and the good and the possible bad as
  745. 25:20with any area of study algorithms offer
  746. 25:22a spectrum from the most basic to the
  747. 25:24most advanced and even if right now the
  748. 25:26most advanced of the those algorithms
  749. 25:28feels Out Of Reach because you just
  750. 25:29don't have that background with each
  751. 25:31lesson you learn with each algorithm you
  752. 25:33study that endgame becomes closer and
  753. 25:36closer such that it will before long be
  754. 25:38accessible to you and you will be at the
  755. 25:40end of that most advanced
  756. 25:42[Music]
  757. 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.