On Sep 25, 2006, at 12:42 AM, peter green wrote: >> Pseudo-RN generators are the ones that repeat, > eventually but with sufficiant internal state the repetition can be > put off > to the point several times the life of the universe so far, e.g. way > too far > out to matter. > >> and are predictable to greater or lesser extent. > if you know the seed value and the alogithm then yes but with a good > design > working out the seed value from a sample of the output should not be > possible in any reasonable time. > For a "straight" LFSR style PRNG, knowing the output value and the algorithm is sufficient to predict the next number. You can do assorted "hiding" (ie returning the low 8 bits of a 63bit PRNG or doing math with constants), but that's still part of the algorithm, and as someone else mentioned you run the risk of interfering with the statistical randomness of your results. If you want the number to be unpredictable, you should incorporate some real randomness rather than just pseudo-randomness. However, there are plenty of application where unpredictability is of relatively small importance. BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist