1 / 17

# dADS1 2011 Gerth Stølting Brodal - PowerPoint PPT Presentation

dADS1 2011 Gerth Stølting Brodal. Introduction to Algorithms and Data Structures Students: 152 Lectures : 2+2 hours Use clickers at lectures (new in 2011) Theoretical TØ: 3 hours Weekly mandatory group handins datLAB : Students prepare handin

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
• Introduction to Algorithms and Data Structures
• Students: 152
• Lectures: 2+2 hours
• Useclickersat lectures (new in 2011)
• Theoretical TØ: 3 hours
• Weeklymandatorygrouphandins
• datLAB: Students preparehandin
• Exam: Mix of multiple-choice & one-liners
• Slides oncoursewebpage – noclickerquestions
• Number of questions: ~ 2 per lecture (45 min)
• Types of questions
• Understanding of definitions
• Understanding of algorithms
• Constructive
• Feedback – alwaysshown to the students
• As expected
• Converged to wronganswer (goodstarting point for discussion)
• Questionbadlyphrased (back to the drawingboard...)
• Noconvergence (to hard?)
• Software:
• PowerPoint (PresenterView) + TurningPointAnyWhere

(I didn’tmanage to embedinto PowerPoint)

• Usetwoprojectorsin auditorium: 1) Background info 2) Question
• QuickSortLecture
• Union-Findlecture
• Interval treelecture
• Amortizedanalysislecture

... and an example from an UNF talk

Is the answer A or B ?

• Don’tknow
Is the answer A or B ?

• Don’t know
Sandsynlighedsteori Baggrund?
• Ingen
• Gymnasiet
• Gymnasiet + Universitetet
• Universitetet
• Andet steds
• Ved ikke
EksperimentKast en Mønt
• Plat
• Krone
• På højkant
• Ingen mønt
EksperimentAntal kast før man får krone ?
• 1
• 2
• 3
• 4
• 5
• 6
• 7
• 8
• 9 eller flere
• 1
• 2
• 3
• 4
• 5
• 6
• 7
• 8
• 9 eller flere
EksperimentAntal kast før man får krone ?
• 1
• 2
• 3
• 4
• 5
• 6
• 7
• 8
• 9 eller flere

Sætning

Forventede antal kast for at få krone = 2

Bevis

s.s. for i’te kast er krone

s.s. for først i-1 kast er plat

# kast

1st vote

a

b

c

d

e

f

g

h

i

2nd vote

a

b

c

d

e

f

g

h

i

Union-Find

1st vote

a

b

c

d

e

f

2nd vote

a

b

c

d

e

f

Interval Tree

1st vote

a

b

c

d

e

2nd vote

a

b

c

d

e

AmortizedAnalysis

MetodeRandomSurfer

Start påknude 1

Gentag mange gange:

Kast en terning:

Hvis den viser 1-5:

Vælg en tilfældig pil ud fra knuden

ved at kaste en terninghvis 2 udkanter

Hvis den viser 6:

Kastterningenigenog spring hen til den knude

somterningenviser

MetodeRandomSurfer

Start påknude 1

Gentag mange gange:

Kast en terning:

Hvis den viser 1-5:

Vælg en tilfældig pil ud fra knuden

ved at kaste en terninghvis 2 udkanter

Hvis den viser 6:

Kastterningenigenog spring hen til den knude

somterningenviser