Generate random numbers by hand?

  • Context: High School 
  • Thread starter Thread starter mishima
  • Start date Start date
  • Tags Tags
    hand Numbers Random
Click For Summary
SUMMARY

This discussion focuses on generating random numbers by hand, specifically using a Sharp EL-W516 calculator to create random fractions. The conversation highlights the use of linear congruential generators (LCGs) for simulating random number generation, with the formula u_n = s_n / M and s_{n+1} = (A s_n + C) mod M. The parameters A, C, and M are crucial for achieving a large period, with the recommended values being M=2^31-1, A=7^5, and C=0. The distinction between pseudo-random and true random numbers is also emphasized, noting that true randomness is challenging to achieve without a nondeterministic physical process.

PREREQUISITES
  • Understanding of linear congruential generators (LCGs)
  • Familiarity with basic probability distributions
  • Knowledge of modular arithmetic
  • Basic calculator operations
NEXT STEPS
  • Research the implementation of linear congruential generators in programming languages
  • Explore the concept of true randomness versus pseudo-randomness
  • Learn about different probability distributions for random number generation
  • Investigate physical processes for generating true random numbers
USEFUL FOR

This discussion is beneficial for mathematicians, computer scientists, game developers, and hobbyists interested in random number generation techniques and their applications in simulations and gaming.

mishima
Messages
576
Reaction score
43
Hello, my calculator (sharp el-w516) can generate random fractions like 237/431. I was curious if there was a way to do this by hand.

I would like to be able to roll any sided die by multiplying the random fraction by the side number. For example if I wanted to roll a d20 I could take the fraction and multiply by 20 and round to nearest to simulate a dice roll.

I vaguely understand how random numbers are generated using properties of electronics so maybe its impossible to do solely by hand. I was just wondering if there was a way to do it without even tables or anything.
 
Mathematics news on Phys.org
If you want to generate random numbers you of course first need to think about what distribution you want.

If for instance, which is maybe what you mean, you want to draw random numbers uniformly from an interval (a,b), then there are several algorithms that can do so. For instance linear congruential generators, which have the form:

u_n=\frac{s_n}{M}, s_{n+1}=(As_n+C)mod M

The difficulty is choosing A,C, M such that the period is large, but M=2^31-1, A=7^5, C=0 is a good choice, for instance.

On a more philosophical level, you can ask: what is randomness? Since there is a mechanism, true random cannot be achieved. You can test for uniformity properties that you would desire from random numbers.
 
Hi, thanks for the quick response. I've never had a discrete math course so the formula is a bit foreign to me. Are you saying that u sub n is a coordinate pair or is that 2 separate formulas? Can you show me an example using that formula if my interval is (1, 20)? Thank you.
 
Use Icosahedron dice (20) faces number the sides 0-9 use the numbers as digits, use multiple dice or multiple throws.
 
Sorry, I guess that formula was pretty trivial. I understand now, like if I chose all 7s it would be:

s1 = (7*7+7) mod 7 = 0

u1= 0/7 = 0

So this would be like a 1 on a d20 roll.

Now I would just need a way to enter the sequence (with larger multipliers, etc) at a random point, so that I'm not always going through the same numbers.
 
mishima said:
Sorry, I guess that formula was pretty trivial. I understand now, like if I chose all 7s it would be:

s1 = (7*7+7) mod 7 = 0

u1= 0/7 = 0

So this would be like a 1 on a d20 roll.

Now I would just need a way to enter the sequence (with larger multipliers, etc) at a random point, so that I'm not always going through the same numbers.

You should realize that these are pseudo-random numbers, meaning that although they satisfy all known statistical tests for randomness, they're actually not random. They're generated by an algorithm. If you ran the algorithm a hundred times you'd get the same sequence of "random" numbers every time.

If you want psuedo-random numbers those are easy. But generating a truly random number is very difficult. You'd have to start with some completely nondeterministic physical process, like the decay of an atomic nucleus or some such.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 21 ·
Replies
21
Views
8K
  • · Replies 32 ·
2
Replies
32
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
Replies
17
Views
10K
  • · Replies 8 ·
Replies
8
Views
2K