C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 11-30-2006, 11:41 AM   #1
Registered User
 
Join Date: Nov 2006
Posts: 19
Will we ever have truly random numbers?

Will it ever be posible to generate truly random numbers? I know that just about every language I've been in contact with (by no means does that mean I am skilled with every one of them) has a function to generate pseudorandom numbers. To me it seems a computer is inevitably doomed to produce only pseudorandom numbers, since it is a machine that always functions logically (even errors have a logical reason that might nonetheless have to be understood only in a deeper level of logic). Could chaotic signals from analog circuits be the answer? I would really like to know what the experts think.
jalnewbie is offline   Reply With Quote
Old 11-30-2006, 11:47 AM   #2
MENTAL DETECTOR
 
whiteflags's Avatar
 
Join Date: Apr 2006
Location: United States
Posts: 3,278
> Will it ever be posible to generate truly random numbers?
Not at long as computers are using math to do it. This is why computers are so much better at taking an ordered series and putting it in random order.

But if they were measuring something ...
http://random.org/
whiteflags is offline   Reply With Quote
Old 11-30-2006, 12:03 PM   #3
Registered User
 
Join Date: Nov 2006
Posts: 19
excellent point

I hadn't thought about it like that. I guess you don't have to go as complicated as chaotic signals to produce a random number.
jalnewbie is offline   Reply With Quote
Old 11-30-2006, 12:12 PM   #4
Fear the Reaper...
 
Join Date: Aug 2005
Location: Toronto, Ontario, Canada
Posts: 625
The idea though I think is for most applications, pseudo-randomness will suffice, so long as the generator is built properly.
__________________
Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction
Happy_Reaper is offline   Reply With Quote
Old 11-30-2006, 12:42 PM   #5
Call me AirBronto
 
Join Date: Sep 2004
Location: Indianapolis, Indiana
Posts: 195
the only way to get a real random number would to be record a physical events out come, so you would have to have a physical thing happen in your computer, then you would have to have a way to confine its spectrum and then read is from sensors. this would have to be a special part in a computer so it is not worth it if possible.
loopshot is offline   Reply With Quote
Old 11-30-2006, 01:05 PM   #6
Registered User
 
Join Date: Nov 2006
Posts: 19
I agree the scope of the app determines the randomness

A pseudorandom number is indeed sufficient for most applications. Nevertheless it is interesting to play with the idea of using a source of enthropy to generate truly random numbers (I read about the concept just now at www.random.org, thanks a bunch for posting it). One goes through high school toiling through classes and topics with no apparent relation to computers (Physics > Enthropy, for example) and then, surprise! Just makes me love programming all the more and makes me feel like part of the tao that we seem to be a part of.
jalnewbie is offline   Reply With Quote
Old 11-30-2006, 01:06 PM   #7
Registered User
 
Join Date: Jun 2005
Posts: 1,433
Quote:
Originally Posted by loopshot
the only way to get a real random number would to be record a physical events out come, so you would have to have a physical thing happen in your computer, then you would have to have a way to confine its spectrum and then read is from sensors. this would have to be a special part in a computer so it is not worth it if possible.
There are systems whereby such sensors are attached to a computer (eg via a serial or parallel port, or sometimes by dedicated cards) and used to generate random values. The approach isn't cheap, and is therefore only used for highly specialised applications.

Pseudo-random values are often more than sufficient for most applications. Even a poor quality generator is often more than sufficient.
grumpy is offline   Reply With Quote
Old 11-30-2006, 02:14 PM   #8
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,636
That's entropy man.
http://en.wikipedia.org/wiki//dev/random

Or you can do it with bits of hardware
http://en.wikipedia.org/wiki/Hardwar...mber_generator

ISTR some of the later Intel CPUs have this capability.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
questions....so many questions about random numbers.... face_master C++ Programming 2 07-30-2009 08:47 AM
Doubts regarding random numbers generation girish1026 C Programming 9 12-31-2008 10:47 PM
random numbers limit HAssan C Programming 9 12-06-2005 07:51 PM
Generate random numbers in Lucky7 project using C# Grayson_Peddie C# Programming 1 04-11-2003 11:03 PM
random numbers lil_plukyduck C++ Programming 5 01-14-2003 10:14 PM


All times are GMT -6. The time now is 09:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22