text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
Many years ago when Shawn, who has since graduated, came up.
1,017.15
3.84
Was asked the same question.
1,020.99
1.2
So Derek, you are in this wonderful history of students
1,022.19
2.614
who have tried this demonstration.
1,024.804
1.416
This was, as you can, see before we had touchscreen technology.
1,026.22
2.49
So we had sheets of paper up on the screen.
1,028.71
1.791
But the idea was the same.
1,030.501
1.389
And Shawn is perhaps one of our favorite memories in so far
1,031.89
3.24
as he, too, was asked to solve the same problem in his way.
1,035.13
3.014
[AUDIO PLAYBACK]
1,038.144
0.666
-OK, so your task here, Shawn, is the following.
1,038.81
3.33
I have hidden behind these doors the number 7.
1,042.14
4.199
But tucked away in some of these doors as well are other non-negative numbers.
1,046.339
4.221
And your goal is to think of this top row of numbers
1,050.56
2.45
as just an array, or just a sequence of pieces of paper
1,053.01
2.87
with numbers behind them.
1,055.88
1.14
And your goal is only using the top array here, find me the number 7.
1,057.02
4.09
And we are then going to critique how you go about doing it.
1,061.11
3.43
Find us the number 7, please.
1,064.54
1.671
No.
1,075.975
0.5
5, 19, 13.
1,080.04
4.043
It's not a trick question.
1,090.24
1.105
1.
1,094.775
0.5
At this point, your score is not very good, so you might as well keep going.
1,100.168
3.166
3.
1,106.17
0.5
Go on.
1,111.84
0.69
-[INAUDIBLE].
1,112.53
0.677
-Frankly, I can't help but wonder what you're even thinking about.
1,113.207
2.75
Only the top row.
1,118.7
0.85
So you got 3 left.
1,119.55
0.95
So find me 7.
1,120.5
2.475
-[INAUDIBLE].
1,122.975
0.541
-17.
1,140.33
2.049
-[INAUDIBLE].
1,142.379
0.541
-7.
1,150.711
0.499
[END PLAYBACK]
1,151.21
1.695
SPEAKER 1: All right.
1,152.905
0.875
So we don't ask people to search for 7 anymore.
1,153.78
2.65
But this invites the question, how are we
1,156.43
2.74
allowed to have that assumption, right?
1,159.17
2.12
I've been assuming in week 0 that the phone book was alphabetized.
1,161.29
3.35
And therefore, I can find Mike Smith really fast in logarithmic time.
1,164.64
3.37
And we were just assuming a moment ago that we
1,168.01
2.12
could find the number 50 super-fast because of divide and conquer.
1,170.13
3.62
Again, but only if that array were sorted.
1,173.75
2.71
Indeed, Derek technically just got lucky in so far
1,176.46
2.22
as he found 50 the first time in 3 steps.
1,178.68
3.012
But it could have been as many as 7 steps because it was, indeed,
1,181.692
2.708
a random algorithm.
1,184.4
0.96
Or even if he had used linear search.
1,185.36
2
So suppose we want to actually sort something.
1,187.36
3.34
So these are still used on campus sometimes.
1,190.7
2.27
So these are blue books for exam period.
1,192.97
2.112
And suppose that we're at the end of a semester and a bunch of students
1,195.082
2.958
have written their names on these things.
1,198.04
1.708
And so A's and B's and C's and D's.
1,199.748
2.202
And suppose that they're handed in at somewhat random times.
1,201.95
2.64
There's always that kid who hands in his or her exam at an hour
1,204.59
2.43
into the 3-hour exam, and then most of them
1,207.02
1.57
come in around like 2 hours 45 minutes.
1,208.59
1.84
And so therefore, they're all in this pretty random arbitrary
1,210.43
4.04
order like this.
1,214.47
1.307
Actually, if I just them down like that, they're not really random at all.
1,215.777
3.083
And so they're just in some random order.
1,218.86
2.04
And the goal at hand, ultimately, is for the head TF, for instance,
1,220.9
2.81
or the professor to actually sort all of these blue books
1,223.71
2.719
and come up with an alphabetical order so you can make sure that everyone
1,226.429
3.041
has actually submitted on time.
1,229.47
2.06
So how do we do this?
1,231.53
1.54
What is the algorithm with which to do this?
1,233.07
2.84
Because indeed, if he or she, the professor,
1,235.91
2.17
later wants to find a certain name of the alphabet, like Smith,
1,238.08
4.15
it'd be nice if they don't have to sift through all 26, or all 100, or all 500
1,242.23
4.03
blue books.
1,246.26
0.5
They can just jump roughly to the middle,
1,246.76
1.71
and then divide and conquer and find Smith there after.
1,248.47
2.41
Can we get one volunteer to come up and propose how to sort?
1,250.88
3.46
You want come on up?
1,254.34
0.97
Come on up.
1,255.31
0.64
What's your name?
1,255.95
0.43
AUDIENCE: Allison.
1,256.38
0.8
SPEAKER 1: Allison.
1,257.18
1.08
All right, come on up.
1,258.26
2.15
So if you've ever sorted something before,
1,260.41
1.75
now's your chance to show that off, Allison.
1,262.16
1.941
All right.
1,264.101
0.499
So here are a whole bunch of blue books.
1,264.6
1.66
And I've just arbitrarily written not names, but first letters
1,266.26
2.14
of the alphabet on them.
1,268.4
0.999
So go ahead and sort them.
1,269.399
1.381
AUDIENCE: So I start with a letter.
1,270.78
2.415
And if this is before that, I just put it on top.
1,273.195
2.502
SPEAKER 1: OK.
1,275.697
0.583
So that's X and L. Gotcha.
1,276.28
1.614
AUDIENCE: And because Z is after that--
1,277.894
0.828
SPEAKER 1: There's Z.
1,278.722
0.828
AUDIENCE: --I put it below.
1,279.55
1.124
And D is here.
1,280.674
1.181
SPEAKER 1: OK.
1,281.855
0.584
So you seem to be taking them one at a time and just dealing with the problem
1,282.439
3.207