B
B
beginer1232017-06-03 14:20:30
Programming
beginer123, 2017-06-03 14:20:30

Random number (own function) and a question about random events?

Hello, I recently asked myself questions:
1. Let's say you are faced with the task of writing a random number function
How to do this ??
How can this be made
clear that there are functions like rnd(10) everywhere. Let's say
on paper, how to do this?
2. And are there basically random events?
Let's take a classic example: a coin toss
Is it a 100% random event?
and does not depend, let's say, on the strength of the throw, the initial location of the coin?
And what are some examples of completely random events in life?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Armenian Radio, 2017-06-03
@gbg

Now the decay of an atom of matter is considered an absolutely random event - no one can figure out how to change the probability of this decay.

P
pfg21, 2017-06-03
@pfg21

the most convenient random number at hand is to measure the power value, the more complex the device, the more noise there is.
Now in most microcontrollers there is a built-in ADC with a large margin of capacity, the low bits are just a truly unpredictable source of a random number.
you discard the older "significant" bits, you collect the younger ones, plus you thin them out from repetitions.
option 2: a separate special conductor antenna, which passes under noisy modules, such as pulse converters, collects noise from there.

R
res2001, 2017-06-04
@res2001

The strength of the throw is the same random value if a non-engaged person throws. The initial location of the coin is the same. So these factors only add to the "randomness".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question