Probability Review Part I Design and Analysis of Algorithms I.
-
Upload
moris-oliver -
Category
Documents
-
view
223 -
download
8
Transcript of Probability Review Part I Design and Analysis of Algorithms I.
![Page 1: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/1.jpg)
Probability Review
Part IDesign and Analysis
of Algorithms I
![Page 2: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/2.jpg)
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: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/3.jpg)
Tim Roughgarden
Concept #1 – Sample Spaces
![Page 4: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/4.jpg)
Tim Roughgarden
Concept #2 – Events
![Page 5: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/5.jpg)
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: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/6.jpg)
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: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/7.jpg)
Tim Roughgarden
Concept #2 – Events
![Page 8: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/8.jpg)
Tim Roughgarden
Concept #3 - Random Variables
![Page 9: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/9.jpg)
Tim Roughgarden
Concept #4 - Expectation
![Page 10: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/10.jpg)
6 .577.5
8
What is the expectation of the sum of two dice?
![Page 11: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/11.jpg)
𝑛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: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/12.jpg)
Tim Roughgarden
Concept #4 - Expectation
![Page 13: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/13.jpg)
Tim Roughgarden
Concept #5 – Linearity of Expectation
![Page 14: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/14.jpg)
Tim Roughgarden
Linearity of Expectation (Proof)
![Page 15: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/15.jpg)
Tim Roughgarden
Example: Load Balancing
![Page 16: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/16.jpg)
Tim Roughgarden
Load Balancing Solution
![Page 17: Probability Review Part I Design and Analysis of Algorithms I.](https://reader036.fdocuments.in/reader036/viewer/2022062716/56649e0d5503460f94af6df6/html5/thumbnails/17.jpg)
Tim Roughgarden
Load Balancing Solution (con’d)