954,157 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

The point is not to use an algoritham to generate random numbers it it to generate TRUE random numbers forinsance the radiation around you is argubly random and the sound waves genereated around you are seemingly random so using sound could i not generate random numbers !

kelechi96
Light Poster
45 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

> A computer is only able to generate pseudo-random numbers, if you want real random numbers: just let the user move the mouse across the screen (in a completely random way :))
> From the mouse movement you can generate a (real?) random number

tux4life
Nearly a Posting Maven
2,350 posts since Feb 2009
Reputation Points: 2,134
Solved Threads: 243
 
seemingly random

there's your problem: nothing is truly random. some things are just less predictable than others.

the fact is, you're never goign to generate truly random numbers, even if something like that existed. so be happy with the commercially available pseudo-random number generators, like the rest of the world.

if you're doing something that needs more than that, then you're working for the NSA and shouldnt be trolling Daniweb for your answers.

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 

An example of this would be to measure the amount of electrical energy in the air at any given point using some sort of analog device, which then converts this into a voltage difference, which is then converted to a digital value (usually between 0 and 4096) to represent the voltage in the air, within a given limit. This value is real world, and while not random, will fluctuate seemingly randomly (if measured in a small enough scale ie micro volts). If used as a seed for a pre-existing random function (like rand() ) this will generate the most random numbers a person can hope to generate via electrons. Using a sound file is overkill in this sense, as the direct input voltage value from the microphone should suffice, and save you a fair bit of math/sonic calculating.

skatamatic
Posting Shark
948 posts since Nov 2007
Reputation Points: 403
Solved Threads: 129
 
An example of this blah blah blah at any given point using some sort of analog device

or maybe you could sprinkle some magic fairy dust, and use some "sort of analog device" to aggregate the quantum velocities of the fairies at any given point according to Heisenfairy's Uncertainty Principle.

or you could just say fook it, and thow Schroedinger's cat into a lorenz attractor and save yourself a fair bit of math/sonic calculating, and call it 50/50.

:icon_rolleyes:


.

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 

>...then you're working for the NSA...
That's it! (see my the 1st post in the thread above ;).

"Unpredictable" or "non-reproducible" sequences (it's not the same as "random") are used for generating of forgery-resistant keys in cryptography (as usually with special external devices). In actual fact an ordinar desktop computer can generate some kind of (low-quality) "unpredictable" sequences. However it's not so simple work.

I think for non-critical applications (like OP;)) no need in methods like soundtrecks and other exotics. Get keystrokes trace (with millisecond oprecision intervals), calc SHA1 digest of this trace - that's 160 "unpredictable" bytes. Take into account that OP did not define any "randomness" criteria so any one solution is not worse that any others ;)...

Let me repeat myself: more advanced methods are a valued know-how and Daniweb is not the best place to discuss them ;)...

ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
 
An example of this would be to measure the amount of electrical energy in the air at any given point using some sort of analog device, which then converts this into a voltage difference, which is then converted to a digital value (usually between 0 and 4096) to represent the voltage in the air, within a given limit. This value is real world, and while not random, will fluctuate seemingly randomly (if measured in a small enough scale ie micro volts). If used as a seed for a pre-existing random function (like rand() ) this will generate the most random numbers a person can hope to generate via electrons. Using a sound file is overkill in this sense, as the direct input voltage value from the microphone should suffice, and save you a fair bit of math/sonic calculating.

See this is the awnser I was looking for THANK YOU +rep but how do i do this ?

kelechi96
Light Poster
45 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

or maybe you could sprinkle some magic fairy dust, and use some "sort of analog device" to aggregate the quantum velocities of the fairies at any given point according to Heisenfairy's Uncertainty Principle.

or you could just say fook it, and thow Schroedinger's cat into a lorenz attractor and save yourself a fair bit of math/sonic calculating, and call it 50/50.

:icon_rolleyes:

.

Dude that wasn't nice or fair sure you outrank me but that was bang out of order this is why these communitys are set up to try and get away from the ridicule of the "populer" comunity sure im 13 but i want to learn I actuly understood that and its a brillient methord please don't flame a good awnser or daniweb the most "friendly" comunity becomes daniweb the most friendly comunity if you do what jephthah thinks is good

kelechi96
Light Poster
45 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

or maybe you could sprinkle some magic fairy dust, and use some "sort of analog device" to aggregate the quantum velocities of the fairies at any given point according to Heisenfairy's Uncertainty Principle.

or you could just say fook it, and thow Schroedinger's cat into a lorenz attractor and save yourself a fair bit of math/sonic calculating, and call it 50/50.

:icon_rolleyes:

.


Umm...What point was made, exactly, with that post?

and kelechi96,
don't get discouraged too much, some of the people around here can be a little ignorant at times, but will usually help you out if you are willing to tolerate it.

skatamatic
Posting Shark
948 posts since Nov 2007
Reputation Points: 403
Solved Threads: 129
 

>>An example of this would be to measure the amount of electrical energy in
>>the air at any given point using some sort of analog device, which then
>>converts this into a voltage difference, which is then converted to a digital
>>value (usually between 0 and 4096) to represent the voltage in the air, within
>> a given limit.
Thanks for enlighting our minds. But could do tell how will you implement this 'magical' apparatus.

>>See this is the awnser I was looking for THANK YOU +rep but how do i do this ?
Wow, were you?
Ask him. I am no magician.
I doubt if you need that extreme randomness.

>>Umm...What point was made, exactly, with that post?
The same point which you made by yours. He just increased the randomness by a million times.

siddhant3s
Practically a Posting Shark
816 posts since Oct 2007
Reputation Points: 1,486
Solved Threads: 140
 
See this is the awnser I was looking for THANK YOU +rep but how do i do this ?

This would require a data aquisition card, an instrumentational amplifier attached to a very sensitive inductor, and amplified so that the minute changes in electrical forces in the air generate a voltage of between 0 and 5V (a bit of knowledge of instrumentation would be required). A DAQ (data aquisition card) will have a built-in analog to digital converter, so if you just wire up this small amplified 'static sensor' to one of its inputs, it will store the value (from input 0-5V being output 0-4096) in a register. How you access this register depends on the DAQ setup, which can be an entire course on its own.

This is a pretty complex method to do a very simple task (generating a random number), and while it is possible it is pretty impractical. If you are new to programming, I would sugguest spending your time on other things.

skatamatic
Posting Shark
948 posts since Nov 2007
Reputation Points: 403
Solved Threads: 129
 

this is retarded.

you won't get a reading from the free electrons in the air. you'll get a reading from the noise of the instrumentation pathway, which is deterministic.

now, i'm glad you're the hero of this 13-year-old's fantastical musings, but really, you ought to take your own advice about "spending your time on other things."

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 

This would require a data aquisition card, an instrumentational amplifier attached to a very sensitive inductor, and amplified so that the minute changes in electrical forces in the air generate a voltage of between 0 and 5V (a bit of knowledge of instrumentation would be required). A DAQ (data aquisition card) will have a built-in analog to digital converter, so if you just wire up this small amplified 'static sensor' to one of its inputs, it will store the value (from input 0-5V being output 0-4096) in a register. How you access this register depends on the DAQ setup, which can be an entire course on its own.

This is a pretty complex method to do a very simple task (generating a random number), and while it is possible it is pretty impractical. If you are new to programming, I would sugguest spending your time on other things.

Ok so all I need now is the kit which probably will be in the physics/electronics/design and technology classrooms I'll ask my teacher Mr Stephenson if I can hope he says yes ! otherwise me and my father will build it at home.

kelechi96
Light Poster
45 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 
this is retarded. ...

You're right, it's major overkill.But it's the only answer in this thread remotely close to what the OP asked.

@OP: If you really want to use a microphone (and you use windows) click here . Then just use the x-first bytes from the data you got and it will be another way to get a semi-random-number.

My personal favorite for a random number is the Mersenne twister . (Lot's of free implementations available)

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

You're right, it's major overkill. But it's the only answer in this thread remotely close to what the OP asked.

@OP: If you really want to use a microphone (and you use windows) click here . Then just use the x-first bytes from the data you got and it will be another way to get a semi-random-number.

My personal favorite for a random number is the Mersenne twister . (Lot's of free implementations available)

Perfect resopnce +rep this is SOLVED DANIWEB I LOVE YOU !!!

kelechi96
Light Poster
45 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

okay.

i agree that, in the spirit of P.T. Barnum , kelechi gave a mighty fine answer.

cheers.

.

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You