piclist 1998\11\15\111720a >
Thread: RANDOM NUMBERS....PICing the right number 101
www.piclist.com/techref/microchip/math/index.htm?key=random
picon face BY : Peter L. Peres email (remove spam text)



On Fri, 13 Nov 1998, Dave VanHorn wrote:

> >                  Getting a feel for  my tools.
> >  ?      A.Is it possible to generate RANDOM equally weighted numbers
> >      (0-255)on a pic and any simple solutions?
>
> PN generators are easy to implement, it kind of depends on what you mean
> by random. a 38 bit maximal length PN generator would be pretty hard to

ANY N bit maximal length generator is EASY to predict because it is
guaranteed that each output combination occurs exactly once in a complete
cycle thus you know the next one immediately. Of course you also need to
tell the interested party that it is 38 bit long and complete. There
aren't that many algorythms that an interested party can't try them all
out while you sleep on your laurels.

> predict. The only number you don't get is all 38 bits=0, but if you take
> a 16 or 32 bit sample, you'll get all possible values in equal
> probability.

Hrrmph. See above. Ok, it takes a determined attacker to do it, but it
also depends on what is being protected against whom.

Non-maximal and sub-optimal PRNGs are far better at staying unknown. For
example two different 31 bit PRNG algorythms operating alternately on the
same register and using a certain fraction of the input as output is
better imho. It is far more difficult to do probability calculations on
this system than on the previous one. I think that thi is a distinct
advantage ;)

Peter

<Pine.LNX.3.95.981115174701.348D-100000@plp4.plp.home.org>

In reply to: <364CD531.9A4F8495@cedar.net>
See also: www.piclist.com/techref/microchip/math/index.htm?key=random
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) RANDOM NUMBERS....PICing the right number 101

month overview.

new search...