1. Generate 4 random numbers by using linear congruenital generator.Use X0 = 21, a= 17, c=43, m=105.
"X_0=21."
"X_n=(aX_{n-1}+c)\\;mod \\;m".
"X_1=(17*21+43)\\;mod\\;105=400\\;mod\\;105=85."
"X_2=(17*85+43)\\;mod\\;105=1488\\;mod\\;105=18."
"X_3=(17*18+43)\\;mod\\;105=349\\;mod\\;105=34."
"X_4=(17*34+43)\\;mod\\;105=621\\;mod\\;105=96."
Comments
Leave a comment