       strange random behavior ?

• To: mathgroup at smc.vnet.net
• Subject: [mg69908] strange random behavior ?
• Date: Wed, 27 Sep 2006 06:04:41 -0400 (EDT)

```Hi,

For

SeedRandom
Table[Random[Integer, {1, 6}], {5}]
Table[Random[Integer, {1, 3}], {5}]

I get

Out=
{2,1,6,2,6}

Out=
{2,1,3,1,3}

When i repeat I obviosly get the same (magic of seedrandom)

SeedRandom
Table[Random[Integer, {1, 6}], {5}]
Table[Random[Integer, {1, 3}], {5}]

Out=
{2,1,6,2,6}

Out=
{2,1,3,1,3}

Bu when I change the range of random numbers in generation of the first
list , say 1->2

SeedRandom
Table[Random[Integer, {2, 6}], {5}]
Table[Random[Integer, {1, 3}], {5}]

I get

Out=
{3,2,3,6,6}

Out=
{2,2,3,1,3}

Since Seed is still the same (7), why second list is changed? (Out
does not equal to Out)

This behavior does not take place when we do not deal with tables but
with single elements.

Arek

```

• Prev by Date: Re: Mapping Functions That Take More Than One Argument
• Next by Date: Re: Mapping Functions That Take More Than One Argument
• Previous by thread: Re: mapping of function revisited
• Next by thread: Re: strange random behavior ?