From: Chad on
The question stems from the following url

http://groups.google.com/group/comp.lang.c/browse_thread/thread/dbb7f5c53d288b0a/4ec31a37499e24f0?hl=en#4ec31a37499e24f0

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.

From: Jens Thoms Toerring on
Chad <cdalten(a)gmail.com> wrote:
> The question stems from the following url

> http://groups.google.com/group/comp.lang.c/browse_thread/thread/dbb7f5c53d288b0a/4ec31a37499e24f0?hl=en#4ec31a37499e24f0

> 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:

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
--
\ Jens Thoms Toerring ___ jt(a)toerring.de
\__________________________ http://toerring.de
From: Chad on
On Apr 13, 12:40 pm, j...(a)toerring.de (Jens Thoms Toerring) wrote:
> Chad <cdal...(a)gmail.com> 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.

> 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,

From: spinoza1111 on
On Apr 14, 2:54 am, Chad <cdal...(a)gmail.com> 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.

A computer is going to execute a deterministic algorithm OR take the
least signficant digits of a time field. Neither operation is random.
You need something physical such as a cute girl who grabs the first
ball to drop out of a pressurized air chamber.

The popular technique of taking the least significant digits of a time
field is problematic because it depends on the "randomness" of when
the program was started. This will be usually nonrandom (many programs
for example are started up during working hours and although this
doesn't affect the least significant digits of the time in many cases,
many manual startups may occur at integral times such that the least
significant digits of the time can be calculated from the
deterministic time the code takes). And if a program is started
automatically at a specific time then the least significant digits are
predictable.

Cf Donald Knuth's discussion in Seminumerical Algorithms.

Randomness is related to encoding in cryptography. The digits of pi
are "random" until the "enemy", trying to predict your "random" next
digit, figures out you are merely expanding pi. Modern encoding of
credit card numbers uses a pseudo-random key calculation which is
merely computationally hard but will stop being so if mathematicians
figure out "Riemann", and when they do, all financial systems will
collapse overnight (if this happens soon, it is sure to interact in
synergy with the current credit collapse to make a real mess).

The preceding paragraph is a layperson's view, so we'll let the other
sixth-graders here chime in and tell you that I'm a booger and wrong
too.
From: spinoza1111 on
On Apr 14, 4:06 am, Chad <cdal...(a)gmail.com> wrote:
> On Apr 13, 12:40 pm, j...(a)toerring.de (Jens Thoms Toerring) wrote:
>
>
>
>
>
> > Chad <cdal...(a)gmail.com> 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 -