This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

**Asian Institute of Technology
**

Instructor: Dr. Sumanta Guha Slide Sources: CLRS “Intro. To Algorithms” book website (copyright McGraw Hill) adapted and supplemented

5: Probabilistic Analysis and Randomized Algorithms . To Algorithms” Ch.CLRS “Intro.

if event occurs. what is the expected reward? What does this mean? E.g. …? If a coin is tossed 5 times what is expected number of heads? What does this mean? How do we calculate it? Two ways: (a) Let X be the random variable whose value is the number of heads E(X) = ∑x=0.Probability Practice If the reward for rolling a dice is the number of dollars that the face up shows. 2 heads. if this were an actual game how much would you be willing to pay to play? If a coin is tossed 5 times..5 x * Pr(X=x) indicator variable (b) Let Xi = I{coin i is heads} Note: I(event) = 1. E(X) = E(X1) + E(X2) + E(X3) + E(X4) + E(X5) . if it doesn’t Then X = X1 + X2 + X3 + X4 + X5 Therefore. what is the probability of 0 heads. 1 head.. 0.

.

E(X) = 1 + 1/2 +1/3 + … + 1/n ≈ loge n . what is the probability the i th candidate is the best of the first i candidates? Answer: 1/i Therefore.How many times do we expect to hire a new assistant? Let X be the random variable whose value is the number of times. Let Xi = I{candidate i is hired} Then X = X1 + X2 + … + Xn Therefore. E(X) = E(X1) + E(X2) + … + E (Xn) What is E(Xi). the probability that the i th candidate is hired? In other words.

no matter what the input! .Guarantee randomness.

Prove that the procedure produces a uniform random permutation.Randomly Permuting the Input Array Assuming all priorities P[i ] are distinct. . prove that the procedure produces a uniform random permutation.

4. .4. 5. try to estimate the probability that there will be a streak of length k. how many balls must one toss until every bin is hit at least once? 5. What is the longest streak of heads one expects to see? First.4.1 Birthday Paradox How many people must there be in a room before there is a 50% chance that two share a birthday? 5.2 Ball and bins n balls are randomly tossed into b bins. how many balls must one toss until a given bin is hit at least once? Expectedly.3 Streaks Suppose we toss a fair coin n times. how many balls fall into a given bin? Expectedly. Expectedly.

2-4 Ex.4-2 Ex. 5.1-2 Ex. 5. 5.2-1 Ex. 5. 5-2 . 5. 5.1-3 Ex.2-2 Ex.Problems Ex.4-6 Prob. 5.

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd