Truncated match.
PICList
Thread
'Generating Random Numbers?'
2000\05\06@193718
by
Ben R.
<xflowed>Hey, does anyone out there know anything about generating random numbers in
ASM code, or perhaps where I can learn more about the theory behind it so I
can write my wn code? I f could just just get someone else's code that of
course would be easier... Thank you.
Ben
________________________________________________________________________
Get Your Private, Free Email from MSN Hotmail at http://www.hotmail.com
</xflowed>
2000\05\06@193922
by
Andrew Warren
2000\05\07@162812
by
William Chops Westfield
Speakinng of random numbers, I have a new (?) question.
How do I generate random numbers with a nice statical distribution, ie
ones that fit a standard bellshaped curve. Most random number generators
try to generate all possible combinations in an even distribution, but what
if I want numbers "near" "X", perhaps with a specified standard deviation...
BillW
2000\05\07@174202
by
Plunkett, Dennis
Why would you want a bell shape? Would not your ideal response be flat?
Dennis
{Quote hidden}> Original Message
> From: William Chops Westfield [SMTP:
billwKILLspamCISCO.COM]
> Sent: Monday, 8 May 2000 6:26
> To:
.....PICLISTKILLspam.....MITVMA.MIT.EDU
> Subject: Re: Generating Random Numbers?
>
> Speakinng of random numbers, I have a new (?) question.
>
> How do I generate random numbers with a nice statical distribution, ie
> ones that fit a standard bellshaped curve. Most random number generators
> try to generate all possible combinations in an even distribution, but
> what
> if I want numbers "near" "X", perhaps with a specified standard
> deviation...
>
> BillW
2000\05\07@181752
by
Arthur
It depends if the bell as a crack in it like the liberty bell or it may be
that it's tuned to the 3rd harmonic and I can't tell as I have tinatus
[excuse spelling as spelling checker wants to put in tetanus] from a thread
the other week my ears are still ringing
Regards Art :)
 Original Message 
From: Plunkett, Dennis <EraseMEdplunkettspam_OUTTakeThisOuTAIRINTER.COM.AU>
To: <PICLISTspam_OUTMITVMA.MIT.EDU>
Sent: Sunday, May 07, 2000 10:36 PM
Subject: Re: Generating Random Numbers?
: Why would you want a bell shape? Would not your ideal response be flat?
:
: Dennis
:
:
:
: > {Original Message removed}
2000\05\07@194020
by
Andrew Warren

William Chops Westfield <@spam@PICLISTKILLspamMITVMA.MIT.EDU> wrote:
> How do I generate random numbers with a nice statical distribution,
> ie ones that fit a standard bellshaped curve. Most random number
> generators try to generate all possible combinations in an even
> distribution
Bill:
There are lots of algorithms, but if you only have a randomsequence
generator that gives an even distribution, you can STILL use it to
create a sequence that has a bellshaped distribution. Here's one
way:
BELL_RANDOM:
CLRF OUTPUT ;CLEAR THE OUTPUT REGISTER.
MOVLW 100 ;SETUP TO GET 100 EVENLYDISTRIBUTED
MOVWF COUNT ;RANDOM NUMBERS.
LOOP:
CALL RANDOM ;W = A RANDOM NUMBER.
ANDLW 10000000B ;IS THE HIGH BIT SET?
SKPZ ;IF NOT, SKIP AHEAD.
INCF OUTPUT ;OTHERWISE, INCREMENT OUTPUT.
DECFSZ COUNT ;DONE ENOUGH OF THEM?
GOTO LOOP ;IF NOT, LOOP BACK.
RETURN ;OTHERWISE, RETURN WITH A "BELLSHAPED"
;RANDOM NUMBER IN "OUTPUT".
Of course, the above is just an example; it'd be better if your
"RANDOM" routine returned a number in a larger range than [0255]...
But I'm sure you get the idea, which is that even "flatdistribution"
sequences have properties that can be used to generate a bellshaped
distribution.
Andy
=== Andrew Warren  KILLspamfastfwdKILLspamix.netcom.com
=== Fast Forward Engineering  San Diego, California
=== http://www.geocities.com/SiliconValley/2499
2000\05\07@194854
by
Sean Breheny
Hi Bill,
A bell curve (or Gaussian distribution) is easy because if you add together
a large number of random numbers taken from a uniformlydistributed
generator (like the type you describe), you will get some number, call it
x. If you repeat the process with different numbers from that generator and
get x2,x3,x4, etc., then the x's will have a distribution which
approximates a Gaussian. You can then get whatever standard dev. and mean
you want by just scaling and shifting the output. So, if the sequence
x,x2,x3,x4,.... has mean 0.5 and stdev 2, and you want mean=10 and sddev=6,
then the sequence 3*x+9.5,3*x2+9.5,3*x3+9.5,..... will have what you want.
I don't know how many numbers you will need to add together to generate
each output number, but from a some graphs I have in a book here, it looks
like about 10 to 20 would be adequate.
Sean
At 01:25 PM 5/7/00 PDT, you wrote:
>Speakinng of random numbers, I have a new (?) question.
>
>How do I generate random numbers with a nice statical distribution, ie
>ones that fit a standard bellshaped curve. Most random number generators
>try to generate all possible combinations in an even distribution, but what
>if I want numbers "near" "X", perhaps with a specified standard deviation...
>
>BillW
>

 Sean Breheny
 Amateur Radio Callsign: KA3YXM
 Electrical Engineering Student
\=
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
RemoveMEshb7TakeThisOuTcornell.edu ICQ #: 3329174
2000\05\07@205029
by
Sean Breheny
OOPS, I just saw an error in my last post:
I wrote:
>So, if the sequence x,x2,x3,x4,.... has mean 0.5 and stdev 2, and you want
mean=10 and sddev=6,
>then the sequence 3*x+9.5,3*x2+9.5,3*x3+9.5,..... will have what you want.
Which should have been:
3*x+8.5,3*x2+8.5,3*x3+8.5,..... since the original had a mean of 0.5 which
contributes 1.5 when multiplied by 3. Sorry for any confusion.
Sean
At 01:25 PM 5/7/00 PDT, you wrote:
>Speakinng of random numbers, I have a new (?) question.
>
>How do I generate random numbers with a nice statical distribution, ie
>ones that fit a standard bellshaped curve. Most random number generators
>try to generate all possible combinations in an even distribution, but what
>if I want numbers "near" "X", perhaps with a specified standard deviation...
>
>BillW
>

 Sean Breheny
 Amateur Radio Callsign: KA3YXM
 Electrical Engineering Student
\=
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
spamBeGoneshb7spamBeGonecornell.edu ICQ #: 3329174
2000\05\08@113247
by
pandersn
Ben...
You can use PN sequences to generate a random sequence. Use the words
"pseudorandom sequences" or "pseudorandomnumber generators" in your web
search. These are outlined in most electronics textbooks on communications
such as those published by Prentice Hall or McGrawHill.
PN generators have application in noise generators and spreadspectrum key
generators, etc. Also used to build hardware biterrorrate generators.
Phil.
On Saturday, May 06, 2000 6:36 PM, Ben R. [SMTP:TakeThisOuTben_r_EraseMEspam_OUTHOTMAIL.COM] wrote:
> Hey, does anyone out there know anything about generating random numbers
in
> ASM code, or perhaps where I can learn more about the theory behind it so
I
> can write my wn code? I f could just just get someone else's code that of
> course would be easier... Thank you.
>
> Ben
> ________________________________________________________________________
> Get Your Private, Free Email from MSN Hotmail at http://www.hotmail.com
2000\05\08@195748
by
Kevin Maciunas
Not wishing to sound disheartening, the generation of RN's or even good
PRN's is really tricky. I'd suggest you check out the random number
section of
http://www.mathcom.com/nafaq/index.html to source the information you
need.
This is a really, really well trodden field.
Cheers
/Kevin

Kevin J. Maciunas RemoveMEkevinTakeThisOuTcs.adelaide.edu.au
Department of Computer Science PH: +61883035586
The University of Adelaide FAX:+61883034366
Adelaide 5005 South Australia
2000\05\09@175048
by
Plunkett, Dennis
This is totally correct, generation is not easy! Ask IBM about the
RNDU function that they had. Said it was random, seems that after a period
of time it is not, and a pattern emerges.
If you want some random numbers to put into a lookup table, try to find
those generated by the Random corp
Dennis
> {Original Message removed}
2000\05\09@193252
by
Andy Kelley
maybe read an input 8 times putting the values into a byte.
might work.. i am not sure.
Andy K
N1YEW
On Wed, 10 May 2000 07:48:03 +1000 "Plunkett, Dennis"
<dplunkettEraseME.....AIRINTER.COM.AU> writes:
{Quote hidden}> This is totally correct, generation is not easy! Ask IBM
> about the
> RNDU function that they had. Said it was random, seems that after a
> period
> of time it is not, and a pattern emerges.
> If you want some random numbers to put into a lookup table, try to
> find
> those generated by the Random corp
>
> Dennis
>
>
>
>
> > {Original Message removed}
2000\05\09@194537
by
Kevin Maciunas
Andy Kelley wrote:
> maybe read an input 8 times putting the values into a byte.
>
> might work.. i am not sure.
>
> Andy K
> N1YEW
>
**NO**  this does not generate a random number! The resultant number is
correllated with the inputs. My earlier posting in this thread has a
reference to a wealth of information on what to do/how to do it.
Random numbers are particularly important in cryptography; if you have
any doubts as to the consequences of poor random number selection, look
back to Netscape's original presentation on secure transmission of TCP
data. It took people in the audience about 10 mins to devise a way to
bust it due to the insane choice of "random" number. We should all
listen to history!
/Kevin

Kevin J. Maciunas Net: EraseMEkevincs.adelaide.edu.au
Dept. of Computer Science Ph : +61 8 8303 5845
University of Adelaide Fax: +61 8 8303 4366
Adelaide 5005
SOUTH AUSTRALIA
More... (looser matching)
 Last day of these posts
 In 2000
, 2001 only
 Today
 New search...