An improved generation technique for random number sequences

An improved generation technique for random number sequences

Mathematics 314 and Computers in Simulation North-Holland XXIV (1982) 314-325 Publishing Company AN IMPROVED GENERATION TECHNIQUE FOR RANDOM NUMB...

838KB Sizes 40 Downloads 131 Views

Mathematics

314

and Computers

in Simulation North-Holland

XXIV (1982) 314-325 Publishing Company

AN IMPROVED GENERATION TECHNIQUE FOR RANDOM NUMBER SEQUENCES N.D. DEANS and D.P. MANN

School of Electrical Engineering, Robert Gordon’s Institute of Technology, Aberdeen AB9 IFR, United Kingdom This

paper dealswith theptilmofprcducingseveral statisticallyindalzendentstreans of ExLsting techniquesaxe discussedmdanewnethcdis proposed. Statistical rmdmnmkers. tests carriedoutm all the circuitsckscribedshm thattheprcpct;edrmathcxlyields randan nmbersequenceswhcse statisticalindepandenceisbetter than that of the sequencesgenerated by existing tecbniqUas. Iheprcposedcksigns cwbe speed

1.

with

an eccnaq

easilyinplemntedusing I51

lLNmcDm(N

The generatim be achieved k!&miqUzs

of using

randan a n&r

&vies,

andoffers

caxickrable

of harckare.

binary sequences of wzll-known

can

:

(i) The use ofanelectrticdevicewhaae ramdan intrinsicbehaviouris based m phencmna. Signal cmditimingis generally neoessaxy to anmrt the output of the device into an acceptableform. (ii) The use of tables of valuas specifically prcduced to pass a set of statisticaltests forrandamesswhentaken in apre-axranged sequance. (iii) The inplemantatim of a sinple algorithm basedm the use of feedbackshiftregisters t-1121 ?he r&hod ckscribadin (iii)is used extensively,the resultingseqwncesbeing mly pseudo-randcmbut pcesessing gccd statisticalproperties. The generationof a digitalrmdannurfberin the range 0 to (2n - 1) mdthe associated ptilens ofproducingseveralsucb sequences of randannmbers presents difficulty. The cbjectiveofthispaperistocmsi&r mathadswherobysetsofrandcmnmbersmaybe generatedtoserve anmberof'wtcsers' with sequencesof n-bit randan nunbers, each pcesessinggccdstatisticalprcperties. such sequencesshouldbeidsallystatistically inaependent.

an inprovadperfommce. ?he generatoris easilyrealisable usingntadiumscaleinteg-ratid circuitry. 2.1 Multiple*ssequenoas Usingn individualfee&a& shift-register circuits c33 in the cxnfiguraticmsham in Figure 1,multiple sequencescanbs generated. A axntm clock signal is applied to each register and awn-bitnmberis producedan eacficlcdcpulse. Each registercmprises N stages and generates ;N~;*ra&anbinaxy sequence of length . The behaviour of each fee&a& shiftregisteris &xribedby amiqueprimitive polynaninal. lhebinarysequancesproduoadat each of then outputs, althoughin-&t, possess the sane bit period. The degree of ems-correlaticnbetween the ms~oas prc&cadassmes anmberofdiscretedist.inct valuss,each less than orequaltothenmber of cyclotanicccsets. This inherent characteristicrules out the use of such a s&ens as ageneratorofhighlyin&pmdant pseudcwzndannmkers. Such aschenehwewrhas the distinct advantagethat the individualregisterscanbe preset to anyknam initialstate andcan,with theapprcpriatedecimtimprccedmee,be arrangedto act as a souroa of mltiple rmdan nunbers. It can thereforebe ancludad that the interdapmdsncxaamngstnmbersindiffexent sequmceswillhava the saltsstatistical qualitiesastheinterdapen&ncebetween ccnseaki~nm&rsinthesamssequsnce.

The prcpertiesof doamantedganerators are exminedandadssignispraposedoffering

0378-4754/82/0000-0000/$02.75

0 1982 IMACS/North-Holland

N. D. Deans, D. P. Mann /Improved

generation

technique for random

number

315

sequences

reg. a

-2

reg. b N =31 Figure

1

Multiple

m-sequences

\

I

@ Figure 2

Two feedback shift register pseudomndom sequences

N=41 main register _I*? \ ‘\

coupling space = 2

I

\

-

1 Ta Tb Figure

IM,’

side register 3

Auto-correlation

function

Figure 4

Cascaded

shift

In *

M=22

registers

316

N.D. Deans, D. P. Mann /Improved

generation

2.2 MC&lo-2 Additial of Indspmldm-k m-Sequanoss Sequencesof randannurtbersmaybe generated usingmultiple fee&a&-path fee&a& shift 4,

3?XJiSterS

5,

13,

141 with

mzdul*2

additionoF: prescribedoutput signals as sharm inFigure2. Such a techniqueis eccnanical inhar&areterneandhasbeenusedina n~rofareasasapseudo-randannuttber source. The auto-correlaticnfmcticn of the sequsnspresentatthe outputs of the mcdulo-2 adders is many-valued, (as described belcw) and assumss the fonnshcwn in Figure 3. Specifically:

ab R(t) =-1 Tb

t = KITa =K2T, Kl,K2 = 1,2,3,...

R(t) = $

t = K2Tb =KITa Kl,K2 = 1,2,3,... a

R(t) = 1

Each side registeris coupled to themain registertoprcduoe asequsnce of length UN-l) (2Kl). Ihebehaviourofthis generatorhas been investigated 61 andthe randcmbinaryseqwancesproducxsd 5,avsfonns similartothcse dascribedpreviouslyin Secticn 2.2. A phase shift of 2N-1 clock periods oramultiple ofthis canbe achieved byensuringthatthe ccuplingspaaa cn thenein registeris greaterthancme. Aguaranteed phase shift is thus realised,regardless of theinitialccnditicns oftheindividual registers. m-sequence.

2.4

t = KITa =K2Tb Kl,K2 = 1,2,3,...

R(t) =&

technique for random number sequences

t=KTaTb

DscxmpcsedRegister Technique

lhe behavicurof the dscasxeedreuister generatorhas been in stig;~~)-~ $dn noreextensivelyin w8 . registers each of length Ni (i = 1,2,...n) linearlyinterccnneckadsothatlhe characteristicpolyncxninalti&&sxibes the axqxeite systemisprimitive andofdegree N =Nl +N2 + ... Nn, as shcxn in Figure 5. At each clock pulse, n new bits are fonnsd and usedas inputs to then registers. These n bits are then used to form an n-bit randan nor.

K = 0,1,2,...

Ta anaT), are the psricds of the m-sequsnoas producedby registers 'a' and 'b' respectively. Decimaticnof the n-bit output to produce several sequancesof n-bit n~rs can be ~gardedas~~ticnofse~ral~ase-shifted butidanticalpseudo-randans~oas. Aprqper dscimaticnofasequanceprcduoadbythis schema possesses featuressimilar to thcee apparentfrcmthedximaticnofanm-sequsnoa. That is, the new bit sequencesproduced are identicalto the original sequenoa,equally displaced frcxneachother and possessingan additicnalphase shiftwith respect to that originalsequenoa. Individualnuker sequsnces thereforepzesessthesame independenceas ihatproducedbyamundximated generator. The degree of cross-correlation ?z&weentheoriginalsequsnceamdack&reted sequanoais&pesl&nta-~theckcimaticms&ene usedandthepaintintheoriginalseq~ceat whichckcinaticnstarted. Sarenot insignificantcorrelati~~bep~~t,and it is ccncluckdthat dscimaticnof an n-bit n&rpraduoadbyseveral&ase-shifted vxsicns of sons originalsequenos naayprcduce results of doubtfulquality. 2.3 Cascaded Shift Wgistexs The circuitccnfiguraticnfor a cascadsdshiftregisternunbergenerator, shcxn in Figure 4, is scnewhat similar to that for the multiple fee&a&-path generatordescribedpreviously. It -rises n sick registers,ea& M-bits in length and a single main N-bit register. 'Ike fee&a& ccnnecticnsmacktoeacfi register are suchasto,ifactingalcne,prcducean

Each of the nbinaxy sequenoas is drm fran thesan-em-sequence,anddiffercnly in ir relatiw phase shifts. It has been shanln ? 8] thatccnsi&rable caremustbetaken toensure thatthephase shiftedsequanm are 'widsly' spaced, since the -phase shift differencesets a limittothe operationof the number generatorbefore a si@ficant degree of cross-CorrelaticnbeW thebinary sequsncesoccurs. since the 0_ltputsequances are identical,the crass-axrelaticn fmcticn has the sama form as the auto-correlaticn fmcticn butwith an initial delay. The netnork fi a"dgi peti module-2 qxaraticnson the contents of the s&-registers. The dasignof these mustbe such as toensure thatanm-sequsnceisprcduosdandthatthe relative phase shifts are achieved. 'Ihe statisticalqualityof the randannuabers prcduosdby this generatorshouldbehigh, but the catputaticnaleffort involved in evaluatingthephase shifts oflcngpseuti rmxknnsequances is exoassive. Using ccncludingarg~~~~tssimilartothosegivznin Sectial 2.2. it is clearthatthe technique of sinply decimatingthe n-bit nunber produoed to cbtain sewraloutputnunber sequsnces wouldbe unreliable. 2.5 use of ShiftedmSequences Usingthetechniquss&scribedinSecticns2.2, 2.3, and 2.4, n identicalbut phase shifted sequancescan be used to prcduos an n-bit randannusber. Ifthebinarysequsncesused aremseqii~s,therandcmnurrbersequence canbeexpsckadtohavegccdstatistical dscimaticnof sucfi a properties. Hmverthe

N. D. Deans, D. P. Mann /Improved

generation

317

technique for random number sequences

Lsame shifted m-seq. yfroxi 2

Figure 6

Figure

5

Decomposed

shift

register

Figure7

Producing

a shifted

Implementution

mately

m-sequence

of 8 shifted -uences

m-seq-

N. D. Deans, D. P. Mann /Improved

318

generation technique for random number sequences

randcann~rseq~cedcesnotp~~severdl sequanosswith a&quate statisticalrandatness. Any advanosdor&layedpse*randanbinary sequanceproduoadby ashift registerwith fee&a& canbe dtainedbymxlulo-2 addition 'ft register as of selected stages of the shcwn in Figure 6. [9, 10. Yhi

L&k

j be the binary output of the jtlstags of an A-stage register at tine k. Let bj be the output_vector, i.e. a cne in the jth m of N actor b inplies thatthe output sequence KJk,-$E ~~t~~W~~~egg$e~ta*. Let ca-~tents ofthe registerat Wk. Then, T

= g v j k

%,j

Accnputersirmilatia?oftheprcpcsedte&niqus revealedthatphase shifts of approximately2J where Jis an integer czmbedstainedwith the addition of asmallnusberofstages. This is inportancesinstherncdulo-2adderscan intrcduosexcessiveprcpagaticndelays in a hardware randcm n&r ganerator. Thephaseshiftedsequenoaprcducedbythe mathcddascribedcanbeusedtoprcduoean n-bit randan nunber. Ccnsidarthecasewherea 31-stageshift repter has fee&ack applied so astoprcduQa2 -1bitms~aa. If an &bit randanrnmber is required,the relative phase shiftbe&aen eachbinarysequence should be (231 -U/8. Thusthemaxirnxmdisplacenent is approximatedby 2". lhe requiredphase shifts (SO'S1 ... S7) are given by : Si

also

=

228 i

i

= 0, 1,...7 &cd-8

IJlclj= gj Fk+-Vl

MheEVlis the initial state of the register EndTis the registertrzmsiticnmatrix. A s&%eisshifted,mavbe ansidaredaseither the SEZCJUXIOZ {~,j} qratedcnby thetransiticn matrix s tines, i.e.

%$,j =

cj,je

= i;

~K+S-lij 1

j

. . . . . . (1)

or as theweightednrc&lo-2 sumof the register states at tine k n

Seqwances forwhich Jis ncn-integercanbe generatedusingthea&hcxdsh~inFigure 7. A single 31-stagsregisterwith fee&ack is usedtoprcduce anm-sequanaa {LJk)andthe appropriatestages aredulo-2 addadtocbtain sequences i&l}, {&_S2! and {C&41: N~v if ftedby Si 1~ further shiftedby a=+== Sj (j = 0, 1, ... 7) theresultingsequenoeis &splaoad fm the originalby SiiSj. 'Ihe sequence is_ 11 czmbe fedintoaother registerwfu cz hasthesmnanrodul~2additicn cperatianperfonnedcnits ccnbants as the first register. Theresultingoutputsequsnoas are {Uk_S3j and Ivk_S51. Alleightsequanoas canbeprcducedinVLsway. Pandanbinary sequenossprc&osdby this tedmiqu?have the samepmrties as thesequancesproduoadby &ccmpceedregisterr&ho&,butthe regular phase shifts aremuchnore sinply a&ievad.

. . . . (2) %ere diare IhewaightingccefficientS. Substitutingfor s,i in (2) and equating (4) zmd (2) gives fk+S-lV

b

j

1

=

i<'ldi[+k-l~l]

+s iij T = i; 1 diEiT . . . . (3) The feecbadcstages of the shift register dafine matrixT. Iheoutputstageofthe register,tobe used forthe reerenoa sequence ( ,j), defines ector b.. From equation (3 F _it m_ be seen that & multiplyingb. by T "s" tines will determine the stagas of7the register tobe addsdto prcduoatherequiredphaseshift.

2.5.1 Proposed Technique The prcblemof svnchrcnouslygeneratingsevara n-bit rindan n&&-s can be overcateby enplcying the above tetiquatopreccnditicnedsequances. Eachnunbersequanoa is produced by a generator of the Qpe describedin Section 2.5,with the phase shift betieen any twobinary output sequenoss calculatedfmnasecticnofthemsequence length andnotthewholemsequance. The lengthofasecticnisdatenninedbythe Ccnsider nunberofrandcmnunbers~ces. the casewhere four randannunbers each of ei@tbits are requiredsimultaneously. The length of asecticn shouldbe cnequarterthe length of the msequenos enplcyed and the phase shiftbetween outputbitswillbe cneeighth of this section length. Thereisncw tbe&?een my twobits of maximm displaoaaan the example. anynunber. Figure 8illustra~ Inpractis,thesethcdcanbesinply inpleaentedwhere thereare 2I (I =integer) nunber sequanoas. Each shift register,

N. D. Deans, D. P. Munn /Improved

generation

technique for random number sequences

3

319

STATISTICAL TEZ?TS

Pcssible tetiq-133 of pro&xing 81 n-bit randannmberha~beendisoussed. Partioular generatorswhich offersoluticns to theprcblem ha=been dzxribed. The statisticaltests whid~havebeenusedtoe.xminetheperfoxms~~o~ of the nmber generatorsamz cmsideredbslcw. The generatim of sixteen randcmnmber vce~ (Eir Ei, .... . Ei) WSS invastigated. %esenu&ersequwoeswereeitherproduoed synchra~ously,inthe case oftheprqceed shiftedm-sequenoztedmiqxx?,orbyrepeated rmning of the generator,in the ease of the W-fee&a& registermethod. Eeoimtimby sixteenwasenplqedtoproduoethe sixteen secp31c2sintheca~e ofamltiplenweq.xmoe iI@em?ntatim.

Figure

~estswere carried out for an a-bit rmdan nmber i.e. 0 < Ei < 255. Asanplesizeof 4~n~rsper~oewa.5 uzd. 'Ibeactual carried out were as follw : teStS

8

serial

load \ > 8bit number sequences

l-

loa

C lock

I

I

1 Figure

9

clock

Multiple

cperating atits allocated~itim of the msequmoe,isp~~loadedwiththemseq~oe vale at the start of its sectim. This is atievedbyckcimatimofasourcem-seqmnoe. Aoirouittoinplem?ntsud~asourozisshmn inEIgu?x9.

/

random

number

generator

(i) The [email protected] man, central tendency or locatimoftherandanvariable, was calculated for each of the sixteen samoes

320

N. D. Deans, D. P. Mann /Improved

generution technique for rundom number sequences

w empiricalnem

emcted

= i

c i=l

28 - 1 2

valus = -

X2 values obtained and criticalvalues for the test, Xb,O.O5, are given in each table of results.

Ei

=

127.5

?he results as shaFJnin the first colurrn of each table of results.

(ii) The variance of each sequencewas calculated,aneasure of the dispersionof the randanvariable (72

=

c”

(Ei -

6) p(xi)

, N = 2’

i=l

Eq&.d&r.[2],

~2=@9

=+ = 5461.25

The

each

results are shown in the seccnd colmm of

table.

(iii) To test the qeneratedprtkability distributionfmct.i& of E., the chi-sq~uare (X21 test kl, I21 was use3 to cxmare the &served f&q&&with the theoretical expected lue. To carry out the test, the interval 't" 0, 253 was sub-dividadinto sixtyfourgroups givingsixtythree degrees of fmedan for the test. Critical values of X2 are given alcngwith results in the third colusn ofeachtable. The level of significanaafor the test, a, was chosen to be 0.05. (iv) Independencetests ware carried out cn Firstlynmberpairs, nmberpairs.

(v) The Kolmcgorov-Smimovtest FJ was used to canpare the experimantalcunniiative distribution functicn r&served for Eiwith the expected distributial. The value D, given in the sixth colum ineachtable,is the difference&served withgreatestabsolute magnituda. Critical valuas for D, with CY= O.O5, are also given. (vi) A nms test @ was enplayedto datemine if thereware lcng runs of large or small nunbars. Itis ccnsidaredtobe avery discriminatingtest, that is it 'fails'more sequences of randannmkers than other tests. values cbtained for the test and critical values cbtained frczntables of the noma d&kributicn (a = 0.05) am gim cn the last colum of ea& table of results. 4

CCWAFZSCN

OF TEST RESULTS

The perfomanoa of nuker generatorsbased cn the follokng te&niqEs has been ccnsidered : (i) The multiple m-sequencerrethcd,described in Sectial 2.1. Acircuitdiagramofthe generatorbuilt to test this method is shurm in Figure 1, andthe experimentalresults &tained aregivaninTable1. These indicate thattheseq-cesprcduced pcssessed relativelypoor independenoa characteristics. Cnly 38% of the seq-ces had values in excess of the criticalvalue for the nmbe~pairs testedand13% failedthe test for consecutiveness. QI the other hand, sequencesprodu~dbythis~thodarep~dto have gccd distribution&aracteristics, 56% passing all tests.

(Ei,Ei_l),(Ei,Ei_1) I **a (Eir Ei-l) N

= nmberofs~les

i

=

2, 3, 4, .... N

werechasenrmdccxtparedtockterminethe qumtity of ccnsecutiventiers, (E., E.-l) etc., follaing in the sane group. 'Fo??both

. ?kis rreantthatthe expected nurrberof kservatims in each groqwas ~/(16 x 16). 'Iheseccndinckpendanoetest was fornwberpaixs,

cnoaagainthenuaberswere&senedfor mcutivaness, thatisbothlyingin the sane grow. The testwas only carriedout whenthe&cimatednunkersequancete&niqus was used. Ihe x2 test has been used to determinethe goodness of the results. The

(ii) The ccnbinaticnof tic-~sequanoas tetiique using as describedin Secticns 2.2 and 2.3. The generatorused to test the n&hod is shown in Figure 4. Nockcir@ati~l of the randannwbersequanoeswas performed. Ho,zeverthe generatorwas nm sixteen tires to produce the necessary output sequences. The results are sha.inon Table 2. The sequenoesprcduoadperfomed averagely wallinboth thcee tests examining their distributicncharacteristicandtheir indapanckncecharacteristic. cnly 13% failed to pass the formar and 19% failedtomeetthe critical test values. Overall, 63% of the seq-aes passed all tests. techniqwswere (iii) Shiftedmseq~a? investigatedby testing three different generators. All of the generatorsenplqred the phase shifting techniquesdescribedin Sectim 2.5. The stages requiredtobs aodulo-2 added toprc&oa the phase shifts are given in figure i.nFigum 9,has the 10. cMycne,shc~

N. D. Deans, D. P. Mann /Improved

generation rechnrque for rundom number sequent’es

321

the majority,eleven,passed all tests successfully.

feedback

approx phase shift

required

from points 18and MOD-2 addition

31

Asmtnaryofthe results is givencnTable 6. Forea&nethodtestedtbe n-r of sequanoas wki~failedaparticulartestisindicated. Finally the nuaber of sequanoaswhi& passed all tests has been calculatedforeachrethad.

stages 5

1 x2 2

27

x2 27

4

x2

8

x 227

27

approx. phase shift

8, 10, 19

addition

stases

1, 5, 7

22

1, 9, 13

22

1, 16

8 x 2

MOD-2

24 and 31

1, 3, 4

22

2x2

Figure10

tecikquas forprcducingseveral statisticallyindauendentstreafnsof randan nmbers have been -mvastigated.

7,16

required

P

CXNCLUSION

various

4,5,16,25

feedback from points

1 x2 4x2

2, 8, 9, 18, 19, 28

Additions

required to produce phase shifts

prqedtecbniqua i@emantedtoproduce sixteen synchronousstreams of randannmbam. The results of the statisticaltests cn this generator are shm in Table 5. The other twogenerators,ofthe typeshcwn in Figure 7, ware ckcimatedtoproduce sixteensequences. Ihe investigaticnsccncludadthat&&nation wasmmreliab~~thodofproducingseveral nunbersequanoas,butitnay prove interesting to dxerve the effects (if any) cn the tests. 'iheresults cbtainedare giv.aninTables 3 and cnly diffemnce 4. Itshouldbenotedthatthe between these two generatorsis in the choice of m-sequenceused. Of the te&niquas usingshifted~sequences, the prq>csedte&niquabasedcn the use of preccnditicnedsequancesyields ccnsistently gocd results. Although twosequences failedthe Chi andKol.nogorov-Sn-imovdistributicn tests md faxfailedtopass the independencetest,

Theuse of multiple msequanoeswas ccnsidared. ?his ted-niqua canbeeasily inpleaented,and the n-bitnmbers producedby asingle generator whcse outputsequenoais dacinatedhave the sane statistical quality as the originalsingle nunbar stream. Cross-correlationcharacteristics bedifferentmsequances rule out this generator as ahighly indapendantnuaber source. The use of a tie-msequenoe conbinaticnwas onsidaredfortioquite different inplerentaticns. Module-2 addition of m-sequencesoffers aeccncny ofhar&am although carehastobetakn toensure that an a&quake phase shift exists be-en output bit sequences. ?he use of cascadadshiftregisters eliminatesthe phase shiftprcblembut at the cc& of additi~alhar&are. Invztigaticn of the auto-cornalatianfunctionof an n-bit n~rproduoedbytkistecfiniq~indicated thatthenmbem arenotofhi~statistical quality. In additicn,prcper ckcimaticnof such a nudxr sequsne may result in si.gnificantcorrelaticnbeWeenthe output nunberseq~ces. Finally the principle ofprcducingn output seq~ces franasinglemsequanoawas ccnsidared. This~beachievedbydaocarpcsed registerte&niquas. Ccnsickrableeffort is involvedinensuring that the n sequences produced are widely spaced. Wxdulo-2 additicn of selectedstages of a feedoak shift register alsoyields phase shiftedseqmnoes. Ik necessary ccnbinaticnof stages is nrxe sirply calculated. Pr~r&cimaticn of asingle nuabersequanceprcduoadbythiste&niqusmay result in cross-cormlaticn between the output nuabersequences. A new pseudo-randannumber generatoris prcpceed. Each output nmber seq~ce is simultaneouslygenerated,making the tecbniquawell suitedtohighspeedpmM.ens. Thete&niquareliesonphase-shiftingpnaccnditionedsequences,and lends itself to a IGI circuitry inplerrentatia. Statistical tests perfonted(IIthe generatorcxnfinnthe high statisticalqudlity of the sequences prcduoadtis-a-vis alternativetetiquas. Of the sequanoasproducedby this nexrtrathod, 69% passed all the statisticaltests. Althou&

N.D.

322

Deans,

D. P. Mann /Improved

generation

asimilarpass ratewas achievedusingthe circuitccnfiguratimillustratedin Figure 7, the results given in Table 4 indicate that this techniqm cannotberegarded asbeingreliable. 6

ACKNuiIJzlxzQ~lS

The supportoftheScien~ andmgineering -sear& Comcil, theNatima1 Centre of Systems eliability, UKAEA and the assistance of Mr B Davidsm and Miss K Craighead are adanvledged. 7

Cl3 Golalb s W, 'Shift F&gisterSequmoes", Holden-DayInc. 1967 r2i Hoffman de Visn%?G, 'BinarySequences', English lkiversityPress Ltd 1971 c33 Birolini A, 'Hankare Simulatim of semi-Ma&ov and FUatedProcess', Mathervatics and qutirs in Simulatim XIX (1977) 75-97 North-HolandP~lishing Ccanpmy c4-l MaritsasDG,Correspzn&nce'Cnthe StatisticalP-x-ties of a Class of Linear Product Feedbadc Shift-Wgister Sequences IEEE Trsnsacticns01 Ccmputirsob. 1973 pe 961-2

bl

Hartley MG, 'Develwt, &s&n and Test Prooedure for F@ndcxnCeneratom using chainccdes',Proc. IEE Vol 116 No. 1 1969 F 22-34 C6J S&wjndM, 'QICeneratingandApplicating asetof IndependentBernoulli-Seqmms' ProQedings of lstUkematicnalQrqx6iumcn Stc&astic Carputing and its elicatims 1978 Toulouse France pp 103-12 Ccquting andits A@ications 1978 Toulouse France c73 HurdWJ, 'Efficient&neratim of StatisticallyGcodPseudcnoise by Linearly IntercalnectedshiftPegisters’ IEEE Trmsacticns a~ Ccmputers 1974 p~z146-52 AC, m

Mars P, Miller A J, 'TheoryandI&signof gitalStc&asticCurputerRzmdcmNwber l,"ai Generator &khenatics andCcmputers in Simulatim XTX I.977pp 198-216 North-Holland PublishingCmpmy Lat&?iecKJ,Conxspm&noz 'New 10 k3, c& of Generaticnof ShiftedLinear PseudormdanBinary Stquenoz' Proc. IEE Vol. l21No. 8 1974 pp 905-6

for random

number

sequences

II

11 Siegel S, 'Nmpar~ticSMistics 0rBehavioural Science'NewYo~.%,&XrzwHill Ltd. 1956 Maisel H, Qlugr~oli G, 'Simulatim of [*I Dis~testocfiasticsysterrs',Kingsl>ortPress Ltd. 1972

'The Autccorrelatim [133 MxitsasDG, FunctimofTwoFee&ackShift-Register Pseudorandcxn Source', IEEE Trzmsacticnsm Ccmputers 1973 pp 962-64 14 Gnzen D H, 'NcnlinearProduct-Fee&a& Skl! ‘ft F+egisters' Proc. IEE Vol. 177 No. 4 1970 pp 681-86

R%FEREC?CES

[81 Maritsas D G, ArvilliasAC,Bomas 'Phase Shift Analysis of Linear E&&a& Shift WgisterStructures Gsnerating PseudorindcxnSqznces' IEEE TransactiCmputers c-27 No. 7 I.978F 660-69

technique

N. D. Deans, D. P. Mann /Improved

generation technique for random number sequences

No, of elements in each sequence

=

4000

SEQ 1 2 3 4 5 6 7 8 9 10

MEAN 126.4 126.7 126.6 125.7 125.5 127.2 126.1 128.7 127.9 127.8

VAR CHI 5441.2 91.3 5555.3 56.4 5407.1 64.7 5529.2 64.2 5476.8 115.6 5397.8 55.6 5585.8 68.1 5505.1 64.6 5345.3 50.0 5482.0 64-O

TEST1 12.2 19.3 26.8 17.2 56.4 28.5 25.9 12.3 25.2 28.0

TEST2 12.2 10.7 14.7 12.4 18.0 25.7 30.7 17.1 21.0 24.0

K-S 0.011 0.013 0.013 0.016 0.015 0.012 0.015 0.014 0.015 0.009

RUNS -0.06 -0.22 1.06 0.52 0.98 0.77 0.14 0,48 0.66 1.77

1:

128.4 127.0

5388.4 66.6 5544.6 50.3 5433.2 61.1 5457.4 44.9

11.7 9.4 20.0 15.9

15.5 15.2 11.2 18.7

0.009 0.012 0.008 0.012

-0.19 0.04 -0.13 -0.89

Table 1 No. of elemenk SEQ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

MEAN 128.5 125-7 127.4 128.0 127.4 127.7 126.6 128.5 127.2 127.4 126.8 127.5 127.5 129.4 128.7 128.6 (127.5

Multiple m -sequence

in each sequence V!R CHI TEST1 5579.3 50.8 8.8 5471.4 84.9 14.7 5470.2 63.3 11.0 5486.5 82.8 73.4 5480.4 73.4 7.9 5436.9 57.1 17.3 5383.9 70.2 11.5 5548.2 79.7 15.7 5453.8 54.0 14.5 5479.6 29.2 16.8 5376.9 78.5 32.8 5553.1 48.2 26.3 5411.6 71.9 15.1 5435.2 65.0 11.7 5494.5 72.4 22.0 5506.4 61.7 18.1 5400) (82.5 24.9

=

4000 K-S 0.010 0.016 0.012 0.009 oxI 0.005 0.012 0.013 0.010 0.004 0.011 0.011 0.012 0.017 0.011 0.012 0.030

‘1 Table 2

323

RUNS -0.91 -0.39 0'49 1.36 -0.73 1 .05 -p.41 -1.28 0.85 1.14 -0.43 -0.09 2.30 2.60 -0.85 -0.81 +l ,761

-/_---qF:

Combination cf two m- sequences

“o$y,

324

N. D. Deans, D. P. Mann /Improved

No.

generurion technique /or rundom number sequences

of elements in each sequence= 4000

SEQ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 e;;eucet;dv

MEAN 125.5 128.4 126.8 127.1 127.2 128.2 128.2 129.4 127.2 127.3 128.9 128.2 126.0 127.5 128.8 128.0

VAR 5465.5 5491.0 5518.6 5527.2 5450.8 54lY.l 5394.2 5489.7 5559.0 5466.4 5433.9 5380.9 5479.5 5501.9 5535.8 5374:4

'y'

TEST1 CHI 71.3 19.7 49.2 18.4 57.4 19.9 11.4 53.3 44.3 25.8 56.0 14.6 15.3 64.3 18.8 49.2 55.4 12.4 43.8 8.3 66.8 20.9 13.4 52.9 17.1 86.0 65.2 20.8 22.3 58.8 56.7 28.0 '82'5

Table 3

TEST2 19.7 19.4 16.6 16.7 4.8 21.4 10.3 14.9 16.4 17.1 16.2 11.2 20.8 5.2 14.0 23.6

24'y

24v

K-S 0.019 0.011 0.011 0.010 0.006 0.007 0' 010 0. 016 0.011 0.007 0. 022 0 011 0 016 0. 006 0 '014 0 010

RUNS 0.50 -0.32 -1.26 -0.92 -0.57 0.19 -0.84 -0.03 -0.98 -0.53 -1 .82 0.39 -1 .77 1.55 3.08 -0.36

03' '3criiiz1=vp;;1

Shifted m-sequence technique

No. of elements in each sequenceq 4000 SEQ 1 2 3 4 5 6 7 8 9 10 11 12 13

MEAN 126.4 127.0 128.0 127.1 126.3 126.4 126.1 128.3 128.0 126.3 126.8 127.9 127.4

szii7 \tii Tg; 5416.6 66.3 8.9 5510.4 69.6 9.7 5639.0 90.6 25.2 5590.1 47.0 33.3 5528.3 93.5 17.2 5362.0 50.0 21.3 5429.9 65.6 30.1 5420.5 38.1 14.8 5599.4 93.5 14.4 5399.0 46.7 18.6 5570.6 106.8 20.2 5395.7 52.7 7.6

Table 4

TEST2 26.3 14.6 24.4 31.6 6.2 20.3 11.2 52.8 24.8 17.5 13.3 21.3 26.6 16.0

Shifted m-sequence technique

K-S RUNS 0.012 -0.060 0.009 -1.26 0.010 0'22 0.014 0.70 0.012 0.26 0.014 -0. 50 0.015 0.87 0.009 -1.14 O.ooB -0.92 0.016 -0.54 0.011 -1.14 0.013 -0.22 0.006 -0.25 0.014 -1.32

N. D. Deans, D. P. Mann /Improved

generarron technique for random number sequences

No. of elements in each sequence = 4000 SE0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

MEAN 128.3 126.5 1282 126.3 126.2 127.1 127.0 128.8 128.7 1258 126.4 125.2 124.5 121.2 126.9 122.7

VAR 5390.4 5387.9 54857 5410-8 5627.7 5413.8 5421.7 5294.5 5481.0

TejTl 21.0 22.2 253 23.6 8.8 28.6 14.0 24.8 10.0

K-S 0.010 0.012 0.009 0.012 0.015 0.011 0.009 0.018 0.012

RUNS -0.79 -060 0.62 0.02 2-44 -2.33 -0.28 -1.57 -0.19

54608 66.0 148 0.018 0.48 5539.1 54.0 7.5 0.012 -0.31 5372.2 63.0 19.6 0. 018 -1.25 5426.5 84.1 28.4 0.026 0.56 5432.9 105.1 46.2 0.041 0.76 5412.9 78.2 .13.6 0.012 -0.71 54457 74.8 17.9 0.02a 0.55

F

82.5

24.9 C

expected value

0. 030 21.76

critical v&e ( oc = 0.05)

Proposed method

Table 5

number of seq. which passed all tests

CHI 674 45.7 52.7 37.5 60.8 61.0 4'2.8 658 50.1

I IO

9

11

16 I

11

In sectionA each box contains a numberof sequences failing the particular test ( d= 0.05 1 Table 6

Analysisof results

325