36 Design and Analysis of Algorithms
Notes on the output:
1. The average value seems to be correct.
2. Each row corresponds to 4 numbers in a particular range. There are 20 rows, giving a range of 0 to 80
numbers for the vertical scale.
3. Each column corresponds to a bin, for numbers having values 0 – 63, 64 – 127, 128 – 191, and so on.
There are 64 such bins.
4. Some of the bins are empty, showing that numbers in the corresponding range did not occur in the
generated sequence. On the other hand, some bins have more than 64 numbers in them. Thus the
generator is not a perfect uniform generator.
5. Due to its speed and simplicity, this generator can be used for practical purposes.
2.4 PROBLEM SOLVING IN GENERAL
2.4.1 The STAIR Steps for Solving ...