| [{"text": "[SQUEAKING]", "start": 0.0, "duration": 1.936}, {"text": "[RUSTLING]", "start": 1.936, "duration": 1.452}, {"text": "[CLICKING]", "start": 3.388, "duration": 1.936}, {"text": "JASON KU: Welcome, everybody,\nto the second-to-last lecture", "start": 13.08, "duration": 3.24}, {"text": "of 6.006.", "start": 16.32, "duration": 2.67}, {"text": "In this lecture,\nwe've mostly covered", "start": 18.99, "duration": 2.88}, {"text": "all of the testable\nmaterial that we're", "start": 21.87, "duration": 2.7}, {"text": "going to have on the\nfinal, or on quiz 3.", "start": 24.57, "duration": 6.21}, {"text": "Today, really what\nwe're talking about", "start": 30.78, "duration": 1.949}, {"text": "is putting into context\nall the material", "start": 32.729, "duration": 2.821}, {"text": "that we've learned over\nthe course of the term", "start": 35.55, "duration": 4.37}, {"text": "at a high level and talk about\nwhere we can go from here", "start": 39.92, "duration": 4.32}, {"text": "in terms of other theory\nclasses and other classes", "start": 44.24, "duration": 2.82}, {"text": "in the department that are\nrelated to this material.", "start": 47.06, "duration": 2.28}, {"text": "Now, most things\nin the department", "start": 49.34, "duration": 2.4}, {"text": "are in some way related\nto this material.", "start": 51.74, "duration": 2.5}, {"text": "And so that's why there's\na foundational course.", "start": 54.24, "duration": 2.805}, {"text": "But we're going to try to talk\nabout it from a high level", "start": 57.045, "duration": 2.375}, {"text": "and talk about how some\nfuture things that you", "start": 59.42, "duration": 5.849}, {"text": "might be interested relate.", "start": 65.269, "duration": 1.421}, {"text": "OK, so we started out\nthe term, in lecture one,", "start": 66.69, "duration": 4.73}, {"text": "talking about 6.006, and\nwe had four main goals", "start": 71.42, "duration": 4.05}, {"text": "that we had for our course--\nreally three main goals", "start": 75.47, "duration": 5.64}, {"text": "Does anyone remember\nwhat those goals were?", "start": 81.11, "duration": 2.43}, {"text": "So you got to the\nlast one first.", "start": 89.16, "duration": 2.52}, {"text": "The first one was to solve\nhard computational problems,", "start": 91.68, "duration": 4.32}, {"text": "to be able to solve problems.", "start": 96.0, "duration": 3.06}, {"text": "So this is kind of like the\n\"let's make an algorithm\"", "start": 99.06, "duration": 4.65}, {"text": "part of the course.", "start": 103.71, "duration": 2.58}, {"text": "1, solve hard\ncomputational problems.", "start": 106.29, "duration": 4.845}, {"text": "I guess \"hard\" here maybe\nshould be in quotes because we", "start": 116.62, "duration": 4.11}, {"text": "saw in the last\nlecture what hard", "start": 120.73, "duration": 2.28}, {"text": "means in a technical sense.", "start": 123.01, "duration": 2.67}, {"text": "Hard could mean that there's\nno efficient algorithm that we", "start": 125.68, "duration": 5.67}, {"text": "know how to solve a problem on.", "start": 131.35, "duration": 1.787}, {"text": "That's getting a little\nbit of ahead of ourselves.", "start": 133.137, "duration": 2.083}, {"text": "Computational problems\nwith algorithms", "start": 135.22, "duration": 2.43}, {"text": "is really the key\npart about this goal.", "start": 137.65, "duration": 2.37}, {"text": "It's kind of the\nsame goal that you", "start": 140.02, "duration": 1.65}, {"text": "have in a class like\n6.0001 or 6.009.", "start": 141.67, "duration": 4.56}, {"text": "You're trying to\nconvince a computer", "start": 146.23, "duration": 2.16}, {"text": "that you solved a problem\non a finite set of inputs.", "start": 148.39, "duration": 6.54}, {"text": "But really what\nthis class is about", "start": 154.93, "duration": 2.25}, {"text": "is two other things, which\nis more about communication", "start": 157.18, "duration": 4.5}, {"text": "to people rather than computers.", "start": 161.68, "duration": 2.52}, {"text": "Your algorithm might be\ncorrect or efficient,", "start": 164.2, "duration": 3.81}, {"text": "but you need to be able to\ncommunicate that to humans.", "start": 168.01, "duration": 2.25}, {"text": "And that's what the\nother two goals are.", "start": 170.26, "duration": 2.46}, {"text": "So second one is\nargue correctness.", "start": 172.72, "duration": 8.43}, {"text": "Basically, the thing that\nI'm doing to my inputs", "start": 181.15, "duration": 4.47}, {"text": "is always going to lead\nme to a correct output.", "start": 185.62, "duration": 2.235}, {"text": "No matter what input I\ngive it, any valid input--", "start": 190.58, "duration": 2.56}, {"text": "there could be an infinite\nspace of possible inputs,", "start": 193.14, "duration": 3.6}, {"text": "and in this class,\nthat's the case,", "start": 196.74, "duration": 1.59}, {"text": "because we want our input size\nto grow arbitrarily large--", "start": 198.33, "duration": 4.44}, {"text": "we need to be able\nto argue correctness", "start": 202.77, "duration": 1.89}, {"text": "that it's going to return\nme the correct thing", "start": 204.66, "duration": 2.28}, {"text": "no matter what my inputs are.", "start": 206.94, "duration": 2.53}, {"text": "And in order to do that, that's\nessentially-- that's 6.042.", "start": 209.47, "duration": 4.67}, {"text": "This whole class has\nbasically been applied 6.042.", "start": 214.14, "duration": 4.8}, {"text": "I've given you some\nprocedures, and you", "start": 218.94, "duration": 3.42}, {"text": "have to prove things\nabout these procedures.", "start": 222.36, "duration": 1.89}, {"text": "Or most of the time,\nwe proved it for you,", "start": 224.25, "duration": 2.85}, {"text": "and then you've used\nthem as black boxes.", "start": 227.1, "duration": 2.31}, {"text": "But that's a lot of what\nthis class is about.", "start": 229.41, "duration": 4.68}, {"text": "And the third one\nis efficiency--", "start": 234.09, "duration": 1.94}, {"text": "argue that it's \"good,\"\nfor lack of a better thing.", "start": 238.61, "duration": 4.09}, {"text": "This is efficiency.", "start": 242.7, "duration": 1.63}, {"text": "What does \"good\" mean?", "start": 244.33, "duration": 2.69}, {"text": "Well, that was hard to know\nat the beginning of our class.", "start": 247.02, "duration": 3.48}, {"text": "And so we set up this model\nof computation, a framework,", "start": 250.5, "duration": 3.65}, {"text": "through which we could\ndetermine how good or bad", "start": 254.15, "duration": 3.99}, {"text": "our algorithms were by saying--", "start": 258.14, "duration": 2.1}, {"text": "by defining a model of\ncomputation, saying what things", "start": 260.24, "duration": 3.27}, {"text": "we can do in constant time, and\nthen just building off of that.", "start": 263.51, "duration": 4.65}, {"text": "So this is basically our\nmodel plus some asymptotics", "start": 268.16, "duration": 7.202}, {"text": "or something like that.", "start": 275.362, "duration": 0.958}, {"text": "Ran out of space.", "start": 279.84, "duration": 1.51}, {"text": "What?", "start": 281.35, "duration": 0.69}, {"text": "AUDIENCE: It's\nabout scalability.", "start": 282.04, "duration": 1.375}, {"text": "JASON KU: Yeah, this\nis about scalability.", "start": 283.415, "duration": 2.635}, {"text": "A model of computation tells\nus how much time we can spend,", "start": 286.05, "duration": 4.26}, {"text": "but it's compared\nto our input size.", "start": 290.31, "duration": 3.03}, {"text": "This is always about,\nhow does our algorithm", "start": 293.34, "duration": 3.51}, {"text": "perform relative to the rate\nthat our problem size grows?", "start": 296.85, "duration": 4.92}, {"text": "And so that's what\nwe mean by \"good.\"", "start": 301.77, "duration": 2.01}, {"text": "And in this class, we don't\ntend to talk about constant size", "start": 303.78, "duration": 3.81}, {"text": "problems.", "start": 307.59, "duration": 1.02}, {"text": "It's about how algorithms\ncan scale as you", "start": 308.61, "duration": 4.02}, {"text": "have arbitrarily large inputs.", "start": 312.63, "duration": 1.8}, {"text": "That's why we need\nrecursion and induction", "start": 314.43, "duration": 2.8}, {"text": "to be able to prove things\nabout our algorithms,", "start": 317.23, "duration": 2.0}, {"text": "because they're for arbitrary n.", "start": 319.23, "duration": 2.73}, {"text": "And that's why we need this\nrelative-to-input size,", "start": 321.96, "duration": 5.49}, {"text": "the growth factor of our\nalgorithm's performance,", "start": 327.45, "duration": 4.11}, {"text": "relative to the input.", "start": 331.56, "duration": 1.9}, {"text": "OK, and then the\nlast thing is, to me,", "start": 333.46, "duration": 5.91}, {"text": "one of the most\nimportant things,", "start": 339.37, "duration": 2.0}, {"text": "is communicating these\nthings to another human.", "start": 341.37, "duration": 3.66}, {"text": "So communication is key here.", "start": 345.03, "duration": 6.42}, {"text": "If you can always\nwrite good code", "start": 351.45, "duration": 2.13}, {"text": "that's always\nright, good for you.", "start": 353.58, "duration": 2.91}, {"text": "I can't do that all the time.", "start": 356.49, "duration": 3.44}, {"text": "But that might mean\nthat you can be very--", "start": 359.93, "duration": 4.38}, {"text": "a competent, independent\ncomputer programmer.", "start": 364.31, "duration": 4.47}, {"text": "But you are going to be limited\nin what you can do if you're", "start": 368.78, "duration": 5.73}, {"text": "only able to rely on yourself.", "start": 374.51, "duration": 3.63}, {"text": "A lot about computer science\nis working with others", "start": 378.14, "duration": 3.87}, {"text": "to solve computational problems.", "start": 382.01, "duration": 1.662}, {"text": "And when you're\nworking with others", "start": 383.672, "duration": 1.458}, {"text": "to solve computational\nproblems, you", "start": 385.13, "duration": 2.162}, {"text": "need to be able to\ncommunicate with them,", "start": 387.292, "duration": 1.708}, {"text": "and you need to be able\nto communicate them both", "start": 389.0, "duration": 2.49}, {"text": "what it is you're doing and\nwhy it is you're doing it--", "start": 391.49, "duration": 5.1}, {"text": "that you're doing the correct\nthing and that it's efficient.", "start": 396.59, "duration": 3.7}, {"text": "And so that's a big part\nabout what this course is.", "start": 400.29, "duration": 3.74}, {"text": "At the end of the\nday, on your quiz,", "start": 404.03, "duration": 2.31}, {"text": "if you write down Python\nscript for a correct algorithm,", "start": 406.34, "duration": 6.39}, {"text": "but we don't know\nwhat it's doing,", "start": 412.73, "duration": 1.98}, {"text": "but it's correct,\nwe're not going", "start": 414.71, "duration": 1.98}, {"text": "to give you full points on that,\nbecause you're not satisfying", "start": 416.69, "duration": 4.44}, {"text": "the conditions of this class.", "start": 421.13, "duration": 3.06}, {"text": "It's really about the\ncommunication here.", "start": 424.19, "duration": 2.42}, {"text": "OK, so just to review,\nsince we've not", "start": 426.61, "duration": 5.23}, {"text": "discussed how the most recent\nlecture fits into your problem", "start": 431.84, "duration": 6.12}, {"text": "sets.", "start": 437.96, "duration": 0.72}, {"text": "We didn't have any problem\nsets that covered complexity,", "start": 438.68, "duration": 5.39}, {"text": "so how does that fit in?", "start": 444.07, "duration": 1.25}, {"text": "Well, argue that the ways that\nwe're solving our problems", "start": 445.32, "duration": 3.45}, {"text": "are good.", "start": 448.77, "duration": 1.14}, {"text": "What we proved in the last\nlecture was that most problems", "start": 449.91, "duration": 2.73}, {"text": "cannot be solved good.", "start": 452.64, "duration": 3.32}, {"text": "They can't be solved\nin polynomial time", "start": 455.96, "duration": 2.76}, {"text": "with respect to the\nsize of your input.", "start": 458.72, "duration": 2.62}, {"text": "However, most of the\nproblems that we think about,", "start": 461.34, "duration": 4.67}, {"text": "in a sense, I can prove to\nyou that it's a yes solution.", "start": 466.01, "duration": 5.82}, {"text": "I can show you a simple\npath in this graph that", "start": 471.83, "duration": 4.08}, {"text": "has a certain length.", "start": 475.91, "duration": 2.01}, {"text": "Or I can show you a subset\nthat sums to a certain value", "start": 477.92, "duration": 3.84}, {"text": "in a particular problem.", "start": 481.76, "duration": 1.56}, {"text": "I can give you a\ncertificate that I", "start": 483.32, "duration": 1.83}, {"text": "can prove to you in a\nreasonable amount of time", "start": 485.15, "duration": 2.91}, {"text": "that, yes, I can\nprove to you that this", "start": 488.06, "duration": 2.16}, {"text": "is-- the answer to\nthis thing is correct.", "start": 490.22, "duration": 2.67}, {"text": "And that's what we talked\nabout in the last lecture.", "start": 492.89, "duration": 3.99}, {"text": "So not always \"good\"\nalgorithms to solve problems,", "start": 496.88, "duration": 23.33}, {"text": "but many problems we think\nabout can be either checked", "start": 520.21, "duration": 22.06}, {"text": "in polynomial time--", "start": 542.27, "duration": 2.73}, {"text": "this is the concept of having\na certificate that I could give", "start": 548.48, "duration": 3.24}, {"text": "you of polynomial\nsize that could", "start": 551.72, "duration": 1.89}, {"text": "be checked in polynomial time--", "start": 553.61, "duration": 2.43}, {"text": "in a sense, that's a way--", "start": 556.04, "duration": 2.62}, {"text": "check-- checked in\npolynomial time.", "start": 558.66, "duration": 3.86}, {"text": "This leads to our class\nof decision problems, NP.", "start": 562.52, "duration": 4.05}, {"text": "Or it can be solved by brute\nforce in exponential time.", "start": 566.57, "duration": 13.62}, {"text": "Most of the things that we've\ntalked about in this class", "start": 580.19, "duration": 2.46}, {"text": "fall into one of\nthese two categories.", "start": 582.65, "duration": 2.38}, {"text": "We can just brute force\nover the combinatorial space", "start": 585.03, "duration": 2.51}, {"text": "of possible outputs and check\nto see if they're correct.", "start": 587.54, "duration": 4.19}, {"text": "Or I can give you a certificate\nbasically saying, look,", "start": 591.73, "duration": 6.82}, {"text": "I can solve--", "start": 598.55, "duration": 0.65}, {"text": "actually, anything\nthat's of this form", "start": 599.2, "duration": 1.737}, {"text": "can be checked in this\nform, because there's", "start": 600.937, "duration": 1.833}, {"text": "only a polynomial number of\nthings to check-- or, sorry,", "start": 602.77, "duration": 2.8}, {"text": "an exponential possible\nnumber of certificates", "start": 605.57, "duration": 2.54}, {"text": "of polynomial length to check.", "start": 608.11, "duration": 2.4}, {"text": "But basically, this is\nsaying that the problems", "start": 610.51, "duration": 2.94}, {"text": "that we think of mostly fall\ninto these two categories.", "start": 613.45, "duration": 3.64}, {"text": "And so there usually\nare algorithms to solve", "start": 617.09, "duration": 3.17}, {"text": "the problems that\nwe care about, even", "start": 620.26, "duration": 4.45}, {"text": "if most random problems\nin terms of bit strings", "start": 624.71, "duration": 4.8}, {"text": "that we gave an analysis\nin the last lecture", "start": 629.51, "duration": 2.97}, {"text": "actually prove that most random\nproblems are not solvable.", "start": 632.48, "duration": 3.57}, {"text": "In a sense, the problems we\nthink about are not random.", "start": 638.57, "duration": 3.61}, {"text": "They kind of have this\nstructure that they", "start": 642.18, "duration": 1.79}, {"text": "can be checked pretty quickly.", "start": 643.97, "duration": 2.36}, {"text": "OK, so that's what\nwe mean when we", "start": 646.33, "duration": 3.4}, {"text": "are talking about complexity.", "start": 649.73, "duration": 1.8}, {"text": "For the purposes of\nthe final, you'll", "start": 651.53, "duration": 2.52}, {"text": "be able to see on your\nfinal exam practice problems", "start": 654.05, "duration": 5.1}, {"text": "that we're going to give you,\nmost of what we cover in terms", "start": 659.15, "duration": 6.3}, {"text": "of material on the final\nthat will be testing", "start": 665.45, "duration": 3.75}, {"text": "the lecture 19 material will\nbe in terms of the definitions.", "start": 669.2, "duration": 5.25}, {"text": "Do you understand what the\ndecision problem class NP is?", "start": 674.45, "duration": 4.89}, {"text": "EXP is?", "start": 679.34, "duration": 1.29}, {"text": "Do you know how these\nrelate to each other?", "start": 680.63, "duration": 2.04}, {"text": "EXP is definitely a\nsuperset of NP here.", "start": 682.67, "duration": 4.95}, {"text": "NP nestles inside here.", "start": 687.62, "duration": 1.65}, {"text": "They could be\nequal-- probably not.", "start": 689.27, "duration": 2.58}, {"text": "Those are the types of\nthings that we would address.", "start": 691.85, "duration": 3.63}, {"text": "Knowing a directionality\nof a reduction.", "start": 695.48, "duration": 3.21}, {"text": "If you have a problem\nA and a problem", "start": 698.69, "duration": 5.64}, {"text": "B, and I know that this one\nis difficult by some measure--", "start": 704.33, "duration": 8.96}, {"text": "I already happened to\nknow that it's very hard,", "start": 713.29, "duration": 3.78}, {"text": "like NP-hard or\nsomething like that.", "start": 717.07, "duration": 2.43}, {"text": "If this is a problem that\nI'm interested in knowing", "start": 719.5, "duration": 3.33}, {"text": "the complexity about,\nand I can prove", "start": 722.83, "duration": 2.73}, {"text": "that I can solve it if I\nhad a black box to solve B--", "start": 725.56, "duration": 6.15}, {"text": "any black box to\nsolve B, and I could", "start": 731.71, "duration": 2.22}, {"text": "make this reduction\nin polynomial time,", "start": 733.93, "duration": 3.32}, {"text": "and if this is hard, that\nmeans this can't be--", "start": 737.25, "duration": 3.98}, {"text": "that means that if\nthis is hard, then", "start": 743.77, "duration": 2.4}, {"text": "I better not be able to solve\nthis in polynomial time,", "start": 746.17, "duration": 3.69}, {"text": "because then I would be able to\nsolve this in polynomial time.", "start": 749.86, "duration": 2.65}, {"text": "So that's basically\nthe type of argument", "start": 752.51, "duration": 3.32}, {"text": "usually in a\ntrue/false question we", "start": 755.83, "duration": 1.77}, {"text": "might have on the\nfinal exam for you", "start": 757.6, "duration": 2.85}, {"text": "to kind of understand the basic\nhigh-level definitions involved", "start": 760.45, "duration": 4.68}, {"text": "in what was talked\nabout in lecture 19.", "start": 765.13, "duration": 4.02}, {"text": "Hardness-- the very most\ndifficult problems of these", "start": 769.15, "duration": 3.72}, {"text": "classes--", "start": 772.87, "duration": 0.72}, {"text": "and completeness--\nsorry, anything harder", "start": 773.59, "duration": 3.75}, {"text": "than things in these classes.", "start": 777.34, "duration": 1.95}, {"text": "Whereas completeness is\nthe ones that are in this", "start": 779.29, "duration": 3.03}, {"text": "set, but at least as hard as\nanything in those classes.", "start": 782.32, "duration": 3.57}, {"text": "So that's just to give\nyou a brief overview", "start": 785.89, "duration": 3.45}, {"text": "of the only material\nthat hasn't been tested", "start": 789.34, "duration": 3.36}, {"text": "but might be tested\non the final.", "start": 792.7, "duration": 3.21}, {"text": "So when we don't have\na good algorithm,", "start": 795.91, "duration": 4.17}, {"text": "we can actually prove\nthat it probably", "start": 800.08, "duration": 4.74}, {"text": "doesn't have a good algorithm.", "start": 804.82, "duration": 2.37}, {"text": "And that's a problem\nthat you'll be", "start": 807.19, "duration": 2.94}, {"text": "able to solve in\nfuture classes, if you", "start": 810.13, "duration": 2.46}, {"text": "continue along this track.", "start": 812.59, "duration": 1.78}, {"text": "OK, so what's the actual\ncontent that we talked about?", "start": 814.37, "duration": 4.34}, {"text": "This is a very\nhigh-level overview", "start": 818.71, "duration": 1.68}, {"text": "of why we're taking this class,\nwhy you're taking this class.", "start": 820.39, "duration": 3.27}, {"text": "But what is the content\nwe actually covered?", "start": 823.66, "duration": 2.91}, {"text": "I like to break it up into\nthree units and, in a sense,", "start": 826.57, "duration": 5.77}, {"text": "two subunits.", "start": 832.34, "duration": 1.95}, {"text": "So quiz 1 material and quiz 2\nmaterial was about showing you", "start": 834.29, "duration": 10.02}, {"text": "some nice black boxes.", "start": 844.31, "duration": 2.1}, {"text": "Basically, if I'm going to have\ninputs of non-constant size,", "start": 846.41, "duration": 3.81}, {"text": "it's going to be useful for\nme to be able to find things", "start": 850.22, "duration": 3.78}, {"text": "among those elements.", "start": 854.0, "duration": 2.24}, {"text": "So that's really what\nquiz 1 is all about--", "start": 856.24, "duration": 3.67}, {"text": "data structures\nfor finding things", "start": 859.91, "duration": 10.41}, {"text": "in non-constant size database.", "start": 870.32, "duration": 17.92}, {"text": "Sure.", "start": 888.24, "duration": 0.85}, {"text": "And when we were\nstoring these things,", "start": 889.09, "duration": 2.07}, {"text": "we want to support maybe two\ndifferent types of queries--", "start": 891.16, "duration": 3.135}, {"text": "ones that were intrinsic to\nthe items, what the items were,", "start": 899.52, "duration": 4.44}, {"text": "and ones based on what--\nan extrinsic order", "start": 903.96, "duration": 3.18}, {"text": "was placed on these items.", "start": 907.14, "duration": 3.21}, {"text": "And that was a way in\nwhich we broke down,", "start": 910.35, "duration": 3.033}, {"text": "how should I approach\nlooking at this problem?", "start": 913.383, "duration": 1.917}, {"text": "I want to be able to\nsupport queries and maintain", "start": 915.3, "duration": 2.97}, {"text": "an extrinsic order\non these things.", "start": 918.27, "duration": 1.65}, {"text": "I might want a sequence.", "start": 919.92, "duration": 2.17}, {"text": "This is a sequence\nextrinsic order.", "start": 922.09, "duration": 8.0}, {"text": "Or I want to be able to look\nup, is this thing in my set,", "start": 933.03, "duration": 6.13}, {"text": "by a key that we identify,\nwith a unique key.", "start": 939.16, "duration": 4.48}, {"text": "So this is some intrinsic\nqueries, and often order.", "start": 943.64, "duration": 7.29}, {"text": "A hash table doesn't maintain\nany order on my keys.", "start": 954.69, "duration": 4.35}, {"text": "But it does support\nintrinsic queries--", "start": 959.04, "duration": 1.89}, {"text": "is this thing in my set or not?", "start": 960.93, "duration": 1.99}, {"text": "But we did show you\nother set data structures", "start": 962.92, "duration": 2.48}, {"text": "that do support an\nintrinsic order that", "start": 965.4, "duration": 2.76}, {"text": "allows me to see what the next\nlarger and the next previous--", "start": 968.16, "duration": 4.17}, {"text": "the next larger and the next\nsmaller item is in my set.", "start": 972.33, "duration": 7.81}, {"text": "So here's a summary of those\ndata structures that we had.", "start": 980.14, "duration": 4.87}, {"text": "I'm not going to go into\nhow to use these things", "start": 985.01, "duration": 3.09}, {"text": "or how to choose\nfrom among them here.", "start": 988.1, "duration": 2.64}, {"text": "That's what your quiz 1\nreview lecture was all about.", "start": 990.74, "duration": 5.97}, {"text": "But basically, the idea here\nis, if we have a sequence,", "start": 996.71, "duration": 3.97}, {"text": "most of the time when\nyou're programming,", "start": 1000.68, "duration": 3.4}, {"text": "being able to push and\npop at the end of a list", "start": 1004.08, "duration": 3.24}, {"text": "is pretty good.", "start": 1007.32, "duration": 0.87}, {"text": "Which is why Python, the\nmost fundamental data", "start": 1008.19, "duration": 3.15}, {"text": "structure that you have,\nis a list, because it's", "start": 1011.34, "duration": 3.21}, {"text": "a super useful thing.", "start": 1014.55, "duration": 1.26}, {"text": "I just want to store\na bunch of things,", "start": 1015.81, "duration": 1.89}, {"text": "have random access to the,\nsay, 10th element to my thing,", "start": 1017.7, "duration": 6.81}, {"text": "but I'm not necessarily\nhaving to dynamically update", "start": 1024.51, "duration": 4.53}, {"text": "the order of these\nthings dynamically.", "start": 1029.04, "duration": 4.14}, {"text": "I don't necessarily\nhave to insert something", "start": 1033.18, "duration": 2.04}, {"text": "in the middle of the list.", "start": 1035.22, "duration": 1.47}, {"text": "But most of the\ntime, what I can do", "start": 1036.69, "duration": 1.649}, {"text": "is put it at the end of the\nlist and maybe swap it down", "start": 1038.339, "duration": 3.451}, {"text": "into place if I need to.", "start": 1041.79, "duration": 2.579}, {"text": "So that's why a list\nis super useful.", "start": 1044.369, "duration": 2.46}, {"text": "A sequence AVL tree,\nuseful, but not", "start": 1046.829, "duration": 4.801}, {"text": "as ubiquitous as a linked list--", "start": 1051.63, "duration": 1.89}, {"text": "I mean, as a dynamic\narray, sorry.", "start": 1053.52, "duration": 2.43}, {"text": "I said linked list,\nI meant Python list,", "start": 1055.95, "duration": 2.88}, {"text": "which is a dynamic array.", "start": 1058.83, "duration": 2.31}, {"text": "So the dynamic\narray tended to be,", "start": 1061.14, "duration": 2.28}, {"text": "in your coding practice, your\nmost common sequence data", "start": 1063.42, "duration": 4.5}, {"text": "structure here.", "start": 1067.92, "duration": 1.08}, {"text": "Though, we can get pretty\ngood for this insert", "start": 1069.0, "duration": 3.39}, {"text": "in the middle operation\nwith the sequence AVL.", "start": 1072.39, "duration": 2.94}, {"text": "OK, then on the set\ndata structure side,", "start": 1075.33, "duration": 3.63}, {"text": "I categorize these things into\na couple different categories", "start": 1078.96, "duration": 4.265}, {"text": "here in terms of the operations\nwe can support on these things.", "start": 1083.225, "duration": 2.625}, {"text": "These are all intrinsic\noperations-- finding things,", "start": 1085.85, "duration": 2.8}, {"text": "inserting, deleting things.", "start": 1088.65, "duration": 1.53}, {"text": "I think of the first three as\nbeing dictionary operations.", "start": 1090.18, "duration": 4.41}, {"text": "I want to just look up\nwhether something's there.", "start": 1094.59, "duration": 4.11}, {"text": "Whereas the last two are\norder-preserving operations,", "start": 1098.7, "duration": 5.22}, {"text": "where it matters what the order\nof these things are stored in.", "start": 1103.92, "duration": 4.14}, {"text": "And so as you can see from\nthe asymptotic complexity", "start": 1108.06, "duration": 6.54}, {"text": "of the various operations\nhere, the hash table", "start": 1114.6, "duration": 2.73}, {"text": "is actually super good if you\nwant the dictionary oper--", "start": 1117.33, "duration": 3.36}, {"text": "if you just want to support\ndictionary operations.", "start": 1120.69, "duration": 3.79}, {"text": "But in the cases where you need\nto maintain order dynamically,", "start": 1124.48, "duration": 3.68}, {"text": "a set AVL is the way to go.", "start": 1128.16, "duration": 3.43}, {"text": "But if you don't\nneed it dynamic,", "start": 1131.59, "duration": 1.41}, {"text": "but you still need\nthose order operations,", "start": 1133.0, "duration": 1.98}, {"text": "a sorted array is\njust good enough", "start": 1134.98, "duration": 2.01}, {"text": "if you don't need to\nchange what they are.", "start": 1136.99, "duration": 2.61}, {"text": "So that's a quick overview of\nquiz 1-type data structures", "start": 1139.6, "duration": 7.47}, {"text": "material.", "start": 1147.07, "duration": 1.32}, {"text": "But then we used most\nof these data structures", "start": 1148.39, "duration": 3.36}, {"text": "to get faster sorting algorithms\nin different contexts.", "start": 1151.75, "duration": 3.335}, {"text": "Basically, everything\non this list", "start": 1158.76, "duration": 2.25}, {"text": "involved making a data structure\nand exploiting that data", "start": 1161.01, "duration": 4.65}, {"text": "structure to get a\nbetter running time,", "start": 1165.66, "duration": 1.8}, {"text": "all except for\nmerge sort, really.", "start": 1167.46, "duration": 3.32}, {"text": "The first two we presented\nin terms of a priority queue,", "start": 1170.78, "duration": 4.95}, {"text": "whether we used a sorted\narray or an array.", "start": 1175.73, "duration": 2.97}, {"text": "We represented it at\nthe end of lecture eight", "start": 1178.7, "duration": 6.1}, {"text": "to get n-squared running time.", "start": 1184.8, "duration": 1.8}, {"text": "We generalized that down\nto n log n by using a heap.", "start": 1186.6, "duration": 3.78}, {"text": "That was a nice optimization.", "start": 1190.38, "duration": 2.1}, {"text": "But we also got interesting\ndata structures using an--", "start": 1192.48, "duration": 4.38}, {"text": "I mean, interesting sorting\nalgorithms using an AVL tree", "start": 1196.86, "duration": 3.87}, {"text": "because of the\npower of maintaining", "start": 1200.73, "duration": 1.98}, {"text": "a dynamic order over time.", "start": 1202.71, "duration": 2.58}, {"text": "But then exploiting a direct\naccess array to be able to sort", "start": 1205.29, "duration": 5.79}, {"text": "in linear time for\nsmall-bounded--", "start": 1211.08, "duration": 3.78}, {"text": "bounded in terms of\nthe input, polynomially", "start": 1214.86, "duration": 2.67}, {"text": "bounded in terms of the\ninput-- ranges of numbers.", "start": 1217.53, "duration": 3.09}, {"text": "So we leverage that direct axis\narray to get counting sort.", "start": 1220.62, "duration": 5.13}, {"text": "And then we kind of\namplified that effect", "start": 1225.75, "duration": 4.56}, {"text": "by sorting on a bunch\nof digits multiple times", "start": 1230.31, "duration": 4.08}, {"text": "to get basically polynomial\nblow-up in terms of the numbers", "start": 1234.39, "duration": 4.53}, {"text": "that we could sort\nin linear time.", "start": 1238.92, "duration": 2.65}, {"text": "So that's an overview of\nthe content of quiz 1.", "start": 1241.57, "duration": 4.956}, {"text": "In quiz 2, we were kind\nof like, OK, now you", "start": 1246.526, "duration": 4.954}, {"text": "know how to find things\nwithin a set of just", "start": 1251.48, "duration": 5.73}, {"text": "a flat list of things, you can\nput it in a data structure.", "start": 1257.21, "duration": 3.21}, {"text": "But in a sense, a graph is a\nspecial kind of data structure", "start": 1260.42, "duration": 4.29}, {"text": "that relates the different\nthings in your input.", "start": 1264.71, "duration": 4.23}, {"text": "So if you've got a\nbunch of vertices,", "start": 1268.94, "duration": 5.13}, {"text": "there's a relation now\nbetween those vertices", "start": 1274.07, "duration": 3.03}, {"text": "that are your edges.", "start": 1277.1, "duration": 1.3}, {"text": "And this is a super\nuseful framework", "start": 1278.4, "duration": 2.24}, {"text": "in talking about\ndiscrete systems,", "start": 1280.64, "duration": 2.34}, {"text": "because you can\nthink of a vertex", "start": 1282.98, "duration": 2.07}, {"text": "as a state of your system, and\nthen connect these transitions", "start": 1285.05, "duration": 4.11}, {"text": "as a graph.", "start": 1289.16, "duration": 1.26}, {"text": "That's the reason why--", "start": 1290.42, "duration": 2.61}, {"text": "I mean, graphs are\nawesome, but they're", "start": 1293.03, "duration": 2.94}, {"text": "awesome because they\ncan be used to model", "start": 1295.97, "duration": 2.17}, {"text": "so many different\nthings within our world.", "start": 1298.14, "duration": 2.45}, {"text": "It's not just about\nroad networks.", "start": 1300.59, "duration": 3.9}, {"text": "It can also be about playing\nyour favorite turn-based game,", "start": 1304.49, "duration": 5.38}, {"text": "like Tilt.", "start": 1309.87, "duration": 1.8}, {"text": "OK, so we talked about a lot\nof different types of problems", "start": 1311.67, "duration": 3.86}, {"text": "that you could solve,\nvarious algorithms,", "start": 1315.53, "duration": 1.8}, {"text": "with a focus on a bunch of\ndifferent ways of solving", "start": 1317.33, "duration": 3.96}, {"text": "single-source shortest paths.", "start": 1321.29, "duration": 2.34}, {"text": "And again, just like\nthe sorting algorithms", "start": 1323.63, "duration": 1.943}, {"text": "and just like the\ndata structures,", "start": 1325.573, "duration": 1.417}, {"text": "we presented multiple\nof them, because we", "start": 1326.99, "duration": 3.93}, {"text": "had this trade-off of\ngenerality of the graph", "start": 1330.92, "duration": 3.39}, {"text": "that they apply to contrasted\nwith the running time.", "start": 1334.31, "duration": 4.93}, {"text": "So I guess, in\nparticular, the top line", "start": 1339.24, "duration": 7.55}, {"text": "there is, in some sense,\nthe most restrictive.", "start": 1346.79, "duration": 2.82}, {"text": "We don't have any\ncycles in our graph.", "start": 1349.61, "duration": 1.89}, {"text": "That's a very special\ntype of graph,", "start": 1351.5, "duration": 1.5}, {"text": "and we're able to\nget linear time.", "start": 1353.0, "duration": 3.08}, {"text": "But then even if we do\nhave cycles in our graph,", "start": 1356.08, "duration": 2.1}, {"text": "we can do better if we\nhave a bound on the weights", "start": 1358.18, "duration": 3.24}, {"text": "in our thing, whether they be--", "start": 1361.42, "duration": 3.84}, {"text": "there's an easy conversion\nto a linear time algorithm", "start": 1365.26, "duration": 2.49}, {"text": "via an unweighted process,\nor whether these things are", "start": 1367.75, "duration": 3.42}, {"text": "non-negative, so there can't\nbe negative weight cycles,", "start": 1371.17, "duration": 2.31}, {"text": "and we don't have\nto deal with that.", "start": 1373.48, "duration": 1.56}, {"text": "OK, so that's quiz 2 material.", "start": 1375.04, "duration": 3.93}, {"text": "And then quiz 3\nmaterial was kind", "start": 1378.97, "duration": 3.3}, {"text": "of applying this graph material\nto a recursive framework.", "start": 1382.27, "duration": 5.64}, {"text": "What was our\nrecursive framework?", "start": 1387.91, "duration": 1.53}, {"text": "Everyone say it with me.", "start": 1389.44, "duration": 1.14}, {"text": "AUDIENCE: Dynamic programming.", "start": 1390.58, "duration": 1.1}, {"text": "JASON KU: Dynamic\nprogramming, and the framework", "start": 1391.68, "duration": 2.0}, {"text": "was SRT BOT, right?", "start": 1393.68, "duration": 2.09}, {"text": "Missing a letter,\nbut SORT BOT, right?", "start": 1395.77, "duration": 2.94}, {"text": "You can actually\nthink of the quiz 3", "start": 1398.71, "duration": 2.97}, {"text": "material as really an\napplication of the graph", "start": 1401.68, "duration": 4.92}, {"text": "material.", "start": 1406.6, "duration": 2.26}, {"text": "What are we doing in SORT BOT?", "start": 1408.86, "duration": 2.18}, {"text": "We're defining a\nset of subproblems.", "start": 1411.04, "duration": 3.31}, {"text": "These are a set of\nvertices in a graph.", "start": 1414.35, "duration": 2.97}, {"text": "What is the relationship doing?", "start": 1417.32, "duration": 1.92}, {"text": "It's saying, what\nare the relation", "start": 1419.24, "duration": 3.93}, {"text": "between the\nsubproblems, essentially", "start": 1423.17, "duration": 2.31}, {"text": "defining the edges of a graph?", "start": 1425.48, "duration": 3.29}, {"text": "And then this topological\norder and the base cases,", "start": 1428.77, "duration": 3.81}, {"text": "all of these things\nare just saying,", "start": 1432.58, "duration": 1.89}, {"text": "what is the problem that I\nwant to solve on this graph?", "start": 1434.47, "duration": 2.73}, {"text": "And how do I compute\nthat for things that", "start": 1437.2, "duration": 4.38}, {"text": "don't have any outgoing edges?", "start": 1441.58, "duration": 3.09}, {"text": "I need to start writing\non the board again.", "start": 1444.67, "duration": 2.28}, {"text": "This is graphs.", "start": 1446.95, "duration": 2.64}, {"text": "There was sorting in here, too.", "start": 1449.59, "duration": 5.34}, {"text": "This is basically\nan application.", "start": 1454.93, "duration": 1.8}, {"text": "OK, graphs was\nbasically a relationship", "start": 1461.07, "duration": 3.31}, {"text": "on these non-constant things.", "start": 1464.38, "duration": 1.95}, {"text": "So this was kind of\nlike useful black boxes", "start": 1470.16, "duration": 5.54}, {"text": "that you can just bundle up\nand stick in some inputs,", "start": 1475.7, "duration": 4.03}, {"text": "stick out some outputs,\nand you're golden.", "start": 1479.73, "duration": 3.47}, {"text": "Whereas quiz 3 was\nvery different,", "start": 1483.2, "duration": 2.79}, {"text": "the material in quiz\n3 is very different.", "start": 1485.99, "duration": 1.74}, {"text": "Dynamic programming, while\nit was, in some sense,", "start": 1487.73, "duration": 11.76}, {"text": "related to this graph material--", "start": 1499.49, "duration": 1.43}, {"text": "I'm constructing a graph--", "start": 1500.92, "duration": 1.98}, {"text": "I have to construct that graph.", "start": 1502.9, "duration": 1.71}, {"text": "There's a creative process in\ntrying to construct that graph.", "start": 1504.61, "duration": 4.05}, {"text": "I don't give you\na set of vertices.", "start": 1508.66, "duration": 1.53}, {"text": "Usually what I give\nyou are a set of--", "start": 1510.19, "duration": 3.99}, {"text": "a sequence or\nsomething like that.", "start": 1514.18, "duration": 1.59}, {"text": "And you have to construct\nvertices, subproblems,", "start": 1515.77, "duration": 4.07}, {"text": "that will be able to be\nrelated in a recursive way", "start": 1519.84, "duration": 3.03}, {"text": "so you can solve the problem.", "start": 1522.87, "duration": 1.42}, {"text": "This is a very much\nmore difficult thing", "start": 1524.29, "duration": 3.05}, {"text": "than these other\nthings, I think,", "start": 1527.34, "duration": 1.86}, {"text": "because there's a lot\nmore creativity in this.", "start": 1529.2, "duration": 3.36}, {"text": "In the same way\nthat just applying--", "start": 1532.56, "duration": 2.97}, {"text": "reducing to the graph algorithms\nwe have is fairly easy.", "start": 1535.53, "duration": 4.3}, {"text": "But actually doing some\ngraph transformations", "start": 1539.83, "duration": 3.08}, {"text": "to change the shape\nof the graph so", "start": 1542.91, "duration": 1.98}, {"text": "that you can apply\nthese algorithms, that's", "start": 1544.89, "duration": 2.25}, {"text": "a harder thing to do.", "start": 1547.14, "duration": 3.18}, {"text": "The difficulty with these\ntwo sets of materials", "start": 1550.32, "duration": 3.21}, {"text": "is very similar.", "start": 1553.53, "duration": 1.65}, {"text": "Figuring out what\nthe graph should be,", "start": 1555.18, "duration": 1.778}, {"text": "figuring out what the\nsubproblems should be", "start": 1556.958, "duration": 1.792}, {"text": "and how they relate, is really\nthe entire part of the--", "start": 1558.75, "duration": 3.846}, {"text": "the entire difficulty with\nsolving problems recursively.", "start": 1562.596, "duration": 4.794}, {"text": "And we've only given you a\ntaste of solving problems", "start": 1567.39, "duration": 2.82}, {"text": "recursively.", "start": 1570.21, "duration": 2.26}, {"text": "In future classes,\nlike 6.046, which", "start": 1572.47, "duration": 4.83}, {"text": "is the follow-on to this one in\nthe undergraduate curriculum,", "start": 1577.3, "duration": 4.19}, {"text": "this is all about\nintroduction to algorithms.", "start": 1581.49, "duration": 2.15}, {"text": "The next one's about design\nand analysis of algorithms.", "start": 1583.64, "duration": 3.57}, {"text": "It's quite a bit more\ndifficult, because we've mostly", "start": 1587.21, "duration": 6.92}, {"text": "left it to you to use the\nthings that we gave you", "start": 1594.13, "duration": 5.58}, {"text": "or make your own\nalgorithms based", "start": 1599.71, "duration": 2.64}, {"text": "on this very nice\ncookbook-like framework", "start": 1602.35, "duration": 4.56}, {"text": "that you can plug in a\nrecursive algorithm to.", "start": 1606.91, "duration": 2.7}, {"text": "Now actually, that\ncookbook is super", "start": 1609.61, "duration": 1.71}, {"text": "nice for any way of looking\nat a problem recursively,", "start": 1611.32, "duration": 4.89}, {"text": "but while in\ndynamic programming,", "start": 1616.21, "duration": 7.09}, {"text": "the inductive hypothesis of\ncombining your subproblems", "start": 1623.3, "duration": 5.43}, {"text": "is almost trivial,\nin other types", "start": 1628.73, "duration": 4.12}, {"text": "of recursive algorithms, that's\nnot necessarily the case.", "start": 1632.85, "duration": 4.27}, {"text": "Especially when\ninstead of looking", "start": 1637.12, "duration": 2.0}, {"text": "at all possible\nchoices, for example,", "start": 1639.12, "duration": 3.44}, {"text": "in a greedy algorithm\nwhere you're just", "start": 1642.56, "duration": 1.82}, {"text": "looking at one of the choices,\nthe locally best thing,", "start": 1644.38, "duration": 3.24}, {"text": "and recursing forward, you're\nnot doing all the work.", "start": 1647.62, "duration": 3.93}, {"text": "You're not locally\nbrute-forcing.", "start": 1651.55, "duration": 1.5}, {"text": "Your locally picking an optimal\nthing locally and hoping that", "start": 1653.05, "duration": 4.02}, {"text": "will lead you to good thing.", "start": 1657.07, "duration": 1.56}, {"text": "That's a much harder algorithmic\nparadigm to operate under.", "start": 1658.63, "duration": 5.88}, {"text": "And so that's more\nlike the material", "start": 1664.51, "duration": 2.61}, {"text": "that you'll be talking\nabout in 6.046.", "start": 1667.12, "duration": 3.06}, {"text": "So that's 006, a very quick\noverview of the content of this", "start": 1670.18, "duration": 9.38}, {"text": "class.", "start": 1679.56, "duration": 1.24}, {"text": "And we really like the structure\nof how this class is laid out,", "start": 1680.8, "duration": 4.43}, {"text": "because it gives you a\nfundamental idea of the things", "start": 1685.23, "duration": 2.91}, {"text": "people use to store information\non a computer and a sense", "start": 1688.14, "duration": 5.85}, {"text": "of how you solve\nproblems computationally", "start": 1693.99, "duration": 2.7}, {"text": "and how to argue that they're\ncorrect and efficient.", "start": 1696.69, "duration": 3.09}, {"text": "That's really what\nthis problem--", "start": 1699.78, "duration": 1.86}, {"text": "this course is about.", "start": 1701.64, "duration": 4.01}, {"text": "And if you feel like you\nenjoy this kind of stuff,", "start": 1705.65, "duration": 4.73}, {"text": "that's where you\ngo to take 6.046.", "start": 1710.38, "duration": 4.68}, {"text": "And 6.046 was actually\nthe first algorithms class", "start": 1715.06, "duration": 4.02}, {"text": "I ever took here at MIT,\nas a grad student actually.", "start": 1719.08, "duration": 4.665}, {"text": "This was hard for me.", "start": 1726.37, "duration": 2.94}, {"text": "It's actually hard to look at\nthese problems, these types,", "start": 1729.31, "duration": 4.08}, {"text": "and think in a\ncomputational way,", "start": 1733.39, "duration": 2.01}, {"text": "especially having not\ntaken this class, 6.006.", "start": 1735.4, "duration": 4.05}, {"text": "So hopefully you guys are\nall in a better position", "start": 1739.45, "duration": 2.97}, {"text": "than I was when I took it.", "start": 1742.42, "duration": 2.09}, {"text": "There's two ways I like to\nthink of the content in 6.046.", "start": 1744.51, "duration": 4.77}, {"text": "One is kind of just as\nan extension of 006.", "start": 1749.28, "duration": 3.6}, {"text": "It's the natural\nfollow-on to the things", "start": 1752.88, "duration": 1.92}, {"text": "that we do in this class.", "start": 1754.8, "duration": 1.77}, {"text": "They still talk about\ndata structures.", "start": 1756.57, "duration": 2.677}, {"text": "This isn't the core part of\n046, but they do touch on data", "start": 1763.15, "duration": 4.88}, {"text": "structures for\nmore complicated--", "start": 1768.03, "duration": 3.15}, {"text": "that have more complicated\nanalyses involved in them.", "start": 1771.18, "duration": 2.79}, {"text": "It's really about--\nusually in 046,", "start": 1773.97, "duration": 4.02}, {"text": "stating what the algorithm\nis doing is not so hard.", "start": 1777.99, "duration": 4.93}, {"text": "Basically, giving\nyou the algorithm,", "start": 1782.92, "duration": 3.06}, {"text": "number one here, is\nnot so difficult,", "start": 1785.98, "duration": 3.21}, {"text": "to state what's happening\nin the algorithm.", "start": 1789.19, "duration": 3.24}, {"text": "But the number two\nand number three here,", "start": 1792.43, "duration": 3.3}, {"text": "arguing that that thing is\ncorrect and arguing that thing", "start": 1795.73, "duration": 3.33}, {"text": "is efficient, that's where the\ncomplexity comes in in 046.", "start": 1799.06, "duration": 5.37}, {"text": "The analysis part is quite a\nbit more complicated in 046 than", "start": 1804.43, "duration": 3.93}, {"text": "in 006.", "start": 1808.36, "duration": 1.56}, {"text": "So they solve a problem called\nunion-find and give a much--", "start": 1809.92, "duration": 7.32}, {"text": "we talked a little bit\nabout amortization.", "start": 1817.24, "duration": 2.46}, {"text": "This goes into a much better-- a\nmuch more formal way of proving", "start": 1819.7, "duration": 4.59}, {"text": "things run in amortized time.", "start": 1824.29, "duration": 5.55}, {"text": "So this is basically\namortization via what", "start": 1829.84, "duration": 8.85}, {"text": "we call a potential analysis.", "start": 1838.69, "duration": 1.68}, {"text": "It's basically\nmaking that notion", "start": 1846.03, "duration": 5.022}, {"text": "that we talked about\nwhen we were talking", "start": 1851.052, "duration": 1.708}, {"text": "about dynamic arrays of, we're\nnot doing this expensive thing", "start": 1852.76, "duration": 4.38}, {"text": "too often.", "start": 1857.14, "duration": 1.17}, {"text": "Basically what we\ndo is we keep track", "start": 1858.31, "duration": 1.86}, {"text": "of the cost of all\nsequence of operations", "start": 1860.17, "duration": 2.97}, {"text": "and prove that the\naverage cost is small.", "start": 1863.14, "duration": 3.6}, {"text": "That's kind of what this\npotential analysis is doing.", "start": 1866.74, "duration": 3.498}, {"text": "It's a little bit\nmore formal process", "start": 1870.238, "duration": 1.542}, {"text": "for making that argument\na little more formal.", "start": 1871.78, "duration": 3.99}, {"text": "Right.", "start": 1875.77, "duration": 0.5}, {"text": "OK.", "start": 1876.27, "duration": 0.5}, {"text": "So then on the\ngraph side, this is", "start": 1876.77, "duration": 2.57}, {"text": "kind of an extension of\nquiz 1-type material.", "start": 1879.34, "duration": 3.27}, {"text": "This is, what is this\nunion-find data structure?", "start": 1882.61, "duration": 2.53}, {"text": "It's basically-- it's\na set type thing, where", "start": 1885.14, "duration": 6.26}, {"text": "I can make a set of\njust a single element,", "start": 1891.4, "duration": 5.9}, {"text": "I can take two sets, merge\nthem together, make them", "start": 1897.3, "duration": 4.92}, {"text": "their union, and then\ngiven an object, I say,", "start": 1902.22, "duration": 5.22}, {"text": "which set am I part of,\nessentially by electing", "start": 1907.44, "duration": 4.53}, {"text": "a leader within\na set and saying,", "start": 1911.97, "duration": 1.95}, {"text": "return me a pointer to that one.", "start": 1913.92, "duration": 3.36}, {"text": "And so this can be useful\nin dynamically maintaining,", "start": 1917.28, "duration": 3.45}, {"text": "say, the connected components\nin a dynamically changing graph", "start": 1920.73, "duration": 5.04}, {"text": "supporting the query of,\nam I in the same component", "start": 1925.77, "duration": 3.75}, {"text": "as this other guy?", "start": 1929.52, "duration": 1.83}, {"text": "That could be a very useful\nthing to know about a graph", "start": 1931.35, "duration": 2.52}, {"text": "as it's changing.", "start": 1933.87, "duration": 0.93}, {"text": "So that's an application\nof this problem.", "start": 1934.8, "duration": 2.34}, {"text": "And they get\nnear-constant performance", "start": 1937.14, "duration": 3.18}, {"text": "for a lot of these queries.", "start": 1940.32, "duration": 1.68}, {"text": "It's not quite,\nbut pretty close.", "start": 1942.0, "duration": 3.36}, {"text": "OK, on the graph\nside, they solve", "start": 1945.36, "duration": 2.01}, {"text": "a number of very useful\nproblems on graphs.", "start": 1947.37, "duration": 4.98}, {"text": "Minimum Spanning\nTree-- so I'm trying", "start": 1952.35, "duration": 3.42}, {"text": "to find a tree connecting\nall of the vertices", "start": 1955.77, "duration": 3.96}, {"text": "in a connected\ncomponent of my graph.", "start": 1959.73, "duration": 2.46}, {"text": "And I'm trying to find--\nin a weighted graph,", "start": 1962.19, "duration": 1.98}, {"text": "I'm trying to find\nthe spanning tree that", "start": 1964.17, "duration": 2.79}, {"text": "has minimum total weight.", "start": 1966.96, "duration": 2.28}, {"text": "So that's a problem--", "start": 1969.24, "duration": 1.78}, {"text": "a fundamental problem in\nweighted-graph algorithms.", "start": 1971.02, "duration": 4.61}, {"text": "They've solved this\nvia a greedy algorithm.", "start": 1975.63, "duration": 4.05}, {"text": "And network flows\nand I guess cuts.", "start": 1979.68, "duration": 10.68}, {"text": "So this is-- what is this?", "start": 1990.36, "duration": 1.67}, {"text": "This is, I'm given\na weighted graph.", "start": 1992.03, "duration": 3.81}, {"text": "Basically, each of the weights\ncorrespond to a capacity.", "start": 1995.84, "duration": 5.28}, {"text": "I could push water\nthrough along this edge.", "start": 2001.12, "duration": 2.76}, {"text": "And I may be given a source\nvertex and a sink vertex.", "start": 2003.88, "duration": 4.95}, {"text": "And I want to say, I\nwant to shove water", "start": 2008.83, "duration": 2.67}, {"text": "through the source\nvertex along the edges", "start": 2011.5, "duration": 4.32}, {"text": "with their various capacities.", "start": 2015.82, "duration": 2.07}, {"text": "And I'll get some\namount of water", "start": 2017.89, "duration": 2.25}, {"text": "on the other end in the source.", "start": 2020.14, "duration": 3.0}, {"text": "So the question is, what's\nthe most amount of water", "start": 2023.14, "duration": 3.332}, {"text": "that I can push through this?", "start": 2026.472, "duration": 1.208}, {"text": "Well, I could build\nthat pipe network", "start": 2027.68, "duration": 2.963}, {"text": "with the different things and\njust do this experimentally.", "start": 2030.643, "duration": 2.417}, {"text": "I just stick a bunch of--", "start": 2033.06, "duration": 1.96}, {"text": "maybe-- I'm a\nmechanical engineer,", "start": 2035.02, "duration": 1.8}, {"text": "so that maybe makes sense to me.", "start": 2036.82, "duration": 1.62}, {"text": "But you want to be able to\njust look at those numbers", "start": 2038.44, "duration": 2.76}, {"text": "and be able to tell me how\nmuch water can I push through.", "start": 2041.2, "duration": 3.06}, {"text": "That's what the max flow in\na network is talking about.", "start": 2044.26, "duration": 4.47}, {"text": "And we give you some polynomial\ntime algorithms in this class,", "start": 2048.73, "duration": 3.33}, {"text": "basically incremental algorithms\nthat, kind of like Dijkstra,", "start": 2052.06, "duration": 4.26}, {"text": "or kind of like Bellman-Ford,\nwill incrementally update", "start": 2056.32, "duration": 5.76}, {"text": "estimates to--", "start": 2062.08, "duration": 3.24}, {"text": "of a max flow and\nimprove them over time.", "start": 2065.32, "duration": 3.629}, {"text": "Then on the, basically,\ndesign paradigms,", "start": 2071.98, "duration": 10.5}, {"text": "you've got more involved making\nyour own divide-and-conquer", "start": 2082.48, "duration": 4.11}, {"text": "algorithms, dynamic programming\nalgorithms, greedy algorithms.", "start": 2086.59, "duration": 11.34}, {"text": "Basically, they go\na lot more in depth", "start": 2097.93, "duration": 2.97}, {"text": "in terms of how to design these\nalgorithms and these paradigms", "start": 2100.9, "duration": 3.39}, {"text": "than we do in this class.", "start": 2104.29, "duration": 2.79}, {"text": "And then the last thing is--", "start": 2107.08, "duration": 3.09}, {"text": "we only touched on complexity.", "start": 2110.17, "duration": 3.81}, {"text": "And in a sense, 046 is only\ngoing to touch on complexity.", "start": 2113.98, "duration": 4.42}, {"text": "It's a very big field.", "start": 2118.4, "duration": 2.12}, {"text": "But it will give\nyou the tools to be", "start": 2120.52, "duration": 3.59}, {"text": "able to prove that something is\nNP-hard, whereas we just kind", "start": 2124.11, "duration": 4.02}, {"text": "of say that, oh, there's this\nthing called a reduction.", "start": 2128.13, "duration": 3.96}, {"text": "We didn't give you any\nproblems in which you actually", "start": 2132.09, "duration": 4.23}, {"text": "had to reduce one\nproblem to another.", "start": 2136.32, "duration": 2.29}, {"text": "And you'll do a lot\nmore of that here.", "start": 2138.61, "duration": 2.13}, {"text": "So, reductions.", "start": 2140.74, "duration": 3.62}, {"text": "So in a big sense, 046 is\nreally just a natural extension", "start": 2144.36, "duration": 8.06}, {"text": "to the 006 material, plus\nsome additional stuff,", "start": 2152.42, "duration": 3.307}, {"text": "which I'm going to\nget to in a second.", "start": 2155.727, "duration": 1.583}, {"text": "Yeah, question?", "start": 2157.31, "duration": 0.63}, {"text": "AUDIENCE: Do you want\nto add randomization", "start": 2157.94, "duration": 1.75}, {"text": "for time paradigms?", "start": 2159.69, "duration": 1.67}, {"text": "JASON KU: I'm going\nto talk about that", "start": 2161.36, "duration": 1.89}, {"text": "slightly in a separate--", "start": 2163.25, "duration": 2.43}, {"text": "I'll get to your question\nin just a second.", "start": 2165.68, "duration": 1.98}, {"text": "I like to think of it as\na separate topic, which", "start": 2167.66, "duration": 3.75}, {"text": "I will go into right now.", "start": 2171.41, "duration": 2.19}, {"text": "The separate topic I like\nto think of it as, instead", "start": 2173.6, "duration": 3.3}, {"text": "of being the natural extension\nto the things in the 006 units,", "start": 2176.9, "duration": 6.14}, {"text": "what I'm going to do is kind\nof relax either what it means", "start": 2183.04, "duration": 5.8}, {"text": "to have a correct algorithm\nor relax what it means to--", "start": 2188.84, "duration": 4.315}, {"text": "what my model of computation is.", "start": 2195.78, "duration": 3.33}, {"text": "So 006, this is kind of\nas an extension of 006.", "start": 2199.11, "duration": 12.19}, {"text": "And this is kind of\nlike 6.046 as change", "start": 2211.3, "duration": 11.67}, {"text": "my definition of what it means\nto be correct or efficient.", "start": 2222.97, "duration": 3.904}, {"text": "So we've already kind of done\nthis a little bit in 006.", "start": 2230.59, "duration": 10.9}, {"text": "Basically, one of the\nthings that we can do,", "start": 2241.49, "duration": 2.05}, {"text": "which is what the question\nthat a student asked a question", "start": 2243.54, "duration": 3.47}, {"text": "about, was about\nrandomized algorithms,", "start": 2247.01, "duration": 2.1}, {"text": "which is a big part\nof 046 actually--", "start": 2249.11, "duration": 3.69}, {"text": "randomized analysis\nof algorithms", "start": 2252.8, "duration": 3.81}, {"text": "that are not deterministic.", "start": 2256.61, "duration": 1.8}, {"text": "It's not guaranteed that\nit'll give you the same output", "start": 2258.41, "duration": 2.73}, {"text": "every time or not\nguaranteed that it", "start": 2261.14, "duration": 2.79}, {"text": "will do the same\ncomputations over the course", "start": 2263.93, "duration": 2.94}, {"text": "of the algorithm every time.", "start": 2266.87, "duration": 1.8}, {"text": "But it exploits\nsome randomization.", "start": 2268.67, "duration": 2.01}, {"text": "And in 006, this is--", "start": 2281.65, "duration": 2.34}, {"text": "we've mostly not touched on\nthis, except in one area.", "start": 2283.99, "duration": 3.54}, {"text": "Where did we use randomization?", "start": 2287.53, "duration": 2.67}, {"text": "In hashing, right?", "start": 2290.2, "duration": 2.07}, {"text": "When we used hashing,\nwhat were we doing?", "start": 2292.27, "duration": 3.81}, {"text": "We changed the definition\nof correct versus efficient.", "start": 2296.08, "duration": 3.15}, {"text": "We didn't really change the\ndefinition, what we did was", "start": 2299.23, "duration": 2.97}, {"text": "we said that it was OK that\nsometimes our algorithm was", "start": 2302.2, "duration": 4.5}, {"text": "slower than we--", "start": 2306.7, "duration": 2.56}, {"text": "than on-- in expectation.", "start": 2309.26, "duration": 2.94}, {"text": "That's what we meant there.", "start": 2312.2, "duration": 1.73}, {"text": "We're relaxing the\nidea of efficient,", "start": 2313.93, "duration": 2.92}, {"text": "but we're still saying\nit's good, because most", "start": 2316.85, "duration": 1.98}, {"text": "of the time it is good.", "start": 2318.83, "duration": 2.22}, {"text": "So there's two types of\nrandomized algorithms.", "start": 2321.05, "duration": 3.81}, {"text": "They have these\nweird names based", "start": 2324.86, "duration": 2.34}, {"text": "on betting regions of\nthe world, shall we say?", "start": 2327.2, "duration": 4.86}, {"text": "There are-- this is L-O?", "start": 2332.06, "duration": 5.998}, {"text": "Los Vegas?", "start": 2338.058, "duration": 1.302}, {"text": "It is Las, OK, Vegas algorithms.", "start": 2339.36, "duration": 5.31}, {"text": "These are always correct,\nbut probably efficient.", "start": 2344.67, "duration": 9.308}, {"text": "In a sense, that's\nwhat hashing is.", "start": 2358.86, "duration": 3.12}, {"text": "I'm always going to give\nyou the right thing,", "start": 2361.98, "duration": 3.12}, {"text": "whether this thing\nis in my set or not.", "start": 2365.1, "duration": 2.04}, {"text": "But some of the time,\nit's inefficient.", "start": 2367.14, "duration": 3.27}, {"text": "I have to look through\na chain of length", "start": 2370.41, "duration": 2.46}, {"text": "of-- that's linear in the size\nof the things that I'm storing.", "start": 2372.87, "duration": 3.24}, {"text": "And this is in contrast to\na Monte Carlo algorithm,", "start": 2376.11, "duration": 7.78}, {"text": "which is always efficient for\nsome definition of efficient,", "start": 2383.89, "duration": 8.21}, {"text": "but only probably correct.", "start": 2392.1, "duration": 1.74}, {"text": "And I mean, I could define you a\nhash table that has Monte Carlo", "start": 2398.64, "duration": 4.53}, {"text": "semantics instead.", "start": 2403.17, "duration": 1.74}, {"text": "Say, for example, I\nsay that I'm going--", "start": 2404.91, "duration": 3.925}, {"text": "it's going to be exactly\nthe same as a hash table,", "start": 2408.835, "duration": 2.925}, {"text": "except instead of storing\nall the things that", "start": 2411.76, "duration": 2.4}, {"text": "collide in a place, I just\nstore the first two, say.", "start": 2414.16, "duration": 4.29}, {"text": "Well, actually, that's actually\ngoing to be always efficient.", "start": 2421.75, "duration": 3.15}, {"text": "I'm going to look\nthrough the things", "start": 2424.9, "duration": 1.5}, {"text": "and see if it's in there.", "start": 2426.4, "duration": 2.72}, {"text": "And the chains that I'm storing\nthere only have two things.", "start": 2429.12, "duration": 3.393}, {"text": "It's going to be\nalways efficient.", "start": 2432.513, "duration": 1.417}, {"text": "It's always going to\ngive me constant time.", "start": 2433.93, "duration": 2.22}, {"text": "But some of the time, it's\ngoing to be the wrong thing,", "start": 2436.15, "duration": 2.51}, {"text": "because I'm not storing\neverything in that chain.", "start": 2438.66, "duration": 2.97}, {"text": "So there's some probability that\nthat's not going to be correct.", "start": 2441.63, "duration": 3.57}, {"text": "And so that's a\ndifferent kind of--", "start": 2445.2, "duration": 2.28}, {"text": "maybe I want my hash\ntables to always be fast,", "start": 2447.48, "duration": 2.85}, {"text": "but I can afford to be\nwrong some of the time.", "start": 2450.33, "duration": 4.018}, {"text": "I don't know.", "start": 2454.348, "duration": 0.542}, {"text": "In practice, this is actually\nsometimes a good trade-off", "start": 2454.89, "duration": 3.0}, {"text": "in real systems.", "start": 2457.89, "duration": 2.01}, {"text": "Sometimes it's OK to be\nwrong some of the times,", "start": 2459.9, "duration": 2.59}, {"text": "if we get good performance.", "start": 2462.49, "duration": 2.74}, {"text": "OK, but generally can do better\nif you allow randomization.", "start": 2465.23, "duration": 18.54}, {"text": "And by better I mean, usually\nwe can get faster bounds", "start": 2483.77, "duration": 4.35}, {"text": "on a lot of problems if we allow\nrandomization and things aren't", "start": 2488.12, "duration": 4.65}, {"text": "necessarily always correct\nor always efficient.", "start": 2492.77, "duration": 3.9}, {"text": "So this is a big area in\n046 that requires a lot more", "start": 2496.67, "duration": 5.46}, {"text": "analysis using randomness\nand probability.", "start": 2502.13, "duration": 5.49}, {"text": "So if you need some\nprimers on that--", "start": 2507.62, "duration": 5.29}, {"text": "we didn't have a lot of this in\n006, but if you go on to 046,", "start": 2512.91, "duration": 4.735}, {"text": "that's going to be a really\nimportant thing for you", "start": 2517.645, "duration": 2.125}, {"text": "to brush up on.", "start": 2519.77, "duration": 2.37}, {"text": "The next part on 006 is kind\nof changing what our definition", "start": 2522.14, "duration": 5.97}, {"text": "of correct or efficient means.", "start": 2528.11, "duration": 2.1}, {"text": "I mean, we've\nrestricted ourselves", "start": 2530.21, "duration": 2.64}, {"text": "in this class to a class\nof problems where we only", "start": 2532.85, "duration": 3.27}, {"text": "talk about integers.", "start": 2536.12, "duration": 2.91}, {"text": "But there's tons of\nproblems in this world,", "start": 2539.03, "duration": 1.87}, {"text": "especially in\nscientific computing,", "start": 2540.9, "duration": 2.0}, {"text": "where I want to be able to find\nout what this real number is.", "start": 2542.9, "duration": 5.61}, {"text": "And I can't even store a\nreal number on my computer.", "start": 2548.51, "duration": 3.44}, {"text": "So what the hell, Jason?", "start": 2551.95, "duration": 1.51}, {"text": "What are you talking about?", "start": 2553.46, "duration": 2.25}, {"text": "I can't do that on a computer.", "start": 2555.71, "duration": 1.71}, {"text": "But what I can do is\nbasically compute things", "start": 2557.42, "duration": 4.26}, {"text": "in a numerical sense--\nnumerical algorithms.", "start": 2561.68, "duration": 4.11}, {"text": "And in 046, a lot of times\nwe put this in the context", "start": 2569.02, "duration": 3.69}, {"text": "of continuous optimization,\ncontinuous being the opportune", "start": 2572.71, "duration": 9.18}, {"text": "word here, not discrete systems.", "start": 2581.89, "duration": 1.86}, {"text": "You have a continuum of\npossible solutions, real numbers", "start": 2583.75, "duration": 4.47}, {"text": "essentially.", "start": 2588.22, "duration": 1.71}, {"text": "How do we do this on a computer\nthat's a discrete system?", "start": 2589.93, "duration": 2.415}, {"text": "Basically, in 046\nwhat you can do,", "start": 2596.35, "duration": 4.2}, {"text": "and in other numerical methods\nclasses, what you can say is,", "start": 2600.55, "duration": 3.87}, {"text": "well, I know that you can't\nreturn me a real number.", "start": 2604.42, "duration": 3.87}, {"text": "I got that.", "start": 2608.29, "duration": 0.63}, {"text": "Or you can maybe have\na model of computation", "start": 2608.92, "duration": 2.97}, {"text": "that allows integers\nto represent", "start": 2611.89, "duration": 2.88}, {"text": "other kinds of real numbers,\nlike radicals or rationals", "start": 2614.77, "duration": 3.632}, {"text": "or something like that.", "start": 2618.402, "duration": 0.958}, {"text": "And I can do\nmanipulations on those.", "start": 2619.36, "duration": 1.86}, {"text": "But really what these\nalgorithms are usually about", "start": 2621.22, "duration": 2.82}, {"text": "is computing real\nnumbers not completely,", "start": 2624.04, "duration": 4.62}, {"text": "but to some bounded precision.", "start": 2628.66, "duration": 2.91}, {"text": "And I pay for that precision.", "start": 2631.57, "duration": 2.76}, {"text": "The more bits of precision\nI want on my number,", "start": 2634.33, "duration": 3.12}, {"text": "I have to pay for them.", "start": 2637.45, "duration": 1.58}, {"text": "So this is basic--", "start": 2639.03, "duration": 1.93}, {"text": "I think of these as\nan approximation--", "start": 2640.96, "duration": 1.95}, {"text": "approximation of real\nnumber to some precision,", "start": 2645.73, "duration": 15.87}, {"text": "and I pay for\nprecision with time.", "start": 2661.6, "duration": 11.89}, {"text": "So let's say I wanted to compute\nthe square root of a number.", "start": 2673.49, "duration": 3.83}, {"text": "I could have an algorithm\njust like the algorithms--", "start": 2677.32, "duration": 3.33}, {"text": "or I guess division,\nright, long division.", "start": 2680.65, "duration": 4.35}, {"text": "You all know the algorithm\nof long division.", "start": 2685.0, "duration": 2.4}, {"text": "You put the quotient under\nhere with these-- an AB", "start": 2687.4, "duration": 4.56}, {"text": "and you get the C\non top or whatever.", "start": 2691.96, "duration": 3.157}, {"text": "That's an algorithm.", "start": 2695.117, "duration": 0.833}, {"text": "That's a procedure using\nessentially small numbers.", "start": 2695.95, "duration": 3.81}, {"text": "I'm only talking about\nthe digits zero to nine", "start": 2699.76, "duration": 2.79}, {"text": "here when I'm doing\nthat algorithm.", "start": 2702.55, "duration": 1.92}, {"text": "So it's a procedure\nthat only uses", "start": 2704.47, "duration": 2.67}, {"text": "small integers to\ncompute arbitrary", "start": 2707.14, "duration": 2.97}, {"text": "precision of a division.", "start": 2710.11, "duration": 3.48}, {"text": "So that's an\nalgorithm, and I have", "start": 2713.59, "duration": 1.44}, {"text": "to pay time to get more digits.", "start": 2715.03, "duration": 3.66}, {"text": "So that's an\nexample of this kind", "start": 2718.69, "duration": 3.45}, {"text": "of-- how we live in the\nworld of real numbers", "start": 2722.14, "duration": 3.75}, {"text": "when all we have is\na discrete system.", "start": 2725.89, "duration": 3.16}, {"text": "And then the last category\nI'd like to talk about here", "start": 2729.05, "duration": 4.76}, {"text": "is really approximation\nalgorithms.", "start": 2733.81, "duration": 3.42}, {"text": "Whereas this is kind of an\napproximation algorithm,", "start": 2740.83, "duration": 2.7}, {"text": "I'm approximating\nmy outputs, this", "start": 2743.53, "duration": 2.34}, {"text": "is an approximation algorithm\nfrom the standpoint of,", "start": 2745.87, "duration": 4.81}, {"text": "well, there's a lot of problems\nthat I can't solve efficiently.", "start": 2750.68, "duration": 3.11}, {"text": "They're NP-hard.", "start": 2753.79, "duration": 0.75}, {"text": "They're in EXP or\neven harder problems.", "start": 2754.54, "duration": 6.15}, {"text": "But maybe I'm OK with not\ngetting the optimal solution.", "start": 2760.69, "duration": 5.49}, {"text": "So this is in the domain\nof optimization problems.", "start": 2766.18, "duration": 2.915}, {"text": "So most of the\ndynamic programming", "start": 2775.09, "duration": 3.182}, {"text": "problems that we gave you\nwere optimization problems.", "start": 2778.272, "duration": 2.208}, {"text": "They're the shortest\npaths problems.", "start": 2780.48, "duration": 1.23}, {"text": "Those are optimization problems.", "start": 2781.71, "duration": 1.333}, {"text": "Basically, the possible outputs\nare ranked in some way--", "start": 2783.043, "duration": 3.827}, {"text": "the distance of a path that you\nreturn or something like that.", "start": 2786.87, "duration": 5.34}, {"text": "They're ranked in some way.", "start": 2792.21, "duration": 1.36}, {"text": "There is an optimal one--", "start": 2793.57, "duration": 1.49}, {"text": "the one with the smallest\nmetric or something like that.", "start": 2795.06, "duration": 3.45}, {"text": "Well, in an approximation\nalgorithm what I do is, OK,", "start": 2801.05, "duration": 2.55}, {"text": "I get that it's computationally\ndifficult for you", "start": 2803.6, "duration": 3.12}, {"text": "to give me the longest\nsimple path in this graph,", "start": 2806.72, "duration": 3.27}, {"text": "or the shortest possible route\nfor my traveling salesman,", "start": 2809.99, "duration": 3.69}, {"text": "but maybe that's OK.", "start": 2813.68, "duration": 4.05}, {"text": "I mean, my engineering\nSpidey-sense", "start": 2817.73, "duration": 3.39}, {"text": "tells me that\nwithin 10% is fine.", "start": 2821.12, "duration": 3.36}, {"text": "So maybe instead of giving\nme the most optimal thing,", "start": 2824.48, "duration": 3.99}, {"text": "can I give you an\nalgorithm that's", "start": 2828.47, "duration": 1.44}, {"text": "guaranteed to be within\na certain distance", "start": 2829.91, "duration": 2.61}, {"text": "from the optimal thing?", "start": 2832.52, "duration": 2.49}, {"text": "Usually, we're looking for\nconstant factor approximations", "start": 2835.01, "duration": 2.85}, {"text": "which have low\nconstant, or maybe", "start": 2837.86, "duration": 4.77}, {"text": "even have to do for worse\nif such things don't exist.", "start": 2842.63, "duration": 3.39}, {"text": "OK, so that's\napproximation algorithms.", "start": 2846.02, "duration": 2.55}, {"text": "Can we get close to an optimal\nsolution in polynomial time?", "start": 2848.57, "duration": 4.96}, {"text": "OK.", "start": 2853.53, "duration": 1.55}, {"text": "And then the last way we could\nchange things in, especially", "start": 2855.08, "duration": 4.35}, {"text": "future classes, though sometimes\nthey talk about this in 046", "start": 2859.43, "duration": 3.54}, {"text": "as well, is we could change\nthe model of computation.", "start": 2862.97, "duration": 3.9}, {"text": "We could basically change\nsomething about our computer", "start": 2866.87, "duration": 3.27}, {"text": "to be put in some other weird\nparadigm of solving problems", "start": 2870.14, "duration": 4.77}, {"text": "with more power\nessentially, or you're", "start": 2874.91, "duration": 2.633}, {"text": "in a situation where\nthere's less power.", "start": 2877.543, "duration": 1.667}, {"text": "OK, so change in the\nmodel of computation.", "start": 2879.21, "duration": 2.985}, {"text": "So what we've been talking\nto you in terms of model", "start": 2892.59, "duration": 3.78}, {"text": "of computation is our word-RAM--", "start": 2896.37, "duration": 2.05}, {"text": "word-RAM.", "start": 2898.42, "duration": 0.5}, {"text": "And that essentially says I\ncan do arithmetic operations,", "start": 2901.83, "duration": 3.69}, {"text": "and I can look up stuff in\nmy memory in constant time.", "start": 2905.52, "duration": 2.79}, {"text": "And but if I allocate\na certain amount,", "start": 2908.31, "duration": 2.618}, {"text": "I have to pay that amount\nand that kind of thing.", "start": 2910.928, "duration": 2.042}, {"text": "So that's this word-RAM model.", "start": 2912.97, "duration": 3.35}, {"text": "But in actuality, all\nof your computers,", "start": 2916.32, "duration": 4.17}, {"text": "it's a lot easier\nfor me to figure--", "start": 2920.49, "duration": 2.85}, {"text": "to find and read memory\nthat's on my CPU in a register", "start": 2923.34, "duration": 5.43}, {"text": "than it is for me to go out\nto the hard disk, ask this--", "start": 2928.77, "duration": 3.3}, {"text": "well, in my day, it used to be\nthis movable mechanical head", "start": 2932.07, "duration": 4.02}, {"text": "that had to go and scan\nover a bit on a CD-ROM drive", "start": 2936.09, "duration": 4.71}, {"text": "and actually read\nwhat that thing was.", "start": 2940.8, "duration": 5.13}, {"text": "So we can add\ncomplexity to our model", "start": 2945.93, "duration": 3.12}, {"text": "to better account for the costs\nof operations on my machine.", "start": 2949.05, "duration": 5.55}, {"text": "One of those models is\ncalled the cache model--", "start": 2954.6, "duration": 2.76}, {"text": "cache model.", "start": 2961.83, "duration": 2.49}, {"text": "It's basically a\nhierarchy of memory.", "start": 2964.32, "duration": 4.5}, {"text": "I have my registers\non board my CPU.", "start": 2968.82, "duration": 3.42}, {"text": "I have maybe an L1 cache\nthat's close to my CPU.", "start": 2972.24, "duration": 3.87}, {"text": "Then I have another\nset of caches", "start": 2976.11, "duration": 1.44}, {"text": "and another set of\ncaches maybe out to RAM.", "start": 2977.55, "duration": 2.76}, {"text": "And reading from a hard disk, a\nsolid state drive of some kind,", "start": 2980.31, "duration": 3.21}, {"text": "that's the slowest\nthing to access.", "start": 2983.52, "duration": 2.82}, {"text": "And I can put a cost associated\nwith each of those things.", "start": 2986.34, "duration": 3.48}, {"text": "And instead of having to--", "start": 2989.82, "duration": 1.53}, {"text": "having all of our operations\nbe said to be constant,", "start": 2991.35, "duration": 6.41}, {"text": "the constants are\nactually different,", "start": 2997.76, "duration": 2.1}, {"text": "and I have to pay\nfor that difference.", "start": 2999.86, "duration": 2.43}, {"text": "And so that's\nextending our model", "start": 3002.29, "duration": 1.92}, {"text": "to be a little bit more\nrealistic to our machine.", "start": 3004.21, "duration": 2.94}, {"text": "Another one is we have\ncomputers right now that", "start": 3007.15, "duration": 4.47}, {"text": "operate in classical\nphysics, that exploit", "start": 3011.62, "duration": 3.3}, {"text": "things in classical physics.", "start": 3014.92, "duration": 1.77}, {"text": "But in actuality,\nour world allows", "start": 3016.69, "duration": 4.59}, {"text": "for even more complicated\ntypes of operations,", "start": 3021.28, "duration": 6.03}, {"text": "like quantum operations, where\nyou're exploiting entanglement", "start": 3027.31, "duration": 3.48}, {"text": "and superposition\nof different atoms", "start": 3030.79, "duration": 3.19}, {"text": "to potentially get operations\nthat I can act on my data that", "start": 3033.98, "duration": 5.31}, {"text": "are actually provably stronger\nthan the classical models", "start": 3039.29, "duration": 3.72}, {"text": "in some sense.", "start": 3043.01, "duration": 1.65}, {"text": "So this is a huge\nreason why there's", "start": 3044.66, "duration": 3.9}, {"text": "a lot of work\nbeing done in, say,", "start": 3048.56, "duration": 2.58}, {"text": "lots of industry research\nfacilities in figuring out", "start": 3051.14, "duration": 5.82}, {"text": "these models.", "start": 3056.96, "duration": 0.63}, {"text": "Because maybe if you can make\na big enough quantum computer,", "start": 3057.59, "duration": 3.16}, {"text": "you can break encryption and\nstuff in polynomial time.", "start": 3060.75, "duration": 3.05}, {"text": "And that's something that\nmaybe the NSA is interested in.", "start": 3063.8, "duration": 2.82}, {"text": "And I'm not going\nto go into that.", "start": 3066.62, "duration": 2.07}, {"text": "But, you know.", "start": 3068.69, "duration": 2.7}, {"text": "I mean, some people--", "start": 3071.39, "duration": 1.41}, {"text": "you look at artificial\nintelligence and things like", "start": 3072.8, "duration": 2.4}, {"text": "discussions around\nartificial intelligence,", "start": 3075.2, "duration": 2.43}, {"text": "my brain might be doing things\nthat a classical computer", "start": 3077.63, "duration": 6.8}, {"text": "cannot.", "start": 3084.43, "duration": 1.86}, {"text": "It could be using quantum\nsuperposition in some way.", "start": 3086.29, "duration": 3.6}, {"text": "And our computers that are\nin your phone and your laptop", "start": 3089.89, "duration": 4.257}, {"text": "and things like that aren't\nexploiting those operations,", "start": 3094.147, "duration": 2.333}, {"text": "so how could we ever\nget intelligence,", "start": 3096.48, "duration": 1.583}, {"text": "because in some sense, our\nbrains are more powerful.", "start": 3098.063, "duration": 3.557}, {"text": "And so a lot of what AI\nshould be looking into", "start": 3101.62, "duration": 3.45}, {"text": "is, what is the actual model\nof computation of our brains", "start": 3105.07, "duration": 4.98}, {"text": "that can give us the\npower to have sentience?", "start": 3110.05, "duration": 3.96}, {"text": "OK, so that's kind\nof quantum computing.", "start": 3114.01, "duration": 2.43}, {"text": "I don't know much\nabout it actually.", "start": 3116.44, "duration": 2.28}, {"text": "And then there's things like,\nmaybe I have more than one CPU.", "start": 3118.72, "duration": 6.23}, {"text": "I mean, most computers--\nall the computers you have,", "start": 3124.95, "duration": 2.71}, {"text": "even the ones in your phone,\nprobably have multiple cores.", "start": 3127.66, "duration": 3.42}, {"text": "In a sense, you have lots\nof CPUs running in parallel.", "start": 3131.08, "duration": 3.67}, {"text": "So this is like par--", "start": 3134.75, "duration": 2.37}, {"text": "there's one R in parallel?", "start": 3137.12, "duration": 1.415}, {"text": "Parallel computing basically\nsays, it's cheap for me", "start": 3148.08, "duration": 3.33}, {"text": "to make another\ncomputer potentially.", "start": 3151.41, "duration": 3.24}, {"text": "If I have two computers\nrunning on the same problem,", "start": 3154.65, "duration": 3.48}, {"text": "maybe I can get a\ntwo-fold speed-up on my--", "start": 3158.13, "duration": 3.642}, {"text": "on the time in which it\ntakes to solve my problem.", "start": 3161.772, "duration": 4.898}, {"text": "Now, suppose I had then 100\nCPUs running on a machine.", "start": 3166.67, "duration": 5.28}, {"text": "Maybe I can get\n100-fold speed-up.", "start": 3171.95, "duration": 1.74}, {"text": "And actually, in real\nlife, 100-fold speed-up", "start": 3173.69, "duration": 4.45}, {"text": "makes a difference.", "start": 3178.14, "duration": 1.86}, {"text": "It's, am I waiting for\nthis for 10 minutes?", "start": 3180.0, "duration": 3.06}, {"text": "Or am I waiting for\nthis for 1,000 minutes?", "start": 3183.06, "duration": 4.05}, {"text": "That's, like, all day.", "start": 3187.11, "duration": 1.92}, {"text": "I don't want to do that.", "start": 3189.03, "duration": 1.11}, {"text": "Maybe it's on weeks.", "start": 3190.14, "duration": 1.08}, {"text": "I don't even remember.", "start": 3191.22, "duration": 1.83}, {"text": "But parallel computing, if I\ncan get a 100-fold speed-up,", "start": 3193.05, "duration": 3.99}, {"text": "that might be a huge win.", "start": 3197.04, "duration": 1.83}, {"text": "But for some problems,\nit's not possible--", "start": 3198.87, "duration": 3.91}, {"text": "if I have k CPUs, can I\nget a k-factor speed-up?", "start": 3202.78, "duration": 6.42}, {"text": "It's not always possible to do.", "start": 3209.2, "duration": 3.19}, {"text": "And so parallel computing\nis another paradigm", "start": 3212.39, "duration": 2.94}, {"text": "in which there's a lot of\ninteresting theory going on.", "start": 3215.33, "duration": 5.59}, {"text": "There's a lot of\ncomplications there,", "start": 3220.92, "duration": 1.76}, {"text": "because there are a\ncouple different models.", "start": 3222.68, "duration": 2.34}, {"text": "You can have multicore\nset-up, where", "start": 3225.02, "duration": 1.77}, {"text": "you have a lot of computers\nthat are accessing", "start": 3226.79, "duration": 2.01}, {"text": "the same bank of memory.", "start": 3228.8, "duration": 2.13}, {"text": "And then you don't want them\nall to be reading and writing", "start": 3230.93, "duration": 2.76}, {"text": "from them at different times,\nbecause you don't necessarily", "start": 3233.69, "duration": 3.03}, {"text": "know what their state is,\nand you get these collisions,", "start": 3236.72, "duration": 2.653}, {"text": "which are something\nthat you really have", "start": 3239.373, "duration": 1.667}, {"text": "to think about in this world.", "start": 3241.04, "duration": 2.28}, {"text": "Or you have situations\nwhere maybe I", "start": 3243.32, "duration": 2.64}, {"text": "have a bunch of\nnano-flies or something", "start": 3245.96, "duration": 3.03}, {"text": "that are going around, and\nthey have very small computer", "start": 3248.99, "duration": 3.06}, {"text": "brains themselves.", "start": 3252.05, "duration": 3.06}, {"text": "But they can talk to each\nother and pass information", "start": 3255.11, "duration": 2.552}, {"text": "to each other, but\nthey don't have access", "start": 3257.662, "duration": 1.708}, {"text": "to one central network\nrepository of information.", "start": 3259.37, "duration": 2.86}, {"text": "That's what we call a\ndistributed parallel system,", "start": 3262.23, "duration": 3.23}, {"text": "where all of the\nCPUs that you have", "start": 3265.46, "duration": 3.48}, {"text": "can interact with each\nother maybe locally,", "start": 3268.94, "duration": 2.79}, {"text": "but don't have access to\nthe same memory system.", "start": 3271.73, "duration": 4.15}, {"text": "So they have to work\ntogether to learn information", "start": 3275.88, "duration": 4.88}, {"text": "about the system.", "start": 3280.76, "duration": 1.08}, {"text": "OK, so that's a brief overview\nof the different directions", "start": 3281.84, "duration": 6.42}, {"text": "this class, 6.006,\nand theory in general,", "start": 3288.26, "duration": 3.27}, {"text": "could lead you-- into a huge\narray of different branches", "start": 3291.53, "duration": 4.29}, {"text": "theory and different\nproblems that you", "start": 3295.82, "duration": 2.46}, {"text": "could address with different\ntypes of computers.", "start": 3298.28, "duration": 3.51}, {"text": "So I know this is a very\nhigh-level lecture and maybe", "start": 3301.79, "duration": 5.43}, {"text": "less-applied than some\nof you might like.", "start": 3307.22, "duration": 3.51}, {"text": "But I hope this gives you a good\nunderstanding of the directions", "start": 3310.73, "duration": 4.8}, {"text": "you can go after this\nclass that I think", "start": 3315.53, "duration": 3.87}, {"text": "are really excited in terms\nof how to solve problems", "start": 3319.4, "duration": 3.72}, {"text": "computationally.", "start": 3323.12, "duration": 1.77}, {"text": "So with that, I'd\nlike to end there.", "start": 3324.89, "duration": 4.52}] |