Given a linear congruential random number generator $x_{n+1} = (a \cdot x_n + c) \bmod m.$ We are given the first three values $x_0 = 5, x_1 = 3,x_2 = 16$ and the 50-th values $x_{50} = 2,$ what can we say about a,c and m? How to set up the equations to determine those parameters? Are those four values enough for that purpose?
2026-03-28 16:56:32.1774716992
Calculation for linear congruential generator: Setting up equations
2.4k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in ELEMENTARY-NUMBER-THEORY
- Maximum number of guaranteed coins to get in a "30 coins in 3 boxes" puzzle
- Interesting number theoretical game
- How do I show that if $\boldsymbol{a_1 a_2 a_3\cdots a_n \mid k}$ then each variable divides $\boldsymbol k $?
- Using only the digits 2,3,9, how many six-digit numbers can be formed which are divisible by 6?
- Algebra Proof including relative primes.
- How do I show that any natural number of this expression is a natural linear combination?
- Counting the number of solutions of the congruence $x^k\equiv h$ (mod q)
- algebraic integers of $x^4 -10x^2 +1$
- What exactly is the definition of Carmichael numbers?
- Number of divisors 888,888.
Related Questions in RANDOM
- Prove that central limit theorem Is applicable to a new sequence
- Generating random versions of cubic and quadratic curve
- Is product of random numbers still random?
- Can I generate a random number with the probability distribution of the area under any arbitrary function?
- Average distance from a line to a point
- When does two random measures coincide in distribution?
- Determine the maximum period of this potential random number generator, if possible
- Does a random variable come from a probability distribution or is it vice-versa?
- Expected number of operations until matrix contains no zeros.
- Mean and Variance of Random Sum of Random Variables
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
Using How to crack a Linear Congruential Generator, we can possibly crack it with the information given.
We setup the following matrix using the four given values:
$$A = \begin{pmatrix} 5 & 3 & 1 \\ 3 & 16 & 1 \\ 16 & 2 & 1 \\ \end{pmatrix}$$
The determinant of $A$ yields $-141$, which has a prime factorization of $-141 = -1^1 \times 3^1 \times 47^1$.
From this, lets assume $m = 47$ since we know the modulus has to be greater than $16$ from the given sequence.
Now, we can setup the system of congruence's:
$$5 a + c \equiv 3 \pmod {47} \\ 3 a + c\equiv 16 \pmod {47}$$
Subtracting the second from the first (to eliminate $c$), yields:
$$2a \equiv -13 \pmod{47} \implies a = 17$$
We can now substitute $a$ and $m$ into either equation and yield:
$$3(17) + c \equiv 16 \pmod {47} \implies c = 12$$
Finally, we have:
$$x_{n+1} = a x_n + c \pmod m = 17 x_n + 12 \pmod {47}$$
Testing this for $x_0 = 5$ (the first term), yields