Introduction to Algorithms, Second Edition

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

View Full Document Right Arrow Icon
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 . Aca l lto 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 :Th e 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/30/2008 for the course CS 357 taught by Professor Ramachandran during the Spring '06 term at University of Texas at Austin.

Page1 / 3

Lecture 5 - The University of Texas at Austin Department of...

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

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