Sunday, January 06, 2008

Probabilistic algorithms

Recently, I read some articles which describe probabilistic(randomized) algorithms I have not heard of before. This cluster of algorithms are really interesting. There are four main categories: Monte Carlo algorithms, Las Vegas algorithms, Sherwood algorithms and Numerical approximation algorithms.
This article(http://www.cs.man.ac.uk/~david/courses/advalgorithms/probabilistic.pdf) describes probabilistic algorithms with concrete examples. It is a good tutorial for newbies.
Here, I would like to excerpt part of the original article.
(1) Monte Carlo algorithms
"Algorithms which always return a result, but the result may not always be correct. We attempt to minimise the probability of an incorrect result, and using the random element, multiple runs of the algorithm will reduce the probability of incorrect results."
Examples:
(*)Majority element in an array
(*)Matrix multiplication(whether A*B=C)
(*)Testing the primality of numbers
(*)Deciding set equality
(2) Las Vegas algorithms
"Algorithms that never return an incorrect result, but may not produce results at all on some runs. Again, we wish to minimise the probability of no result, and, because of the random element, multiple runs will reduce the probability of no result. "
Examples:
(*) Eight Queens Problem
(*) Factorization of integers
(3) Sherwood algorithms
"Algorithms which always return a result and the correct result, but where a random element increases the eciency, by avoiding or reducing the probability of worst-case behaviour. Useful for algorithms which have a poor worst-case behaviour but a good average-case behaviour."
Examples:
(*)Quicksort
  choose a random pivot or randomly shuffle the input numbers.
(4)Numerical approximation algorithms
"Here the random element allows us to get approximate numerical results, often much faster than direct methods, and multiple runs will provide increasing approximation."
Examples:
(*) Calculation of integrals

No comments: