Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

You should be able to solve this

Name: The Silent Wind of Doom 2009-01-09 15:55

A common algorithm for generating pseudorandom numbers is a "linear congruential generator" which uses the following procedure:

1) A positive integer m and two integers a and b between 0 and m−1 are fixed.

2) A seed r(0) between 0 and m−1 is input.

3) After that, numbers are generated by the recurrence r(n+1) = ar(n)+b (mod m).  (So that 0 <= r(n+1) <= m−1).


The following sequence of numbers was generated in this way.

6543
6331
9584
9025
3911

Find a,b, and m.

(crossposted from /sci/, cuz i herd u liek math).

Name: Anonymous 2009-01-10 7:42


* g o a t s e x * g o a t s e x * g o a t s e x *
g                                               g
o /     \             \            /    \       o
a|       |             \          |      |      a
t|       `.             |         |       :     t
s`        |             |        \|       |     s
e \       | /       /  \\\   --__ \\       :    e
x  \      \/   _--~~          ~--__| \     |    x
*   \      \_-~                    ~-_\    |    *
g    \_     \        _.--------.______\|   |    g
o      \     \______// _ ___ _ (_(__>  \   |    o
a       \   .  C ___)  ______ (_(____>  |  /    a
t       /\ |   C ____)/      \ (_____>  |_/     t
s      / /\|   C_____)       |  (___>   /  \    s
e     |   (   _C_____)\______/  // _/ /     \   e
x     |    \  |__   \\_________// (__/       |  x
*    | \    \____)   `----   --'             |  *
g    |  \_          ___\       /_          _/ | g
o   |              /    |     |  \            | o
a   |             |    /       \  \           | a
t   |          / /    |         |  \           |t
s   |         / /      \__/\___/    |          |s
e  |           /        |    |       |         |e
x  |          |         |    |       |         |x
* g o a t s e x * g o a t s e x * g o a t s e x *

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List