{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ENC3250 Solutions pg 30

ENC3250 Solutions pg 30 - 7.9 Let us start with an initial...

This preview shows page 1. Sign up to view the full content.

-30- 7.9 Let us start with an initial seed of 1. The first generator yields the sequence: 1, 6, 10, 8, 9, 2, 12, 7, 3, 5, 4, 11, 1, . . . The second generator yields the sequence: 1, 7, 10, 5, 9, 11, 12, 6, 3, 8, 4, 2, 1, . . . Because of the patterns evident in the second half of the latter sequence, most people would consider it to be less random than the first sequence. 7.10 When m = 2 k , the right-hand digits of X n are much less random than the left-hand digits. See [KNUT98], page 13 for a discussion. 7.11 Many packages make use of a linear congruential generator with m = 2 k . As discussed in the answer to Problem 10, this leads to results in which the right-hand digits are much less random than the left-hand digits. Now, if we use a linear congruential generator of the following form: X n +1 = (a X n + c) mod m then it is easy to see that the scheme will generate all even integers, all odd integers, or will alternate between even and odd integers, depending on the choice for a and
This is the end of the preview. Sign up to access the rest of the document.
• Fall '11
• Dr.TimothyCerner
• Natural number, Greatest common divisor, Pseudorandom number generator, odd integers, SIGCSE Bulletin, Cesaro

{[ snackBarMessage ]}

Ask a homework question - tutors are online