I_Automation
Lifetime Supporting Member
One thing about a random number is that it CAN repeat.
If you have a single digit random number generated and it has reported 7 of the 10 number values possible that does not mean the 8th value reported will be one of the 3 remaining unused values and not repeat a previously used value. It isn't going to log values reported and make sure the next value hasn't been used in the last 9 reports - that would force a very predictable pattern after the first 9 values. The 10th would HAVE to be the only unused number, and the 11th would be the same as the 1st, 12th = 2nd, 13th = 3rd,... 43,235,678th = 8th.
It is entirely possible with a single digit random number to easily get the same number twice, or even 3 times, in a row. For a 2 digit random number even getting the same value twice in a row is easily possible.
The purpose of a random number is to be completely unpredictable, and if you can predict that the value will not be any value previously used then it is not random, but calculated.
If you have a single digit random number generated and it has reported 7 of the 10 number values possible that does not mean the 8th value reported will be one of the 3 remaining unused values and not repeat a previously used value. It isn't going to log values reported and make sure the next value hasn't been used in the last 9 reports - that would force a very predictable pattern after the first 9 values. The 10th would HAVE to be the only unused number, and the 11th would be the same as the 1st, 12th = 2nd, 13th = 3rd,... 43,235,678th = 8th.
It is entirely possible with a single digit random number to easily get the same number twice, or even 3 times, in a row. For a 2 digit random number even getting the same value twice in a row is easily possible.
The purpose of a random number is to be completely unpredictable, and if you can predict that the value will not be any value previously used then it is not random, but calculated.