Pseudo-random numbers Randomly generating numbers is a crucial subroutine of many algorithms in computer sci- ence. Because computers execute deterministic code, it is not possible (without external influence) to generate truly random numbers. Hence, computers actually generate psuedo- random numbers. The linear congruential method is a simple method for generating pseudo-random numbers. Let m be a positive integer and a be an integer 2 < a

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Pseudo-random numbers

Randomly generating numbers is a crucial subroutine of many algorithms in computer sci- ence. Because computers execute deterministic code, it is not possible (without external influence) to generate truly random numbers. Hence, computers actually generate psuedo- random numbers.

The linear congruential method is a simple method for generating pseudo-random numbers. Let m be a positive integer and a be an integer 2 < a <m, and c be an integer 0 ≤ c<m. A linear congruential method uses the following recurrence relation to define a sequence of pseudo-random numbers:

In+1=a+c mod m

(a) Use the linear congruence method with a = 8, c=5, and m = 14, to compute the first 15 pseudo-random numbers when co= 1. That is, compute zo,X1, X 14-

(b) From part (a) we should notice that, with m = 14, the sequence does not contain all 14 numbers in the set Z14. In particular because the sequence is periodic. Using m = 8, determine the value of a which does give all 8 possible numbers before repeating. For your choice of a, which choices of c give all 8 possible numbers? For each a, c pair which give all 8 possible numbers, give the terms of the sequence To...., 7 with 16 = 1

(c) When c = 0, a linear congruence generator is called a purely multiplicative generator. Consider the generator defined by:

Fn+1=65539 mod 231

Show that, modulo 231, this purely multiplicative generator is equivalent to the recurrence relation:

Hint: 65539 216 +3 = 

Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education