algo prob review1 annotated

17
Probability Review Part I Design and Analysis of Algorithms I

Upload: navediitr

Post on 05-Jan-2016

231 views

Category:

Documents


0 download

DESCRIPTION

Algorithm Probability

TRANSCRIPT

Page 1: Algo Prob Review1 Annotated

Probability Review

Part IDesign and Analysis

of Algorithms I

Page 2: Algo Prob Review1 Annotated

Tim Roughgarden

Topics Covered• Sample spaces• Events• Random variables• Expectation• Linearity of ExpectationSee also:• Lehman-Leighton notes (free PDF)• Wikibook on Discrete Probability

Page 3: Algo Prob Review1 Annotated

Tim Roughgarden

Concept #1 – Sample Spaces

Page 4: Algo Prob Review1 Annotated

Tim Roughgarden

Concept #2 – Events

Page 5: Algo Prob Review1 Annotated

1361121612

Consider the event (i.e., the subset of outcomes for which) “the sum of the two dice is 7”. What is the probability of this event?

Page 6: Algo Prob Review1 Annotated

1𝑛

141234

Consider the event (i.e., the subset of outcomes for which) “the chosen pivot gives a 25-75 split of better”. What is the probability of this event?

Page 7: Algo Prob Review1 Annotated

Tim Roughgarden

Concept #2 – Events

Page 8: Algo Prob Review1 Annotated

Tim Roughgarden

Concept #3 - Random Variables

Page 9: Algo Prob Review1 Annotated

Tim Roughgarden

Concept #4 - Expectation

Page 10: Algo Prob Review1 Annotated

6 .577.5

8

What is the expectation of the sum of two dice?

Page 11: Algo Prob Review1 Annotated

𝑛4

𝑛3

𝑛2

3𝑛4

Which of the following is closest to the expectation of the size of the subarray passed to the first recursive call in QuickSort?

Page 12: Algo Prob Review1 Annotated

Tim Roughgarden

Concept #4 - Expectation

Page 13: Algo Prob Review1 Annotated

Tim Roughgarden

Concept #5 – Linearity of Expectation

Page 14: Algo Prob Review1 Annotated

Tim Roughgarden

Linearity of Expectation (Proof)

Page 15: Algo Prob Review1 Annotated

Tim Roughgarden

Example: Load Balancing

Page 16: Algo Prob Review1 Annotated

Tim Roughgarden

Load Balancing Solution

Page 17: Algo Prob Review1 Annotated

Tim Roughgarden

Load Balancing Solution (con’d)