• Tidak ada hasil yang ditemukan

X PCiLYNOMlRL F I T OF DEMiEE 5 I

N' )iC POLYNOMIX F I T OF DECREE 7

I

-

=,.L-L

-

1--1 - + d - L - L - L - - I--A

'0 10 20 30 3- 0 SO 70 80 98 I00

may a l s o be moved t o t .

,

I

< /I <

y , which i s the f i r s t deleted

JP"

entry, if any, found in the probing sequence. If this compacting operation takes place, t . i s subsequently changed to deleted, Thus,

J

u

i£ k i t e m s w e r e removed f r o m a table and assuming that a l l r e - 1

maining e n t r i e s have a non-zero probability of being a c c e s s e d , the expected value of the length 1/ of the probing sequence would gradually d e c r e a s e f r o m

g(pk)

t o &(Vk-kl)

N being the number of r e t r i e v a l s made after the deletions occurred.

Since compacting a table involves a slight additional effort, it should only b e performed if any e n t r y i s a c c e s s e d on the average m o r e than twice.

Both random probing algorithms w e r e tested. With n = 997 and a uniform distribution of jl between 0 and n- 1

,

figure ( 6 ' 2 ) shows the percentage improvement in the length of the probing sequence t o i n s t a l l o r r e t r i e v e a n i t e m when the load f a c t o r i s cu

.

T n i s p e r -

centage i s computed a s a percentage of i9 f o r the c l a s s i c a l random probing algorithm.

6 . 3 . Random Number Generation

In t h i s section we put in t h e i r p r o p e r perspective s e v e r a l methods used t o generate uniformly distributed random numbers.

The m e r e fact that t h e r e e x i s t s s e v e r a l , not to say m a n y methods, is a c l e a r indication that we do not have a best one in some absolute

sense. On the contrary, the situation i s that of a typical cngineer- ing trade-off, cost v e r s u s quality. The cost will be m e a s u r e d by the time required t o produce a sequence of random numbers and the quality by how well the sequence p a s s e s some carefully chosen t e s t s of randomness. The complexity of the problem i s f u r t h e r com- pounded by our inability t o establish computable n e c e s s a r y and

sufficient randomness c r i t e r i a valid f o r a l l situations, No wonder then, that commonly used methods a r e plethoric even if we

exclude m o s t "random methods", the most imaginative but prob- ably the m o s t deceptive ones.

T h e r e a r e s e v e r a l p r o p e r t i e s of infinite, random sequences of independent samples drawn f r o m the uniform distribution that the finite deterministic sequence we construct ought to have. Those n e c e s s a r y conditions a r e that the sequence be equipartitioned,

equidistributed and white, notions which axe studied at length by Franklin

[

12

] .

Under those constraints, t h e r e a r e two possible candidates:

i) sequences

(en)

f o r B transcendental i i ) multiply sequence x

n t I

The f o r m e r i s charaxterized by an inherent difficulty of generation, since fl n has t o be calculated witbout rounding, but has good

s t a t i s t i c a l p r o p e r t i e s ; the l a t t e r i s i n t r i n s i c a l l y m e d i o c r e s i n c e it only h a s t h e r e q u i r e d p r o p e r t i e s a s y m p t o t i c a l l y , but is e a s y t o g e n e r a t e with a p e r i o d of the o r d e r of the maximum i n t e g e r r e p r e - s e n t a b l e i n a c o m p u t e r w o r d , depending upon t h e s p e c i f i c c h o i c e of m u l t i p l i e r a

.

T h i s m u l t i p l i e r c a n in f a c t b e c h o s e n a p r i o r i t o yield a p s e u d o r a n d o m s e q u e n c e w i t h p r e d i c t a b l e s t a t i s t i c a l b e h a v i o r o v e r t h e whole p e r i o d , a s w a s shown by Coveyou a n d Macpherson.

Uniortunately, t y p i c a l Monte G a r l o c a l c u l a t i o n s de,mand m o r e n u m b e r s t h a n we c a n a f f o r d t o g e n e r a t e by t h e f i r s t method,but would

r e q u i r e only a v e r y m i n u t e f r a c t i o n of t h e p e r i o d of a t y p i c a l m u l t i p l y - sequence.

k - p r o d u c t p s e u d o r a n d o m s e q u e n c e

A method f o r producing p s e u d o r a n d o m s e q u e n c e s by cornbin- ing o t h e r d e t e r m i n i s t i c s e q u e n c e s is now d e s c r i b e d . Although

s p e c i f i c a l l y t r e a t e d i n t h e c a s e of b i n a r y s e q u e n c e s , e x t e n s i o n t o a n r - a r y n u m b e r r e p r e s e n t a t i o n is f e a s i b l e .

C o n s i d e r k s e q u e n c e s of u n c o r r e l a t e d s t a t i o n a r y r a n d o m v a r i a b l e s x . . taking only the values

I .

L with p r o b a b i l i t y

13

and define a s t h e i r k - p r o d u c t sequence, t h e sequence

k T h e o r e m

-

A k-product sequence

z~ = xiy h a s even m o m e n t s i= l

unity and odd {2n+ I ) m o m e n t s in absitlu.te value l e s s than ~5 k ( i n + 1 )

& = m u 2pi

-

I

I

16. 19)

i e { i , ~ , , . . , k )

proof: the nth moment of the random variable xi can h e written

Similarly f o r z

k k

a n ( z) = jmn[$

ices a

i= 1 (pi+ qi)

+

j sin i= 1

which becomes a f t e r separating even and odd c a s e s

i f n even

k (6.22)

if n odd

Theorem

-

The autocorrelation R

(c)

of a k-product sequence is z

bounded by

I

R ~ ( C I ( -C r k (6.23)

r = +nax m a s

I R

X

(T)I

i 3

i

i k r i n t e g e r f 0 proof: the autocorrelation of x i s

i

Z

integer F o r a t r u l y white sequence we have

Here, the autocorrelation of the k-product sequence i s s i m i l a r l y

but because the sequences x. have been assumed to be uncorrelated,

1

(6.25 ) becomes

However, whiteness i s not a strong c r i t e r i o n of randomness s o that we now examine the equipartition p r o p e r t i e s of these sequences.

Theorem

-

k-product sequences of independent

- +

sequences a r e equipartitioned and completely equidistributed asymptotically a s k + m .

proof: given A numbers x. 11 xi2*

".

X. taking rltscrete values

+

1

,

1A

-

A A )

they f o r m 2 distinct coniiguratinns

.

J I , 2

. .

2 A

sequence x. i s equipartioned by A if

1

Let pi?/= 2 -X

+ E i V

designate the actual probability that

X t h

{xin xint

. . . -

2 CZI in the i sequence. We then f o r m the product sequence z = X . X . s o that

I J

Q(p)

being the image of /A under some permutation 8 of the i n t e g e r s { l , 2.

. . . ,

2 Using expression (6.28) we get

Thus if the constituent sequences a r e equipartitioned

6(f;),

the k-

product sequence will be equipartitioned

O(ck)

In the particula-r c a s e of the d i s c r e t e

-

i.

1

sequence, equi- distribution by A f o r tile A-dimensional sequence

{

x. m' m+ 1' x.

. . . . ,

X. 1s Implied by equipartition and holds f o r every A

.

Generation of k-product Pseudo Random Sequences

Implementation of the k-product operation on a binary computer with word length

4

can h e easily achieved by performing k-product operations on each one of the

8

bits. F o r that purpose, the exclusive

OR of two 0 - 1 sequences s l and s2 corresponds identically to the 2-product of the j 1 sequence s l with the complement of s Z

,

o r

Since the exclusive OR operates on a l l

8

b i t s in p a r a l l e l and i s associative and commutative, the k-product sequence i s obtained a s the outcome of (k-1) l - b i t s exclusive OR'S.

Of course, the necessity of obtaining k independent con- I .

stituent sequences introduces a f a c t o r

-

m the overall speed of the k

algorithm s o that we m u s t justify the u s e of a k-product generator.

S e v e r a l a r e a s of important applications a r e :

i) extension of

1 en)

sequences: we r e c a l l f r o m [ 121 this v e r y good but quite costly method of producing pseudo random sequences with a l l d e s i r e d p r o p e r t i e s of randomness. Rather than keep

stubbornly generating {I?") f o r increasing n (one of c o u r s e might think of starting the sequence over with different transcendental

e ) ,

a p a r t i c u l a r sequence, say 2 0 , 0 0 0 numbers, can be s t o r e d p e r m a - nently and used in conjunction with a multiply sequence t o f o r m a 2-product sequcnce which will be a s good a s {f3"\ but with a period

*

a t l e a s t equal t o that of the l i n e a r congruential generator, typically of the o r d e r of 2

-8 .

ii) generation of multiply sequences with homogeneous p r o p e r t i e s over a l l bits: a multiply sequence x = a x S b mod m ca.n be

nS 1 n

analyzed by m e a n s of the s p e c t r a l t e s t to determine i t s expected a c c u r a c y over the whole period; in t h i s s e n s e we mean that k - t ~ p l e s

of only the s m o s t significant bit.; of adjacent values can be con- k

s i d e r e d essentially independent. Typically i f the accuracy i s 16 b i t s f o r p a i r s , it will be, say, 1 0 bits f o r triples, probably l e s s f o r quadruples and quintuples may not even be independent. This

can be observed quite d i r e c t l y by computing bit s e r i a l and c r o s s correlations; in p a r t i c u l a r , we have subsequently compared the data obtained f o r

{

TT

nj

and a good multiply sequence a s indicated by the s p e c t r a l t e s t

x n+ 1 = 2736731631558 xn

+

c s t

The degradation of s e r i a l correlation f o r lags up t o 15 i s quite c h a r a c t e r i s t i c a s we move f r o m the most to the l e a s t significant bit. The distribution of the s e r i a l correlation coefficients should be n o r m a l with mean 0 and variance N (number of s a m p l e s ) a s a consequence of the D e - M o i v r e - i a p l a c e theorem on the limiting f o r m of the binomial distribution. Next, we picked 3 distinct multipliers and combined t h e i r multiply sequences applying the transformation

-

k

t il

f o r k = 3 ; h e r e b designates the I bit of the random integer i, Y

t h

just obtained f r o m the 7/ sequence, b: i s the value of the ith bit in

?.

the 3-product sequence. This transformation simply p e r f o r m s a c i r c u l a r b ~ t permutation equal to

Li]

b i t s f o r the ind sequence

and 2 [ $ ] bits f o r the third. S e v e r a l t e s t s w e r e snbsequentiy performed:

.

bit auto and c r o s s c o r r e l a t i o n s , bit s e r i a l c o r r e l a t i o n s

.

frequency, poker and coupon c o l l e c t o r ' s trbsts

.

distance of 2 random points in a square (d t e s t ) 2

It i s interesting t o notice that the 3-product sequence p e r - f o r m e d equally well a s the sequence

i Tf .

We emphasize that the

study of k-product sequences made e a r l i e r a s s u m e s a l l along that even though the constituent sequences may not be good pseudo random sequences, they a r e nevertheless independent.

Results f r o m these t e s t s a r e given in appendix.

CHAPTER VII

Dokumen terkait