randon numbers...

Programming, for all ages and all languages.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

randon numbers...

Post 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
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post 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.
Author of COBOS
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post 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.
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post 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.
Author of COBOS
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post 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.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post 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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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).
Every good solution is obvious once you've found it.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post 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?
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

Ok, either im just plain stupid, or the mathquestion is worse than i thought. anyway i worked around it. thanks anyway...
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

If I'm not mistaken, the answer is x=1.6838.

I'm probably wrong :(
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

cant say, i can do any math required regarding this formula, but i still dont understand the question...
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Just hit reload a couple of times, it came up with a simple addition / multiplication after four times for me.
Every good solution is obvious once you've found it.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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)
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post 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...
Post Reply