Placeholder Image

字幕表 動画を再生する

  • >> [VIDEO PLAYBACK]

  • >> [CAR DOOR SHUTTING]

  • >> [CAR ENGINE STARTING]

  • >> [MUSIC PLAYING]

  • >> -Moving right along in search of good times and good news.

  • With good friends you can't lose.

  • >> -This could become a habit.

  • >> -Opportunity knocks Let's just reach out and grab it.

  • -Yeah!

  • -Together we'll nab it.

  • -We'll hitch hike, bus, or yellow cab it.

  • -Dammit.

  • -We're moving right along.

  • -Footloose and fancy free.

  • -Getting there is half the fun.

  • Come share it with me.

  • >> -We're moving right along.

  • >> -We're going to share the load.

  • >> -We don't need a map to get this show on the road.

  • -Hey Fozzy, I want you to turn left if you come to a fork in the road.

  • -Yes, sir.

  • Turn left at the fork in the road.

  • Turn left.

  • >> -I don't believe that.

  • >> -Cruising right along we found the lights on the highway.

  • >> -And your way or my way.

  • >> -So trust my navigation.

  • >> -Movie stars with flashy cars and life with the top down.

  • >> -We're storming the big hills.

  • >> -Yeah, storm is right.

  • Should it be snowing?

  • >> -No, I don't think so.

  • >> -Moving right along.

  • >> -Footloose and fancy free.

  • >> -You're ready for the big time.

  • >> -Is it ready for me?

  • >> -Moving right along.

  • Moving right along.

  • Moving right along.

  • Moving right along.

  • -I think you better pull over.

  • -Yes, sir.

  • >> [END PLAYBACK]

  • >> [APPLAUSE]

  • >> DAVID J. MALAN: This is CS50.

  • And this is the end of Week 0, but the start of a beautiful friendship.

  • We are so excited to be here at Yale University

  • for the very first time with our friend Scaz, and Jason, and Andy.

  • All 40 of CS50's TF's and CA's here at Yale.

  • And all of you.

  • And in fact, it's probably time to--

  • >> [APPLAUSE]

  • >> So, even though most of the lectures will indeed be in Cambridge this year,

  • the reality is that by design, and very much deliberately in CS50,

  • I do think we're nearing the point technologically, and pedagogically,

  • where it can be a superior educational experience to engage with some

  • of the course's material online.

  • Indeed, the reality-- and if I believe this philosophically-- is that lectures

  • are not a particularly effective means for delivering

  • fairly complex information.

  • Certainly over hour plus long spans of time.

  • And indeed every few minutes-- I remember myself in college--

  • you zone out for a moment, you miss some complex topic,

  • and you're gone pretty much for the next 45 minutes.

  • And the reality is that whether you're here in New Haven or Cambridge

  • or beyond, the simplicity of having the ability to pause and fast forward,

  • rewind, hyperlink to related resources, search full text transcripts

  • and the like is an opportunity that I dare say for our online students

  • well beyond New Haven, offers them an opportunity

  • to really grasp the conceptual material that we

  • introduce in lectures all the better.

  • >> But ultimately in CS50, is the students' experience

  • is characterized so, so much more by the course's problem sets,

  • or weekly programming projects, the course's sections led by the teaching

  • fellows, the nightly office hours led by the course assistants and the teaching

  • fellows, and indeed such events as CS50 Puzzle

  • Day, CS50's Hack-a-thon, the CS50 Fair, weekly lunches, and so much more.

  • And so whether you're here in New Haven, or tuning in from afar,

  • today in Cambridge, and we'll see you again soon,

  • the reality is this is one and the same class.

  • And we are so excited to be here all together today.

  • And so at the end of the semester, whether here or afar, well

  • hopefully you wear proudly, happily, and perhaps with a bit of relief,

  • the shirt that bears witness to you having taken CS50.

  • >> So where did we leave off on Wednesday?

  • We took a look at computational thinking.

  • And that's toward what we distilled computer science unto, at least

  • for now.

  • But we distilled it little further into at least three components elements.

  • >> Inputs, so what is the problem we're trying to solve?

  • Outputs, what is the answer we're hoping to get?

  • And the representation there of.

  • And we won't dwell here on after on binary, or even ASCII,

  • and the like so much, but rather take for granted

  • that we can represent this information, because the far more interesting parts

  • of those problems are not just the inputs and outputs, but the algorithms

  • that go into solving those problems.

  • >> And you might recall from the other day that we

  • took a fairly traditional concept of looking someone up

  • in a fairly large phone book, or more generally digitally these days,

  • just a very large data set.

  • A really big contacts list, with lots of names alphabetically sorted.

  • And we realized that while I could approach this problem simply

  • by using a linear approach-- page by page,

  • or even two's at a time-- we realized that the more intuitive algorithm--

  • just kind of dividing and conquering the problem again, and again,

  • and again-- halving it with each time, gave us this green result.

  • And it's so much flatter because it suggests

  • that even as this problem gets bigger and bigger,

  • as is the case these days with data sets and reality-- Facebook and Google

  • search results and the like-- does our algorithm

  • perform just as effectively with those bigger bites

  • as it did even with the smaller bites.

  • >> Now it begs the question, what can we actually solve similarly

  • with this kind of intuition?

  • This sort of division and conquering?

  • Well, we could do something like this today here.

  • We could take attendance.

  • So maybe like 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11--

  • not going to be all that efficient.

  • So wait, grade school.

  • 2, 4, 6, 8, 10, 12, 14, 16, 18 and so forth.

  • But could we do a little better?

  • >> I'm pretty sure I can't do this by myself.

  • So if you'll humor us for just a moment, we brought with us

  • an algorithm that's just got three steps,

  • but it does require-- if you don't mind-- all of us stand up,

  • if you would.

  • So, with all of us now standing, step one of this algorithm is the following.

  • Stand up and assign yourself the number 1.

  • So at this point in time, literally everyone in this room

  • hopefully is thinking to themselves, however awkwardly, the number 1.

  • >> Now step two of this algorithm is going to involve the following.

  • Step two, pair off with someone standing,

  • add your numbers together, and adopt the sum as your new number.

  • Quick sanity check.

  • What number is everyone thinking of now?

  • >> So 2, except maybe for one, awkward, lonesome person.

  • If we have an odd number of people in the room.

  • So one person might still be the number 1, that's fine.

  • But step three here, one of you should sit down.

  • The other should go back to step two, and repeat, if you would.

  • >> So if still standing, you should be among those going back to step two.

  • Keep going.

  • A few people still standing.

  • >> So, if still standing, pair up with someone.

  • All right, dwindling down.

  • A few people still standing.

  • I'll help if need be.

  • Remember the key takeaway here, is how much faster this is than me counting.

  • >> So let's see.

  • I can help out.

  • So what number are you still thinking of?

  • >> AUDIENCE: I'm at 44.

  • >> DAVID J. MALAN: 44, so you go ahead and sit down.

  • What number are you thinking of?

  • AUDIENCE: 74.

  • >> DAVID J. MALAN: 74.

  • All right, go ahead and sit down.

  • Who else is still standing?

  • 86.

  • And is anyone else still standing?

  • >> What number?

  • I heard 67.

  • And then in top?

  • 32.

  • Anyone else still standing and thinking of a number?

  • >> Oh, hi.

  • Sorry.

  • Be right back.

  • 42.

  • Anyone else?

  • >> AUDIENCE: 47.

  • >> DAVID J. MALAN: 47.