is there any conceivable way to create a rng that generates different numbers for the same seed
or can someone give me the actual formula for a random number generator (not just randInt())
Visit Calccrypto for info on crypto
Recent Threads
is there any conceivable way to create a rng that generates different numbers for the same seed
or can someone give me the actual formula for a random number generator (not just randInt())
Visit Calccrypto for info on crypto
List of random number generators.
or
lmgtfy which is the second one down, on the search page.
"But sanctify the Lord God in your hearts, and always be ready to give a defense to everyone who asks you a reason for the hope that is in you, with meekness and fear;" ~ 1 Peter 3:15
thanks, but wiki doesnt tell you much. they only say that they exist
im trying to increase the randomness of my hash2x program but i cant think of any way to use any of the variables without compromising the entire algorithm
Visit Calccrypto for info on crypto
The whole point of a seed is so that you can generate the same random numbers. As for the formula, I have no idea, but it probably has something to do with bit shifting and such, most likely very complex.
What you are asking for is a function that will generate arbitrary results for a fixed input.
So, if there exists a function that produces a sequence with one input…
ƒ(x) = an
…yet goes on to produce another sequence from the same input…
ƒ(x) = bn
…but you require that the two sequences be different…
an ≠ bn
…then you can make the substitutions as follows…
an ≠ bn
ƒ(x) ≠ bn
ƒ(x) ≠ ƒ(x)
…showing that the function itself can't be in agreement with itself at any given instant.
What you are asking for is an arbitrary function. Or, something that will compute <insert sequence> given <insert function>. Unless you can get it any more well-defined than that, you're going to have a hard time programming it in.
Simpler answer: You pick one seed, you write it into your expression on paper, and then you solve it by hand. If you carry out the same procedure every time, then you should get the same answer repeatedly. Only when you try a new approach, whether it's changing the function or that pesky input, would the end result turn up as something else. This modification from the earlier test… it's called a "variable." If one number were chosen to replace it, and then all answers followed suit, then the initial input might be dubbed a "seed."
Alternate ending: You discover that by looking at your function weirdly enough, you are able to inexplicably force it to take on a new behavior from all of its previous trials. Alas, the logic is inescapable; the manner in which you looked at your function is also a variable – a veritable seed in the budding, and a "seed" in the dubbing.
Nutshell answer: Any expression with a constant form isn't going to trade results with the void. An effect requires a cause, and in the case of a RNG, that "push" is going to be the seed – that's what it's there for.
so any idea about how to generate random numbers with an actual equation?
i know there are equations like

but what are good numbers for the constants for equations like this?
also, my main problem is that only one random number is needed everytime the progam is run
Visit Calccrypto for info on crypto
On a TI-84+, you can use the clock like so: startTmr→rand
Otherwise, a dirty trick on the 83+ is to seed rand or a function of your choosing with the user's reaction time:
getKey
0
ClrHome
Output(2,3,"Title Screen
Output(7,2,"Press any key!
Repeat getKey
Ans+1
End
Ans→rand
ClrHome
rand
The first line is the dummy getKey covered here (just above Error Conditions).
thanks, but i had hoped to be able to change it to computer code too, so maybe one day hash2x might be written in different languages and still produce the same checksums. since "rand" doesnt always use the same algorithm in every language, i was hoping to have a constant formula that only relies on constant stuff, not the speed of a user/the choice of how the function of a language works
wiki:
LCGs should not be used for applications where high-quality randomness is critical.
Visit Calccrypto for info on crypto
"create a rng that generates different numbers for the same seed"
To reiterate… an RNG with the characteristics you say are not practical; the point of having a seed is to be able to generate the same sequence associated with that particular seed across different platforms.
"LCGs should not be used for applications where high-quality randomness is critical."
In any event, that LCG's are not "random enough" (more precisely, their periods are too short, among other weaknesses) are the reason why you have things like the "Mersenne twister" or "Blum-Blum-Shub"; go search for these topics on Google Scholar.
There's also a discussion of RNGs in Numerical Recipes (http://www.nrbook.com/ ), check it out.
thornahawk
thanks i think
Visit Calccrypto for info on crypto
arrrgggg. the site wants me to subscribe to them. im not that crazy.
so any ideas on how to write the actual equation for a good rng?
Visit Calccrypto for info on crypto
would it be a better idea to mess around with large but not prime numbers for randomness or mod by large prime numbers? both of them seem to work well for my program
Visit Calccrypto for info on crypto
If you'll only have one random number per run (and if the seed doesn't carry over from one generation of the program to the next), then it doesn't matter what the function is: whatever input it's given would itself have to be random in order for the expression to yield an unpredictable answer, and the randomness of that input would have to be computed somehow, ad infinitum. Where do we find that baseline element which can be measured, but not preprogrammed?
Some advanced machines can record static noise or radiation and use those for the purposes of generating random numbers. Another method is the timing of user input. Yet another approach (something that I have actually seen used in a computer program before) is where a text box appears and the user is instructed to bang on the keyboard for a few seconds. If that's not a successful RNG, then I don't know what is. (Kidding, of course.)
hahaha. i've never heard of that way before, but it sure is effective.
as for the algorithm, i guess i'll use either
E+round((3^16-10)fPart((2^16-1+E+round(fPart(((331((Sum of Original String+E))/2)/(2^32-1)))(2^32-1),0)2-E)/(3^16-10)),0→F
or
E+round((3^16+26)fPart((2^16+1+E+round(fPart(((331((Sum of Original String+E))/2)/(2^16+1)))(2^16+1),0)2-E)/(3^16+26)),0→F
but i dont know which one to chose. both are good, from what i have seen
Visit Calccrypto for info on crypto
The Second Edition of the book is freely available: http://www.nrbook.com/nr3/
thornahawk