Click here to Skip to main content
15,896,557 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Circular shifting Pin
CarpenterJim30-Apr-07 15:24
CarpenterJim30-Apr-07 15:24 
GeneralRe: Circular shifting Pin
Nathan Addy2-May-07 8:48
Nathan Addy2-May-07 8:48 
JokeStar Wars Pin
Joeinorange227-Apr-07 13:26
Joeinorange227-Apr-07 13:26 
QuestionGolden Ratio Pin
Joeinorange227-Apr-07 13:22
Joeinorange227-Apr-07 13:22 
AnswerRe: Golden Ratio Pin
Paul Conrad14-Jul-07 10:18
professionalPaul Conrad14-Jul-07 10:18 
QuestionRandom Numbers: Is there anything really random? Pin
Bulky Fellow27-Apr-07 0:13
Bulky Fellow27-Apr-07 0:13 
AnswerRe: Random Numbers: Is there anything really random? Pin
cp987627-Apr-07 2:08
cp987627-Apr-07 2:08 
AnswerRe: Random Numbers: Is there anything really random? Pin
Nathan Addy27-Apr-07 10:58
Nathan Addy27-Apr-07 10:58 
It's an interesting discussion, and to really get into it, you have to define what random means. Every physical system has various numbers attached to it, which are the things you can "measure" about that system. So a flying plane, for example, has numbers like "momentum", "position of the z axis", "acceleration", etc. Furthermore, these values aren't completely independent. If you know the "momentum" and "acceleration" at time 0, you can make a really good guess for the momentum at future times (with guesses for sooner times better than future times).

The implication would be that for a physical system, there is a "purely mathematical" part, that describes the abstract system. There is also a random part added in though. This implies that the physical system is somewhat random. So if the velocity of a falling block is 0 at time =0 and it's acceleration is -g, then you can make a solid guess as to the velocity at t=1.0 seconds -- it won't be random at all. However, if you factor out the mathematical part, you'll get a purely random part. So if, for instance, you expected the velocity at t=1 to equal -g meters/second, you could sample the actual velocity at t=1 and would get a Gaussian out.

In the real world, this particular example has a very strong physical/mathematical component and a very small random component. On the other hand, with various quantum mechanical systems, it has been proven that the "physical/mathematical" component is 0, and the answer you will get out is completely random.

So I disagree with you that people are a good source of randomness. You can ask someone to give you 100,000 random numbers between 0 and 100 and you'll find that the output is very non-random. In my interpretation, this reflects some "laws of the mind" that are totally non-random (the fact that I really "feel" 17 is random, and "1" is not would be one example). That said, if you were able to figure out the physical laws, you can factor those out and get something purely random out. So a physical law of the brain would say that I feel "17" is so random, I will pick it 10% of the time, as opposed to 1%, but whether in a particular run I pick it more or less than exactly 10% will be completely random.

So if you want to find purely random numbers, pick a physical system. Either pick one that has no relationships between it's variables -- these are found mostly in quantum mechanical systems -- and are really completely random, or pick one where you know the physical system perfectly and factor out the predictable physicality to get something random.

But there are truly random entities in math. If you're familiar with the halting problem, the probability that a random program (basically a program that consists of a random 1 or 0 everytime the computer needs some input) is completely random (after the first few digits). But there isn't any way to calculate it, and so it can't be used. Practically, using a formula that isn't random, but for which you can prove it looks random is the best way to go. (You can actually buy a physical random number generator, but unless you are worried about cryptographic stuff, it won't do any better for you than a software RNG, and if it breaks, you might not be able to tell, which isn't a problem with software RNGS).
GeneralRe: Random Numbers: Is there anything really random? Pin
cp987627-Apr-07 15:55
cp987627-Apr-07 15:55 
GeneralRe: Random Numbers: Is there anything really random? Pin
Stephen Hewitt29-Apr-07 18:10
Stephen Hewitt29-Apr-07 18:10 
GeneralRe: Random Numbers: Is there anything really random? Pin
Bulky Fellow29-Apr-07 23:26
Bulky Fellow29-Apr-07 23:26 
GeneralRe: Random Numbers: Is there anything really random? Pin
cp987630-Apr-07 0:54
cp987630-Apr-07 0:54 
AnswerMy Random Info Pages Pin
PICguy30-Apr-07 18:55
PICguy30-Apr-07 18:55 
GeneralRe: My Random Info Pages Pin
cp987630-Apr-07 19:14
cp987630-Apr-07 19:14 
GeneralRe: My Random Info Pages Pin
PICguy30-Apr-07 19:29
PICguy30-Apr-07 19:29 
GeneralRe: My Random Info Pages Pin
cp987630-Apr-07 19:40
cp987630-Apr-07 19:40 
AnswerRe: Random Numbers: Is there anything really random? Pin
Frank Kerrigan2-May-07 5:58
Frank Kerrigan2-May-07 5:58 
QuestionProducer/Consumer Questions Pin
Leslie Sanford26-Apr-07 12:29
Leslie Sanford26-Apr-07 12:29 
AnswerRe: Producer/Consumer Questions Pin
Luc Pattyn26-Apr-07 13:50
sitebuilderLuc Pattyn26-Apr-07 13:50 
GeneralRe: Producer/Consumer Questions Pin
Leslie Sanford29-Apr-07 17:09
Leslie Sanford29-Apr-07 17:09 
QuestionLinked lists vs. Arrays Pin
Leslie Sanford25-Apr-07 9:44
Leslie Sanford25-Apr-07 9:44 
AnswerRe: Linked lists vs. Arrays Pin
Luc Pattyn25-Apr-07 14:55
sitebuilderLuc Pattyn25-Apr-07 14:55 
AnswerRe: Linked lists vs. Arrays Pin
Shog925-Apr-07 14:57
sitebuilderShog925-Apr-07 14:57 
GeneralRe: Linked lists vs. Arrays Pin
Leslie Sanford25-Apr-07 15:04
Leslie Sanford25-Apr-07 15:04 
GeneralRe: Linked lists vs. Arrays Pin
Shog925-Apr-07 15:24
sitebuilderShog925-Apr-07 15:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.