Data Structures And Algorithms

Showing posts with label random. Show all posts
Showing posts with label random. Show all posts
Tuesday, August 9, 2011

CLRS Exercises 5.1-2

›
Problem: Describe an implementation of the procedure RANDOM(a, b) that only makes calls to RANDOM(0, 1). What is the expected running tim...
3 comments:
Monday, August 8, 2011

CLRS Exercises 5.1-3:

›
Problem: Suppose that you want to output 0 with probability 1/2 and 1 with probability 1/2. At your disposal is a procedure BIASED-RANDOM...

Expand a random range from 1-5 to 1-7

›
Problem: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the rang...
›
Home
View web version
Powered by Blogger.