Random numbers in C++

Random numbers in C++ - Random numbers in C+ Nobody knows...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Random numbers in C++ Nobody knows what’s next. ..
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Deterministic machines That means that computers do the same predictable thing every time you give them the same instructions we WANT this – we don't want random happenings - most of the time when would you NOT want this? games simulations of reality – traffic flows, nuclear explosions, star formation Cryptography!
Background image of page 2
What is "random"? A “real” random number is generated by a real world event like an atom decaying or not in a certain time Hard to do that in a computer Best we can do with a deterministic machine is make “pseudorandom” numbers They are “good enough”
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
“good enough”? A “good” random number is one that is distributed evenly in its range If you were rolling a die, you want numbers from 1 to 6 to be equally likely to show up This is over the “long run”, not each individual trial
Background image of page 4
Lots of research Lots has been done on random numbers Trying to get faster algorithms
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

Random numbers in C++ - Random numbers in C+ Nobody knows...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online