Random Number Generation -----> Hardware or Software?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi every one,
I would like 2 ask about the random number generation.
Is random number generation function/method in programming languages
implemented in software layer or in hardware layer, and if it is
implemented in software layer, how it is implemented in the regular
calculator i.e. pocket calculator (not calculator program).
thanx


Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it
              to

This is Usenet is not a cellphone.
              
Quoted text here. Click to load it

Usually software.  Sometimes hardware.  Sometimes a
combination.

Quoted text here. Click to load it

You'd have to ask the calculator's manufacturer.

--
Grant Edwards                   grante             Yow!  Is a tattoo
                                  at               real, like a curb or a
We've slightly trimmed the long signature. Click to see the full one.
Re: Random Number Generation -----> Hardware or Software?

|>
|> I would like 2 ask about the random number generation.
|> Is random number generation function/method in programming languages
|> implemented in software layer or in hardware layer, and if it is
|> implemented in software layer, how it is implemented in the regular
|> calculator i.e. pocket calculator (not calculator program).

Software.  It would have been in hardware back in the days of
the first calculators, but now most of them use a fairly general-
purpose chip that executes a program from ROM, PROM or whatever.
Call it firmware if you like.  I can't tell you how many use a
specialised hardware random number generator (which exist), if
any do.


Regards,
Nick Maclaren.

Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it

Note also that these (software) library functions generate *pseudo-random*
sequences.  True random sequences are impossible to be achieved by solely
software means.

   Vadim

Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it

A compromise is to use the accurate timing of keystrokes. The number of
keystrokes
must be carfully determined to get the proper amount of randomness.

More wetware than hardware ;-)

Wim



Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it

Well, it depends on how long you're willing to wait doesn't it ? No system
operates perfectly for an indefinite period of time. Because at some point a
hardware error will occur, due ultimately to the randomness in the universe.
So in a sense even software algorithms probably produce truly random
sequences (if you wait long enough). I know my C64 used to heat up after
about 5 hours or so, then the games became really interesting due to the
hardware errors.

How about building a hardware LFSR (rng) at a hot spot on a chip, so that
it's guarenteed to occasionally fail ?

I've thought that the all randomness in the universe might be reducible to
effectively a single point of randomness. Something I've called the spark of
life. It just constantly flashes in different patterns causing quantum state
changes to appear randomly.

The effect of randomness on static systems and the resulting progression of
time is interesting. Momentary randomness provides entropy which allows time
to pass. I wonder if one could build a time machine by varying the amount of
entropy in different regions of space.

(This is all just fanciful speculation by me. I like to speculate -
speculate first, verify later).

Rob





Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it

Douglas Adams' "Infinite Improbability Drive"?

Good point you bring up: does a PRNG/Pi create entropy?

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.
Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it
I would think not because the calculation of pi is a deterministic
algorithm just like a pseudo random number generator. This looks likely
to be just a Finite Improbability.

You man need to add a Brownian Motion generation.

Re: Random Number Generation -----> Hardware or Software?


Quoted text here. Click to load it


"Anyone who considers arithmetical methods of producing random digits is, of
course, in a state of sin."
 John Von Neumann


Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it

Actually there are no software random number generators.  Generating
random numbers is very difficult.

del cecchi

Re: Random Number Generation -----> Hardware or Software?

|>
|> Actually there are no software random number generators.  Generating
|> random numbers is very difficult.

If it is impossible to determine that a generator is not truly
random without invoking godlike powers, is it random?

Therefore, if it is infeasible to determine that a black-box
pseudo-random generator is not truly random without breaking
open the black box, should it be regarded as random?

You can ask exactly the same about a quantum state.  If you
answer "yes" and "no" to the above, then physical randomness
would disappear if anyone ever found a way of measuring a
quantum state directly, however impractical.

The philosophy of randomness is a lot more complex than most
people realise.


Regards,
Nick Maclaren.



Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it
I used to agree with you, but I changed my mind.  :-)

Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it

If the only way to *show* that a generator is not random is by invoking
godlike powers, then for all practical purposes, this proves that the
generator IS truly random and can be regarded as such.

On the other hand, if current technology is unable to prove that a generator
*is not* truly random, then for all practical purposes the generator can be
treated as being truly random, but this says nothing about whether it
actually *is* or *is not* truly random.

The philosopy of randomness involving "godlike powers" is a futile and
pointless discussion at best, and doesn't serve to offer any insight into
any practical matters.  Philosophy itself as a subject is completely useless
from a practical standpoint, and I don't even know why I'm wasting my time
talking about it.

--
MT

To reply directly, please take all 5 occurrences of the letter 'y' out of my
address.



Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it

One of the oldest: predestination Vs free-will.  The answer is the universe
is a combination of the two, a frightfully boring answer.

Quoted text here. Click to load it

I'll disagree.  I believe randomness is the root of intelligence
and consciousness.  So does Penrose.

Quoted text here. Click to load it

That's a very philosophical statement.  Thought is the only thing that
really matters, all else is in support of it.

Quoted text here. Click to load it

Because it is more enjoyable than the other tasks that await you.

Like, I need to make some cold calls -- or maybe I will clean
the kitchen floor with a toothbrush -- or maybe I will write random
posts on the philosophy of randomness.  Choices, choices ...

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.
Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it

A person who states that philosophy has merely embraced
a particularly simplistic one.

Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it

Agreed.  Randomness _can't_ come from a fully deterministic
system.  The main claim to fame of a computer is that it
is deterministic, unlike those unpredictable humans.

Quoted text here. Click to load it

Worse than merely difficult.

Generating pure noise with no signal is the mirror task,
and just as impossible, as generating signal with no noise.

Quoted text here. Click to load it

God does not play dice with the universe -> God _is_ the dice.

Quoted text here. Click to load it

All one can do is try and prove it isn't random and fail.

Quoted text here. Click to load it

It is not only feasible, it is dead-nuts easy to determine that
a black-box is outputting pseudo-random data.  Map the PRNG output
on a CRT and you will soon see pattern evolving on the screen.
Use the last digit to increment/decrement a line sweeping across
the screen: the last digit will have a repeat to it that is much
shorter than the repeat of the whole generator and the line
will not slowly go up or down, it will _always_ stay around '0'.
Count the frequency of same value strings (# of 1's, 11's, 111's...
0's, 00's, 000s), the numbers will be just _too_ perfect.

A dead give-away is PRNG's don't drift or have biases.

The first chapter of Knuth Vol 2 "Seminumerical Algorithms",
all 170 pages of it, is dedicated to determining if a set of
data is random.

Truly random _isn't_, you just can't predict how it isn't.
Somewhere in a truly random string there exist the works of
Shakespeare: it they aren't there then the string does not
contain all possible sequences and is therefore not random.

Quoted text here. Click to load it
What is the question?
Quoted text here. Click to load it
In the sprit of the post, let's answer both yes and no
and wait for the wave function to collapse.

Quoted text here. Click to load it

Interaction with quantum events is what _creates_ randomness.  
You _can't_ make physical randomness disappear.  You can
not predict the behavior of a physical system except in
general terms and short time frames.

If you can make physical randomness disappear then look
out: you are simulation in some giant computer.

Quoted text here. Click to load it

Infinitely complex.  When randomness runs it's course the
Universe ends.

Home Study Question: Are the digits of the square root of
                     two random?

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.
Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it

Huh?

Multi-dimensional frequency checks are afaik among the standard tests
for pseudo-random generators.

Quoted text here. Click to load it

As opposed o the expected brownian motion?

Quoted text here. Click to load it

drift/bias is the first thing you remove when converting some physical
process into a real random number generator.
Quoted text here. Click to load it

I.e. the infinite number of monkeys hitting keys on typewriters.

The fun part is that not only will they write Hamlet, in all living and
dead languages expressible on said typewriter, they will also write them
with all possible typos.

Infinity is a strange subject, pretty soon you'll start talking about
Cantor and his Aleph (?) numbers. :-)

Terje

--
"almost all programming can be viewed as an exercise in caching"

Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it

Yes, and they fail them.  Have to.  They _do_ repeat, so there
is at minimum 1 periodic frequency.  Individual digits/bits have
shorter periodic cycles.

Quoted text here. Click to load it
My turn to say 'huh?'.  Yes, it should be a random walk which if it
goes on long enough will have deviations approaching infinity.
A prng can't do that.

Quoted text here. Click to load it


All physical processes are random.  Any modification makes them less
random.  For our convenience, though, we put the sequence through a high-pass
filter, as it were.  You can't -remove- the bias and drift, only attenuate
it.  It comes from 1/f effects and from the defects in the generating
apparatus.  That's the key: the prng has _no_ defects.


Quoted text here. Click to load it

Men make pretty good monkeys when it comes to typewriters.  If the
zipped version of Hamlet is acceptable then the monkeys will get it
done faster.

Quoted text here. Click to load it

Took all the random events of the universe 15 billion years to
come up with just the _one_ (AFAIK) Hamlet.  Man has been permutating
it into its many variations ever since.

Anyone remember that old sci-fi story about the ten billion names of God?

Quoted text here. Click to load it

Or we could divide by zero.

It is refreshing to contemplate the Universe does have a _finite_ size
and age.

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.
Re: Random Number Generation -----> Hardware or Software?
Quoted text here. Click to load it

Yes!

(You've committed a fence-post error though, it is The _Nine_ Billion
Names of God, (C) 1967 A. C. Clarke

It's a beautiful short story, even though the end is somewhat obvious. :-)
Quoted text here. Click to load it

Or the inside of the black hole we're all living in fits that description?

(If the missing 90% or so 'dark matter' does exist, then the universe is
closed and will eventually collapse. That does make it a black hole, right?)

Terje

--
"almost all programming can be viewed as an exercise in caching"

Re: Random Number Generation -----> Hardware or Software?

Quoted text here. Click to load it

I don't believe in black holes.  The 'Nine Billion Names of God' has more
ring of truth to it.

                         *     *      *

                   "One must never, ever doubt
                    What nobody is sure about."

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline