The University of Texas at Austin
Lecture 5
Department of Computer Sciences
Professor Vijaya Ramachandran
Randomized algorithms; random permutation
CS357: ALGORITHMS, Spring 2006
Randomized algorithms
Definition
: A
randomized algorithm
is an algorithm that can make calls to a random number
generator during the execution of the algorithm.
These calls will be of the form
x
:=
Random
(
a, b
)
,
where
a, b
are integers,
a
≤
b
.
A call to
Random
(
a, b
) returns an integer in [
a, b
], with every integer in the range being
equally likely to occur.
Successive calls to
Random
(
*
,
*
) are assumed to be mutually independent.
Definition
: The
expected running time of a randomized algorithm on a given input
is the
average running time of the algorithm over all outcomes of calls to the random number
generator.
The
expected running time of a randomized algorithm for inputs of length
n
is the maximum
expected running time of the algorithm over all inputs of length
n
.
A randomized algorithm terminates in time
t
(
n
) with probability at least
p
if, for every input
of length
n
, the probability that the algorithm terminates in time
t
(
n
) is at least
p
.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '06
 Ramachandran
 Algorithms, Randomness, Randomized algorithm, Professor Vijaya Ramachandran

Click to edit the document details