COT5407-Class04-2

COT5407-Class04-2 - Probabilistic Analysis and Randomized...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Probabilistic Analysis and Randomized Algorithm
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Average-Case Analysis In practice, many algorithms perform better than their worse case The average case is analyzed by Construct a probabilistic model of their input Determine the probabilities and running times (or costs) of alternate executions Calculate expected running time (or cost) COT5407
Background image of page 2
Example 1 COT5407
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Probabilistic Model Assume A has n distinct numbers. (What is the effect of duplicates?) Assume each permutation of the numbers is equally likely (How can we guarantee this? through randomization) How many permutations are there? What is the probability of the best case? What is the probability of the worst case? COT5407
Background image of page 4
Example 1: Analysis COT5407
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
We might not know the distribution of inputs, or we might not be able to model it computationally Instead we use randomization within the algorithm in order to impose a distribution on the inputs An algorithm is randomized if its behavior is
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

COT5407-Class04-2 - Probabilistic Analysis and Randomized...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online