online advertising
Loading [MathJax]/jax/output/HTML-CSS/jax.js

Wednesday, November 25, 2015

Algorithms: Design and Analysis, Part 1 - Exam Question 13

Problem:

Suppose that a randomized algorithm succeeds (e.g., correctly computes the minimum cut of a graph) with probability p (with 0<p<1 ). Let ϵ be a small positive number (less than 1). How many independent times do you need to run the algorithm to ensure that, with probability at least 1ϵ, at least one trial succeeds?

Solution:

Suppose we run the algorithm for n times and therefore the probability for all of these independent trials to fail is (1p)n.

The probability to success is therefore 1(1p)n>1ϵ.

1(1p)n>1ϵ(1p)n>ϵ(1p)n<ϵlog((1p)n)<logϵnlog(1p)<logϵn>logϵlog(1p)

Note the change of inequality sign in the last line, this is because log(1p)<0

No comments:

Post a Comment