Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

Python Indeterminate System from a Deterministic System

First thing we must do is make sure everyone is using the same definitions. Deductive Logic is used. Distinguishing correct reasoning from incorrect reasoning is the task of logic.



Define: Unknowable, not able to be known. Lying beyond the limits of human experience or understanding, unknowability.

If the argument is that the variable being used is knowable, the following is the rebuttal.

When you use a stopwatch to time an event for example. You push the button to start the 'event', you cannot know the exact nanosecond that the event started. All you know is that you marked the beginning of the event. Even on a computer you can't know the exact nanosecond an event started because time moves only one direction. One cannot measure something that has not happened yet. If this is true, then good so far.

If not, it is your turn to explain exactly how it is knowable.



Define: Determinate, having exact and discernible limits or form, conclusively determined : DEFINITIVE.

There is no question digital computers are determinate as understood today. A poor example of a Determinate System: A pail of white paint. As long as only white paint is put into the pail and only white paint taken out it can represent a Determinate System. If this is understood as true, then good so far.



Define: Indeterminate, not exactly known, established, or defined. Not definitely or precisely determined or fixed, vague. Not known in advance. Not leading to a definite end or result. MATHEMATICS: (of a quantity) having no definite or definable value, conclusively indetermined.

Using the determinate white paint example. We can make it indeterminate by adding a colored paint. Now the unwhite paint is not a deterministic system any more.



I want the best random numbers I can get. I'm looking at what defines a random number set. There is no definitive standard for random numbers according to NIST. I think that "Best Possible Mean minus Standard Deviation" may be the way to get great random numbers.



Define “Best Possible Mean: Is the same as Mean, add all numbers in list and divide by number of items. I write it this way so it is understood that the best it can be is “Best Possible Mean”. Working with binary the “Best Possible Mean” is:

0 + 1 = (1 / 2) = 0.5.

Define Standard Deviation: A standard deviation (or σ) is a measure of how dispersed the data is in relation to the mean. Low, or small, standard deviation indicates data are clustered tightly around the mean, and high, or large, standard deviation indicates data are more spread out.

The closer to “Best Possible Mean” and random is what the goal is. Therefore “Best Possible Mean” minus Standard Deviation is a concrete base for random. It gives a definitive way of working with random numbers.

I'm looking at what makes a random number random, as well as how to qualify random numbers.
I'm looking for the best base to work from. I challenge everything. I believe that digital computers CAN make "real" random numbers. I know digital computers are deterministic as understood today. If you add an unknowable properly the Deterministic System becomes an Indeterminate System.



What does “unknowable” mean? The future is unknowable because the future is dependent on everything that has happen before. Unless you can “know” the future, you cannot know an “unknowable”.



Deterministic System is a system in which no randomness is involved in the development of future states of the system.



Fact: All digital computers run by deterministic programs! However, when you add an unknowable the Deterministic System becomes indeterminate. Poor Example: You have a bucket of white paint to represent a Deterministic System. As long as you only take white paint out or put white paint in it’s deterministic, you will get white paint. Now when you throw a little unknown colored paint into the mix what do you get but an Indeterminate System.


When you use a stopwatch to time an event for example. You push the button to start the 'event', you cannot know the exact nanosecond that the event started. All you know is that you marked the beginning of the event. Even on a computer you can't know the exact nanosecond an event started. If this is true, then good so far.
This 'time' at the start of an event is what we want for the 'seed' for random numbers. It's how 'time' is used to make the seed that is important. Using 'time' alone does not work at all. I've found out how to use 'time' Nanosecond time to make perfect 'seeds'.

As far as I know this is the best definition of "Random".

1. It looks random. This means that it passes all the statistical tests of randomness that we can find.

2. It is unpredictable. It must be computationally infeasible to predict what the next random bit will be, given complete knowledge of the algorithm or hardware generating the sequence and all of the previous bits in the stream.

3. It cannot be reliably reproduced. If you run the sequence generator twice with the exact same input (at least as exact as humanly possible), you will get two completely unrelated random sequences.


The output of a generator satisfying these three properties will be good enough for a one-time pad, key generation, and any other cryptographic applications that require a truly random sequence generator.



The following data is from my twenty-two line “real random number generator” program in Python 3.7.

This is the Standard Deviation of 400 sets of 10,000 random binary bits (0,1) broken into four equal parts. Each part comprises of 100 sets of 10,000 random bit, 1,000,000 bits total. The four groups together is 4,000,000 bits. The best that can be achieved is 0.5., and that is not random, it is in order.

0.499993153 - 0.5 = -0.000007

0.500000244 – 0.5 = 0.00000002.44

0.499995232 – 0.5 = -0.000005

0.4999945 – 0.5 = -0.000006

I always give data from a data set so it can be verified if needed. There is going to be a very small remainder because it IS random (example_0.00000). Doesn’t get any better than this.



This knowledge will affect: Number Theory; Linear and Multilinear Algebra; Potential Theory; Statistics; Numerical Analysis; Statistical Mechanics, Structure of Matter.



The following is Copyrighted: Copyrighted owner data is public data.



#80462747



Python 3.7 - By: Leonard Dye, P.O.Box 1456, Waldport, Or. 97394, [email protected]



Real Random Number Generator​



Code:
import time
import random

number_of_needed_numbers = 10000
lower_value = 0
upper_value = 1
count = 0
short_time = 0.00000000000001
OFFSET_TIME = 0.03258312993051001


while count < number_of_needed_numbers:
     start_time = time.time()
     start_time2 = start_time - OFFSET_TIME
     time.sleep(short_time)
     end_time = time.time()
     total_seed = end_time - start_time2
     random.seed(total_seed)
     random_number = random.randint(lower_value, upper_value)
     count = count + 1
     print(random_number)
_________________________________________________________


As soon as it is recognized as correct, then I can explain what and how this program came into being. There is a lot of great research to be done now. I just opened the door to a place to investigate. Random numbers are very interesting. This advancement will make digital computers much more powerful.

I am hoping my work will inspire others to explore and challenge everything. Must follow the laws of nature and logic. A word about ‘logic’. It is the one thing that I use that is not taught in schools. It is as important as understanding the laws of nature or physics.

Any thoughts are welcome. The facts will stand up to the ‘hard look’ by anyone. There is more that I have learned but cannot be understood till ‘real random numbers’ CAN be made by digital computers is understood as fact.

Think what can be done with everybody being able to have real random numbers. Encryption on the fly. Data stored encrypted, no more ransom for data. All they would have is encrypted files that they cannot read. This is just one gain from this.

All constructive comments are welcomed. Questions are great.
 

Attachments

If I understand your code correctly, you are using the difference between two times to seed the `Python random number generator.
time.time() returns the time as a double in seconds so, given the very short wait the two times, the results will differ by some small amount. Given the limited precision of the computer’s timer there may even be zero difference (eg some older PCs report times in increments of 1/60 sec).
Because the time values also have finite precision this gives you a limited number of possible seeds, so you will always get one of the same limited set of random values.

You could confirm/refute this by printing the seeds..
 
Last edited:
I understand you problem. This is new knowledge. You have to read an understand there is more to this. This is just the first part. If this is not accepted then what else I've found is lost.
You did not ask the important question. What is the offset? That will be explained later. For now realize that the program creates the data supports the premise. There is a lot of research to be done now. How many "unknowns" are there? How can they be used?
Not everything we have been taught is correct. Challenge everything! It has to follow deductive logic and nature or physics. See items as objects.
Thanks for your thoughts,



Logical Explanation:

Define: Unknowable, not able to be known. Lying beyond the limits of human experience or understanding, unknowability.
If the argument is that the variable being used is knowable, the following is the rebuttal.
When you use a stopwatch to time an event for example. You push the button to start the 'event', you cannot know the exact nanosecond that the event started. All you know is that you marked the beginning of the event. Even on a computer you can't know the exact nanosecond an event started because time moves only one direction. One cannot measure something that has not happened yet. If this is true, then good so far.

If not, it is your turn to explain exactly how it is knowable.


Define: Determinate, having exact and discernible limits or form, conclusively determined : DEFINITIVE.

There is no question digital computers are determinate as understood today. A poor example of a Determinate System: A pail of white paint. As long as only white paint is put into the pail and only white paint taken out it can represent a Determinate System. If this is understood as true, then good so far.

Define: Indeterminate, not exactly known, established, or defined. Not definitely or precisely determined or fixed, vague. Not known in advance. Not leading to a definite end or result. MATHEMATICS:(of a quantity) having no definite or definable value, conclusively indetermined.

Using the determinate white paint example. We can make it indeterminate by adding a colored paint. Now the unwhite paint is not a deterministic system any more.

I hope this will help with understanding these principles. I want to be clear an concise. I believe my work will be important. It is of no use if it is not able to be explained properly.
 
If I understand your code correctly, you are using the difference between two times to seed the `Python random number generator.
time.time() returns the time as a double in seconds so, given the very short wait the two times, the results will differ by some small amount. Given the limited precision of the computer’s timer there may even be zero difference (eg some older PCs report times in increments of 1/60 sec).
Because the time values also have finite precision this gives you a limited number of possible seeds, so you will always get one of the same limited set of random values.

You could confirm/refute this by printing the seeds..
You miss the point. I don't disagree with you thought process. However, the question is not how I did it. DOES the data prove the premise? Forget what you know for now and answer that question? That is all we need to look at for now. More information after it is accepted. If I tried to explain it without this being accepted, itr would just be confusing and discarded. That is why it is done this way.

To see the seed all you have to do is add a print statement.
Code:
total_seed = end_time - start_time2
random.seed(total_seed)
print("Seed ", total_seed)
add print statements where needed to get the variable value.
 
You miss the point. I don't disagree with you thought process. However, the question is not how I did it. DOES the data prove the premise? Forget what you know for now and answer that question? That is all we need to look at for now. More information after it is accepted. If I tried to explain it without this being accepted, itr would just be confusing and discarded. That is why it is done this way.

To see the seed all you have to do is add a print statement.
Code:
total_seed = end_time - start_time2
random.seed(total_seed)
print("Seed ", total_seed)
add print statements where needed to get the variable value.
 

Attachments

If you get a million "seeds" and do the hard work and see what they are. Are they close to 'best possible mean'? There are many, many ways to look at numbers because they are objects. 1 is an object. Box with 1 inside is an object controlled by deductive logic and nature or physics just like the 1. As long as you follow those rules when exploring the world, you may see new possibilities.
 
1. No. 2. Yes.
1. Is trivial
2. Is very interesting. A ordinary computer’s cpu is deterministic and incapable of creating true randoms (although it can generate sequences of bits that can safely be used in place of true random in practical applications such as cryptography). They can achieve a more random result by using external data such as the time as a seed. In general almost any external connection can potentially be used to get a seed.
Going one level deeper, the macroscopic world doesn’t offer much true randomness. What seems random is just the result of limited knowledge of chaotic systems. The only source of true randomness is in the world of quantum mechanics, eg timing the decay of radioactive nuclei - see This RNG kit
Conclusion; a computer with a quantum RNG is indeterminate and thus capable of indeterminate outputs.


ps; I ignored the offset because it’s a constant that isn’t going to make anything any more or less random
 
DOES the data prove the premise?
No. An appropriate standard deviation is a necessary but not a sufficient condition. You can write deterministic programs to output predictable data with any specified std. See This Wikipedia article to understand just how hard it is the test data for true randomness.
That’s why it‘s useful to look at how the data is generated.
 
Thanks for your input! Understanding random numbers is difficult. Let's start at the beginning. First let work on the base or something that will give a concert way of working with random.
So first let's talk about the math I use. Standard deviation minus "Best Possible Means". Do you agree that this is a proper base?
Code:
Define “Best Possible Mean: Is the same as Mean, add all numbers in list and divide by number of items. I write it this way so it is understood that the best it can be is “Best Possible Mean”. Working with binary the “Best Possible Mean” is: 0 + 1 = (1 / 2) = 0.5.

Define Standard Deviation: A standard deviation (or σ) is a measure of how dispersed the data is in relation to the mean. Low, or small, standard deviation indicates data are clustered tightly around the mean, and high, or large, standard deviation indicates data are more spread out.

The closer to “Best Possible Mean” and random is what the goal is. Therefore “Best Possible Mean” minus Standard Deviation is a concrete base for random. It gives a definitive way of working with random numbers.
Please let me know your answer!
Screenshot 2024-01-03 102813.png
 
Thanks for your input! Understanding random numbers is difficult. Let's start at the beginning. First let work on the base or something that will give a concert way of working with random.
So first let's talk about the math I use. Standard deviation minus "Best Possible Means". Do you agree that this is a proper base?
Code:
Define “Best Possible Mean: Is the same as Mean, add all numbers in list and divide by number of items. I write it this way so it is understood that the best it can be is “Best Possible Mean”. Working with binary the “Best Possible Mean” is: 0 + 1 = (1 / 2) = 0.5.

Define Standard Deviation: A standard deviation (or σ) is a measure of how dispersed the data is in relation to the mean. Low, or small, standard deviation indicates data are clustered tightly around the mean, and high, or large, standard deviation indicates data are more spread out.

The closer to “Best Possible Mean” and random is what the goal is. Therefore “Best Possible Mean” minus Standard Deviation is a concrete base for random. It gives a definitive way of working with random numbers.
Please let me know your answer!
View attachment 2489
You realize that all formulas dealing with random number testing except my formula are approximations!
 
I’m familiar with basic statistical measures. I have no idea what ’…are approximations’ means. The formulae are what they are. I can‘t compare them with your formula because you haven’t shown it.
You mention standard deviation, but of course that‘s meaningless when the data values are all 1 or 0.

in any case, as I said before, mean/std etc don’t measure “randomness’. The pseudo-random numbers generated by Python’s methods meet all the statistical criteria while being deterministic.
if I may suggest… fewer words and more focus would help. What exactly is the insight that you are trying to share with us?
 
Last edited:
Do some work, please. Go to NIST and get the whole package and do the work. It is very easy to say something. Much harder to prove it with mathematics. Remember this is new. Not everything you have been taught is carved in stone!

That was the first thing that I had to do was find a way to mathematically calculate random. Some questions I had to answer. What are we getting when we get a "set" of random numbers. They all have to be within "range". This means we are working with unknown numbers that have by definition have to be balanced. What is balanced? Look at the random set snapshot. You will notice the 5.17 per set, per 400 sets of 10000. This number will increase and decrease as data is added. Notice the chart "above and below" the 5000 which is the middle of the 10000.

I enjoy the questions! It's good. I have worked with billions of data bits in sets, 35 years worth because there was no definitive definition of random. Please show how my formula is not definitive. Once we have a definitive formula then other random number generators can be checked against it.
This is good debate if we show the math. Where I'm incorrect. I have no problem if I'm incorrect. Think about this, I have opened the door to "indeterminate system from a determinate system" How many unknowns are there? What could the be used for?
 
Understanding the Formula to Qualify Random Numbers​



“Best Possible Mean” minus Standard Deviation:

Define “Best Possible Mean: Is the same as Mean, add all numbers in list and divide by number of items. I write it this way so it is understood that the best it can be is “Best Possible Mean”. Working with binary the “Best Possible Mean” is: 0 + 1 = (1 / 2) = 0.5.​
​
Define Standard Deviation: A standard deviation (or σ) is a measure of how dispersed the data is in relation to the mean. Low, or small, standard deviation indicates data are clustered tightly around the mean, and high, or large, standard deviation indicates data are more spread out.​

The closer to “Best Possible Mean” and RANDOM is what the goal is. Therefore “Best Possible Mean” minus Standard Deviation is a concrete base for random. It gives a definitive way of working with random numbers.

Now to deal with RANDOM with mathematics:
It looks random. This means that it passes all the statistical tests of randomness that we can find.​
​
It is unpredictable. It must be computationally infeasible to predict what the next random bit will be, given complete knowledge of the algorithm or hardware generating the sequence and all of the previous bits in the stream.​
​
It cannot be reliably reproduced. If you run the sequence generator twice with the exact same input (at least as exact as humanly possible), you will get two completely unrelated random sequences.​

The output of a generator satisfying these three properties will be good enough for a one-time pad, key generation, and any other cryptographic applications that require a truly random sequence generator.

I hope this makes things clearer.
 
So here we are back at the beginning And I still can’t get to whatever it is you are explaining.
Crypto does NOT need true random; it just needs to pass your first two tests (with one secret allowed for test 2). The third is not necessary, and is maybe undesirable because it prevents reproducible results for testing/regression testing etc.
We already have a wide choice of pseudo-random algorithms that allow us to use crypto etc at levels good enough for the CIA etc. We also have quantum hardware that delivers true randomness.
In conclusion; I don’t see the practical need for another kind of random RNG.

Maybe your approach will lead to a breakthrough in our understanding of randomness in a deterministic system - I’m not qualified to judge that - but I wish you luck In your journey.
J
 
Ok! I put the training wheels on. I forgot that America does not teach “Deductive Logic” because it makes independent thinking people. In America we cannot have that. America wants good people to follow what their told.

Understanding the Formula to Qualify Random Numbers

“Best Possible Mean” minus Standard Deviation:​

• Define “Best Possible Mean: Is the same as Mean, add all numbers in list and divide by number of items. I write it this way so it is understood that the best it can be is “Best Possible Mean”. Working with binary, the “Best Possible Mean” is: 0 + 1 = (1 / 2) = 0.5.

• Define Standard Deviation: A standard deviation (or σ) is a measure of how dispersed the data is in relation to the mean. Low, or small, standard deviation indicates data are clustered tightly around the mean, and high, or large, standard deviation indicates data are more spread out.

The closer to “Best Possible Mean” and RANDOM is what the goal is.

Therefore “Best Possible Mean” minus Standard Deviation is a concrete base for random. It gives a definitive way of working with random numbers.


Now to deal with random with mathematics:

• It looks random. This means that it passes all the statistical tests of randomness that we can find.
• It is unpredictable. It must be computationally infeasible to predict what the next random bit will be, given complete knowledge of the algorithm or hardware generating the sequence and all of the previous bits in the stream.
• It cannot be reliably reproduced. If you run the sequence generator twice with the exact same input (at least as exact as humanly possible), you will get two completely unrelated random sequences.

The output of a generator satisfying these three properties will be good enough for a one-time pad, key generation, and any other cryptographic applications that require a truly random sequence generator.

“Best Possible Means” = 0.5

Closest to Best possible means = .50000000001 - Best possible Mean 0.5 – 499999999999.

Understanding the above concepts the question becomes “Is this a concrete formula to understand random numbers?”

This information is exactly like the previous post in this forum by me.

Any thoughts will be appreciated.
 
conjecture: time.sleep() is causing the unpredictability, because "exactly" how long it takes is not controlled by the program.

The exact duration of that call is effected by the multi-tasking state of the operating system, and the other programs in memory. Which is complicated, but not random.

"...given complete knowledge of the algorithm or hardware..."

That could be a hole in your argument.

If a simulator was given complete knowledge of the clock, the cpu, and the entire memory, then the next so-called "random" number can be calculated.

PS: 0 + 1 does not equal 0.5

Just my opinion.
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom