===================================== 9. Pseudorandom number generator =====================================