27.2 Generate 15 numbers using a seed of x0 = 1 in the following generator: xn = (5xn-1+ 1) mod16
I HOPE ITS HELP FUL TO YOU IF YOU HAVE ANY DOBUTS PLS COMMENTS BELOW..I WILL BE THERE TO HELP YOU...ALL THE BEST..
AS FOR GIVEN DATA...
Generate 15 numbers using a seed of x0 = 1 in the following generator: xn = (5xn-1+ 1) mod16
EXPLANATION ::-
Rcode:
> options(scipen = 999)
> x<-vector()
> x[1]=1;
> for(i in 2:15){
+ x[i]=((5*x[i-1])+1)
+ x[i]=x[i]%%16
+ }
> ks.test(x,"pnorm")
One-sample Kolmogorov-Smirnov test
data: x
D = 0.91058, p-value = 0.0000000000000006661
alternative hypothesis: two-sided
a)
1 6 15 12 13 2 11 8 9 14 7 4 5 10 3
I HOPE YOU UNDERSTAND...PLS RATE THUMBS UP..ITS HELPS ME ALOT
THANK YOU....!!
27.2 Generate 15 numbers using a seed of x0 = 1 in the following generator: xn = (5xn-1+ 1) mod16
Generate 10 random numbers using the following linear congruential generator with 7 as the seed: si+1 = (5 * si + 1) mod 20.
What is the period-length of the Linear Congruential Generator Xn+1 = (2Xn + 5)mod13 with seed Xo = 8? Numeric Answer: ! Cannot be empty What is the period-length of the Linear Congruential Generator Xn+1 = (2Xn + 5)mod13 with seed Xo = 1? Numeric Answer: 1 O Cannot be empty Linear Congruential Generator: Example 2 Homework • Unanswered What is the period-length of the Linear Congruential Generator Xn+1 = (1Xn + 5)mod13 with seed Xo = 1? Numeric Answer:...
11. What sequence of pseudorandom numbers is generated using the linear congruential generator xn +1 (4xn + 1) mod 7 with seed Xo-37 12. Encrypt the message STOP POLLUTION by translating the letters into numbers, applying the encryption function/ P)-(p + 4) mod 26, and then translating the numbers back into letters. 13. Decrypt this message encrypted using the shift cipher f (p) (p+ 10) mod 26 CEBBOXNOBXYG 14. Let P() be the statement that 12 +22 ++n2 -n-)(en+2) for...
For the following LCG generator: Xi = (13Xi1 + 13)(mod(16)), X0 = 37. What is the maximum possible period length for this generator? Does this generator achieve the maximum possible period length? Justify your answer. Generate 2 pseudo-random uniform numbers for this generator. Xo=37, a=13, c=13, m=16
A) What sequence (At least 8 sequences) of pseudorandom numbers is generated using the linear congruential generator xn+1 (3xn2) mod 13 with seed Xo- 1? B)Find the sequence of pseudorandom numbers generated by the power generator with p-7, d-3, and seed xo 2
Let X0,X1,... be a Markov chain whose state space is Z (the integers). Recall the Markov property: P(Xn = in | X0 = i0,X1 = i1,...,Xn−1 = in−1) = P(Xn = in | Xn−1 = in−1), ∀n, ∀it. Does the following always hold: P(Xn ≥0|X0 ≥0,X1 ≥0,...,Xn−1 ≥0)=P(Xn ≥0|Xn−1 ≥0) ? (Prove if “yes”, provide a counterexample if “no”) Let Xo,Xi, be a Markov chain whose state space is Z (the integers). Recall the Markov property: P(X,-'n l Xo-io, Xi...
Use linear congruential generator with seed value 31, a = 11, c = 17, m = 100 and inverse transform technique to generate: 10 continuous uniform random variates on interval [1; 10]; [5] 10 exponential random variates with parameter λ = 3. [2] It is suspected that the generated random numbers (Ri) are autocorrelated, since an observer notices that every 4th number starting (but not counting) from the 1st number (i.e. i = 1) is larger...
Alice is using a linear congruential generator, axi + b mod 11, to generate pseudo-random numbers. Eve sees three numbers in a row, 3, 5, 0, that are generated from Alice’s function. What are the values of a and b?
Write a program in C to generate random numbers. The program recieves 4 items on activation through argv: 1. Name of the data file 2. Number of items for program to generate 3. Range of numbers 4. Seed of the random number generator Example run: ./rand datafile.txt 20 1000 3127 Program must convert all numbers to ints using atoi(), must save all parameters into variables, opens the data file to write the random numbers into it, program loops to generate...
This homework is an approach to generating random numbers. In this technique a seed value is used to construct a new (seemingly random) value in the following manner: The seed, s, is written down in n-bit binary. Several bit positions, called taps, are used to generate a feedback bit. Bit n-1 is always one of the taps. The feedback bit, f is the exclusive-or of the tap bit values The seed is shifted to the left...