Lecture 3

31
Lecture 3 CSE 331 Sep 3, 2010

description

Lecture 3. CSE 331 Sep 3, 2010. Remember: Stick with your group. More on Group Leader Scribe. All Sep blog post slots are gone!. Upcoming deadlines. Sep 7: Form your group (email me the full names). Sep 10: Teams can swap members. Don Knuth. Don Knuth Reward Checks. - PowerPoint PPT Presentation

Transcript of Lecture 3

Page 1: Lecture 3

Lecture 3

CSE 331Sep 3, 2010

Page 2: Lecture 3

Remember: Stick with your group

Page 3: Lecture 3

More on Group Leader Scribe

Page 4: Lecture 3

All Sep blog post slots are gone!

Page 5: Lecture 3

Upcoming deadlines

Sep 7: Form your group (email me the full names)

Sep 10: Teams can swap members

Page 6: Lecture 3

Don Knuth

Page 7: Lecture 3

Don Knuth Reward Checks

http://www.flickr.com/photos/32184482@N03/3010989157/

Page 8: Lecture 3

Questions/Comments?

Page 9: Lecture 3

What are Algorithms?

A series of steps designed to solve a problem

A geometric way of solving problems

An abstract mathematical solution for a problem

Page 10: Lecture 3

Knuth’s Definition

An algorithm is a finite, definitive, effectiveprocedure with some input and some output

Page 11: Lecture 3

Why care about algorithms- II

Driving directions

Page 12: Lecture 3

Why care about algorithms- II

Computing Bestsellers on the fly

Page 13: Lecture 3

Why care about algorithms- II

Booking cheapest air tickets

Page 14: Lecture 3

Why care about algorithms- II

Google searches

Page 15: Lecture 3

Why care about algorithms- II

Data compression

http://www.di.ens.fr/~cherniav/teaching.html

Page 16: Lecture 3

Why care about algorithms- II

Error correction

http://www.switched.com/2010/02/11/fix-dvd-scratches-using-a-banana-and-toothpaste/

Page 17: Lecture 3

(And I could) go on…

http://www.movieposter.com/poster/MPW-33672/Titanic.html

Page 18: Lecture 3

Read Chazelle’s article

Page 19: Lecture 3

Questions/Comments?

Page 20: Lecture 3

From problem to software

Page 21: Lecture 3

Main Steps in Algorithm DesignProblem StatementProblem Statement

AlgorithmAlgorithm

Real world problem

Problem DefinitionProblem Definition Precise mathematical def

“Implementation”“Implementation” Data Structures

AnalysisAnalysis Correctness/Run time

Page 22: Lecture 3

Worst-case analysis

Correctness should hold for every valid input

Resource usage by the worst-possible input

What resources?

What resources?

Why worst-case?Why worst-case?

Page 23: Lecture 3

The language of proofs

Brad Pitt had a beard

Every goat has a beard

waleg.com

animaldiversity.org

Hence, Brad Pitt is a goat.Hence, Brad Pitt is a goat.

Page 24: Lecture 3

Questions/Comments?

Page 25: Lecture 3

National Resident Matching

Page 26: Lecture 3

(Screen) Docs are coming to BUF

Hawkeye (M*A*S*H)

JD (Scrubs)

Buffalo General

Millard Filmore (Gates Circle)

Millard Filmore (Suburban)

Page 27: Lecture 3

What can go wrong?

Page 28: Lecture 3

The situation is unstable!

Page 29: Lecture 3

What happens in real life

PreferencesPreferences

InformationInformation

PreferencesPreferences

Page 30: Lecture 3

NRMP plays matchmaker

Page 31: Lecture 3

Stable Marriage Problem

David Gale Lloyd Shapley