I am reading a paper on random numbers generation on congruential method(adsbygoogle = window.adsbygoogle || []).push({});

785 = 308a + k (mod 1024)

930 = 785a + k (mod 1024)

the solution is a=69 and k=13

Here is how I solve the problem. I multiply both side with 1024 such that the "mod" on the right side gone ,i.e.

785*1024 = 308a + k

930*1024 = 785a + k

subtract one from another gives

477a = 148480 ===> a = 311.2788

but this is wrong. What is the right way to solve this kind of equations?

Thanks.

**Physics Forums - The Fusion of Science and Community**

# How to solve the equations with modulo m

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: How to solve the equations with modulo m

Loading...

**Physics Forums - The Fusion of Science and Community**