Re: random number question.



On Apr 14, 4:06 am, Chad <cdal...@xxxxxxxxx> wrote:
On Apr 13, 12:40 pm, j...@xxxxxxxxxxx (Jens Thoms Toerring) wrote:





Chad <cdal...@xxxxxxxxx> wrote:
The question stems from the following url
http://groups.google.com/group/comp.lang.c/browse_thread/thread/dbb7f....
I had asked what was the difference between what' the difference
between random numbers and pseudo-random numbers. I'm not that sure
I'm going to get a response since some of the posters are more
concerned about using colorful metaphors to describe each other.
Usually when the vegititation in comp.lang.c starts to act like a
bunch of hyperactive 6th graders, they tend to ignore everyone else.
Maybe I will get a response on comp.lang.c.

Sorry, but perhaps you should try to understand a bit more what
different news groups are meant for before you call someone a
"hyperactive 6th grader" - they have different topics or we
wouldn't need them at all. And the difference between random
numbers and pseudo-random numbers isn't anything related in
any way to the topic of comp.lang.c, the C programming lan-
guage. On the other hand comp.programming has a much broader
topic, so it's on topic here, so here we go:

I still have some general misconceptions about how the newsgroups
work.

Many have been dominated by computer thugs who can't publish their
views anywhere else and use bullying to take over a newsgroup. They
typically present themselves as a majority but when you count their
actual supporters you realize that a very small and very meaningless
integer count of supporters is calling itself a majority.

For example, you cannot say anything critical about C here without the
C kiddies jumping you. Nor can you question the wisdom of the C
standard because a member of the team posts here and is oversensitive
about the effort, which was a foolish effort (in my view) to make a
silk purse out of a sow's ear by calling anything difficult undefined,
and blaming the victim...actual programmers trying to use C.

They typically "gang up" on posters they think are female, or African-
American, as well as posters who can write and have done enough
homework to make an original contribution. They inappropriately
generalize from details, "errors" being their favorite theme.

Outside of usenet, published computer authors, especially those who
have a breezy style, are a favorite topic. The threats made by these
types of people caused well-known Java author Kathy Sierra to cancel
public appearances, and recently I succeeded in getting a neutral
party at wikipedia to repair an article on well-known C/C++/C Sharp
author Herb Schildt to remove links to turgid attacks on Herb's
"errors"...pseudo-scientific attacks which clearly showed an interest,
not in scientific or technical truth, but in destroying a man's
reputation...behavior not characteristic at all of real professionals.

I'm Edward Nilges, the author of "Build Your Own .Net Language and
Compiler". Stand by for the explosion of infantile rage, because much
of Fascism is simply the return to the nightmare of childhood.





Random numbers are numbers that are truely random - there's
no way you could ever predict the next one when you already
have gotten some from the generator and even if you got all
the specifications for the generator. Think e.g. of a gene-
rator that gets it's numbers from a source that's known to
be strictly random (throwing a coin, radioactive decay etc.).

In contrast, pseudo-random numbers are generated via some
algorithm. One example of such a generator often used to
create pseudo-random numbers employs a rather simple for-
mula like

     x[i+1] = trunc(a * x[i] + b)

where trunc() returns the digits after the decimal point.
Obviously, the numbers generated this way aren't really
random, and once you know the formula and 'a' and 'b' you
can easily predict with absolute certainty what x[i+1] will
be from x[i] (and if you only have a lot of consecutive
number you still might be able to work out what the algo-
rithm and its parameters are).

Of course, you can use some more complicated formulas,
but that doesn't change anything about the basic non-
randomness of the numbers created (and, if I remember
the chapter of Knuth's "The Art of Computer Programming"
about pseudo-random generators correctly, trying to get
too clever can actually make things worse;-)

Creating really random numbers is difficult since you need
some physical process that's truely random to produce them,
so you need some extra hardware (some CPUs nowadays come
with something like that, probably taking advantage of the
randomness of Schottky noise). Pseudo-random numbers, on
the other hand, are simple, cheap and fast to produce and
for many purposes they're completely sufficient and are
thus used in quite a number of applications.

                               Regards, Jens

Okay, that explanation makes sense. Thanks,- Hide quoted text -

The discussion is in Seminumerical Algorithms. Knuth cheerfully admits
to an error (showing an outdated manhood missing here) when in the
early days he developed an elaborate "random number generator" that
produced perfectly predictable patterns.

The distance between primes will be "random" until "Riemann" is
solved, I believe, but when you display it, it doesn't look random,
which is very interesting.


- Show quoted text -- Hide quoted text -

- Show quoted text -

.



Relevant Pages

  • Re: random generation
    ... we need a random number generator. ... pseudo-random numbers generated with software on computers. ... If we get the same sequence of numbers every time we run the algorithm ... The cycle length is important. ...
    (sci.stat.consult)
  • Re: Testing a Pseudo-Random Generator
    ... > Testing a Pseudo-Random Generator ... > numbers (PRN). ... the next "random" number in a sequence is completely ...
    (sci.stat.math)
  • Re: ID revisited ... ( Yet another reason for abandoning numerical
    ... pseudo-random number generator, ... this generator is unlikely to be used in numerical simulation ... made based on a percentage of each ticket sold "on average". ... wins the jackpot, it is rolled over to the next round of ticket sales ...
    (talk.origins)
  • Re: First Law of Intelligence and the Big Bang
    ... And it doesn't require intelligence to design a decent pseudo-random ... pseudo-random number generator?" ... a "random process" need not have uniform distribution nor ...
    (talk.origins)
  • Re: Kresss Probability Trilogy Qs
    ... because I can always get the same sequence of pseudo-random ... you must absolutely hate multithreaded programming then. ... That doesn't mean I never get unpredictable behaviour, ... synchronising multiple threads properly. ...
    (rec.arts.sf.science)

Loading