Page 1 of 2

randon numbers...

Posted: Thu Aug 23, 2007 12:17 am
by Zacariaz
I do not actually need a random number generator, however i never actually learned how and if it is possible to make a computer program for that exact purpose. Surely you can make pseudo random number generators and allso you make them so complex that they seem completely random, however, every single one i have encountered has been pseudo random in essence of the metodes involved.
I am fairly certain that it is possible to make electronic random number generator somehow, that is not pseudo, given the uncertainty principle in quantum mechanincs and so on, but that is not the issue here.

Still i do not know the answer to my question, if it is possible to make an actual random number generator, and if anyone has got an answer and maybe some code (preferably c++) i would be very happy to hear about it.

Thanks

Posted: Thu Aug 23, 2007 12:30 am
by os64dev
don't make them, browse the web for 'mersenne twister' here it has a extremely large period(time it takes to repeat the sequence) and has sourcecode available. Next to that it is very very fast.

Posted: Thu Aug 23, 2007 12:33 am
by Zacariaz
Thank you, i do actually know about this one, but that was not the question. I clearly stated that i did not "need" a random number generator, but i am very interested in the question posed. As you say, in other words, the mersenne twister is still pseudo.

Posted: Thu Aug 23, 2007 12:39 am
by os64dev
I have heard about a project which used static noise from the soundcard combined with time information as well as mouse and keyboard input, but that is a while back. I know there is a password generator tool that also uses mouse- and keyboard input. The problem with these is that you cannot generate a whole lot of numbers in a very short time. static noise excluded ofcourse.

Posted: Thu Aug 23, 2007 12:51 am
by Zacariaz
Ok, well i didnt actually expect that kind of an answer. I have my self though about the possibility of doing something simular, i mean you can allways use the ever changing internet, if not any part of the local hardware, as a source.
Yes it is and answer, but not the answer i wanted, mainly because it wouldnt really be any different contruction a electroninc random number generator and plug it into your computer. We are talking about an outside source here, and that is, i think, not satisfactory. What if the net is down or the soundcard fries?

I actually asume that the real answer to the question is no, you cannot program a non pseudo random number generator, but im no genious and you guys have far more experience than me, so i wanted to ask, just to make sure.

Posted: Thu Aug 23, 2007 1:03 am
by Zacariaz
Found this one: http://random.irb.hr/
I think its very interesting and worth a look.
Asuming that what is stated on this site i am allso quite right in my assumption

Posted: Thu Aug 23, 2007 1:09 am
by Solar
/dev/random on Linux works by collecting "entropy", i.e. meaningless (random) "noise" from various sources. I don't know the specifics, but stuff like the lowest bit of the time between two keystrokes comes into mind. From that "entropy pool", you can build random numbers that are quite good.

For industrial / military appliances, I have heard of PCI cards available that generate entropy by measuring radiation "ticks" from a tiny amount of unstable isotope, which is random.

Everything that is "merely" done by an algorithm, even a complex one, is "pseudo". The difference becomes important when you use the "randomness" for cryptographic purposes (as opposed to e.g. games / AI or the like).

Posted: Thu Aug 23, 2007 1:28 am
by Zacariaz
Now that was the answer i was lookking for. I do have a quick question to close of that has absolutly nothing to do with the subject, other than the fact that i would like to try out the quantum random number generator.
In order to use it, you need to download it and in order to download it you need to register, but in order to register you need to answer a, seemingly complex math question, like:

Find the least real zero of the polynomial:
p(x) = x^3 + 5x^2 + 3x -24

Now, im actually pretty good at this math stuff, but i dont understand the question, "least real zero"? "polymonial"? It may only be bacause its in english, i hope so, but could anyone plesse explain?

Posted: Thu Aug 23, 2007 1:44 am
by pcmattman
Zacariaz wrote:Now, im actually pretty good at this math stuff, but i dont understand the question, "least real zero"? "polymonial"? It may only be bacause its in english, i hope so, but could anyone plesse explain?
Last real 0 - the last possible place that the RHS is 0 where the value for x is real? Or something like that.

Polynomial - eg. ax^3 - bx^2 + cx + d

Posted: Thu Aug 23, 2007 1:58 am
by Zacariaz
Ok, either im just plain stupid, or the mathquestion is worse than i thought. anyway i worked around it. thanks anyway...

Posted: Thu Aug 23, 2007 2:15 am
by pcmattman
If I'm not mistaken, the answer is x=1.6838.

I'm probably wrong :(

Posted: Thu Aug 23, 2007 2:36 am
by Zacariaz
cant say, i can do any math required regarding this formula, but i still dont understand the question...

Posted: Thu Aug 23, 2007 2:47 am
by Solar
Just hit reload a couple of times, it came up with a simple addition / multiplication after four times for me.

Posted: Thu Aug 23, 2007 2:49 am
by pcmattman
Solar wrote:Just hit reload a couple of times, it came up with a simple addition / multiplication after four times for me.
Cheater 8)

Posted: Thu Aug 23, 2007 4:07 am
by Zacariaz
Solar wrote:Just hit reload a couple of times, it came up with a simple addition / multiplication after four times for me.
that is just what i did, but still its enoying not being able to comprehend even the question...