This chapter introduces probabilistic analysis
and randomized algorithms
.
The authors define probabilistic analysis
as use of probability in the analysis of an algorithm. This is very helpful in finding the average-case behaviour of an algorithm.
A randomized algorithm is defined as an algorithm whose behaviour is defined not only by its input but by values produced by a random-number generator.
The authors then define Indicator Random Variable associated with an event in a sample space as follows:
The author then prove following lemma which shows that the expected value of an indicator random variable associated with an event A is equal to the probability that A occurs:
Given a sample space and an event in the sample space , let . Then .
The authors then try to make distinction between randomized algorithms and probabilistic analysis. Non-randomized algorithms are deterministic, i.e. they generate the same behaviour again and again given the same input. Randomized algorithm's behaviour may vary even if the same algorithm is called many a times with the same input. The authors provide two ways to randomize an algorithm:
The authors then elaborates on the problem of tossing balls into bins. Without proof, the authors answer following problems:
The authors then discuss one more randomized algorithm
of hiring a candidate.
The authors define probabilistic analysis
A randomized algorithm is defined as an algorithm whose behaviour is defined not only by its input but by values produced by a random-number generator.
The authors then define Indicator Random Variable associated with an event in a sample space as follows:
The author then prove following lemma which shows that the expected value of an indicator random variable associated with an event A is equal to the probability that A occurs:
Given a sample space and an event in the sample space , let . Then .
The authors then try to make distinction between randomized algorithms and probabilistic analysis. Non-randomized algorithms are deterministic, i.e. they generate the same behaviour again and again given the same input. Randomized algorithm's behaviour may vary even if the same algorithm is called many a times with the same input. The authors provide two ways to randomize an algorithm:
- Randomly generate a priority for each input and sort the inputs in the order of their priority
- Randomly permute the input array.
The authors then elaborates on the problem of tossing balls into bins. Without proof, the authors answer following problems:
- How many balls fall in a given bin? The expected number of balls that fall in the given bin is .
- How many balls needs to be tossed; on an average; until a given bin contains a ball? The expected number of tosses is .
- How many balls needs to be tossed until every bin contains one ball? The expected number of tosses is .
The authors then discuss one more randomized algorithm
No comments:
Post a Comment