Radomize and RND not really random... Weird ?

R

Radu

As simple-to-remember-but-unique confirmation numbers, I need to
generate six random characters (ASCII 65 to 90, inclusive):

Randomize()
objStringBuilder.Append(Chr(CInt(Int((25 * Rnd()) + 65))))
Randomize()
objStringBuilder.Append(Chr(CInt(Int((25 * Rnd()) + 65))))
Randomize()
objStringBuilder.Append(Chr(CInt(Int((25 * Rnd()) + 65))))
Randomize()
objStringBuilder.Append(Chr(CInt(Int((25 * Rnd()) + 65))))
Randomize()
objStringBuilder.Append(Chr(CInt(Int((25 * Rnd()) + 65))))
Randomize()
objStringBuilder.Append(Chr(CInt(Int((25 * Rnd()) + 65))))

The strange thing is the results are not really random, and they
follow some kind of strange patterns...

I obtain strings like (Pattern 1 = Repeat Sequences):
WUPYUP, ECVGCW, QOJSOJ, and similar.

One other pattern, (Pattern2 = Letters in Vicinity), which shows up
extremely frequently seems to be in results like NLFPKG, IGBLGC,
KICMHD, etc. Note that:

Letter1 is "NEAR" Letter4,
Letter2 is "NEAR" Letter4,
Letter3 is "NEAR" Letter5

Actually, Pattern1 is a particular case of Pattern2...

Hmmmmmm... I am forgetting something ?

Thanks a lot.
Alex.
 
Top