SU1368876A1 - Random number generator - Google Patents

Random number generator Download PDF

Info

Publication number
SU1368876A1
SU1368876A1 SU864099508A SU4099508A SU1368876A1 SU 1368876 A1 SU1368876 A1 SU 1368876A1 SU 864099508 A SU864099508 A SU 864099508A SU 4099508 A SU4099508 A SU 4099508A SU 1368876 A1 SU1368876 A1 SU 1368876A1
Authority
SU
USSR - Soviet Union
Prior art keywords
input
output
block
random number
subtractor
Prior art date
Application number
SU864099508A
Other languages
Russian (ru)
Inventor
Игорь Георгиевич Циколин
Татьяна Николаевна Редуто
Владимир Иванович Якименко
Original Assignee
Войсковая часть 60130
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Войсковая часть 60130 filed Critical Войсковая часть 60130
Priority to SU864099508A priority Critical patent/SU1368876A1/en
Application granted granted Critical
Publication of SU1368876A1 publication Critical patent/SU1368876A1/en

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

Изобретение относитс  к вычислительной технике и может быть использовано дл  формировани  случайных чисел с произвольным законом распределени , например при построении электронных моделей системы св зи . Цель изобретени  - повышение быстродействи  генератора. Цель достигаетс  введением в генератор элемента И, блока элементов И, блока пам ти и накапливающего сумматора- вычитател . В генераторе обеспечиваетс  небольшое количество шагов- тактов дл  формировани  каждого случайного числа. 3 ил.The invention relates to computing and can be used to generate random numbers with an arbitrary distribution law, for example, when building electronic models of a communication system. The purpose of the invention is to increase the speed of the generator. The goal is achieved by introducing into the generator the element AND, the block of elements AND, the memory block and the accumulating adder-subtractor. The generator provides a small number of steps to form each random number. 3 il.

Description

соwith

9)9)

эоeo

0000

Изобретение относитс  к вычислительной технике и может быть использовано дл  формировани  случайных чисел с произвольным законом распределени , например,, дл  построени  электронных моделей системы св зи.The invention relates to computing and can be used to generate random numbers with an arbitrary distribution law, for example, to build electronic models of a communication system.

Цель изобретени  - повышение быстродействи  генератора,The purpose of the invention is to increase the speed of the generator,

На фиг. 1 приведена структурно- функциональна  схема -генератора случайных чисел;на фиг. 2 - функциональна  схема накапливающего сум- матора-вычитател ; на фиг. 3 - -алгоритм формировани  случайных чисел.FIG. 1 shows a structural-functional diagram of a random number generator; FIG. 2 - functional diagram of the accumulating totalizer subtractor; in fig. 3 - random number generation algorithm.

Генератор содержит генератор 1 тактовых импульсов, переключатель 2, счетчик 3, блок 4 пам ти, накапливающий сумматор-вычитатель 5, блокThe generator contains a generator of 1 clock pulses, a switch 2, a counter 3, a block 4 of memory, an accumulator adder-subtractor 5, a block

6пам ти, генератрр 7 псевдослучайных чисел, блок 8 .сравнени , элементы ИЛИ 9 и 10, элемент И 11 и блок элементов И 12.6 in order, generator 7 pseudo-random numbers, block 8. Comparison, the elements OR 9 and 10, the element 11 and the block elements And 12.

Накапливанлций сумматор-вычитатель 5 содержит вычитатель 13, сумматор 14, элементы 15 и 16 задержки, элементы И 17 - 19, элементы ИЛИ 20 и 21, регистр 22.Accumulation adder-subtractor 5 contains subtractor 13, adder 14, delay elements 15 and 16, elements AND 17 - 19, elements OR 20 and 21, register 22.

Генератор работает следующим образом .The generator works as follows.

Р исходном состо нии в генератореP the initial state in the generator

7псевдослучайных чисел установлен режим однократного формировани  равномерно распределенных случайных чисел на заданном интервале м, . В блок 6 пам ти записаны коды чисел, соответствующие верхним значени м каждого т-го отрезка (,N) на которые разделен интервал кодов MQ, М. При этом длина т-го отрезка пропорциональна веро тности по влени  случайного числа О на заданном интервале.7 pseudo-random numbers set the mode of once forming uniformly distributed random numbers at a given interval m,. Memory block 6 contains codes of numbers corresponding to the upper values of each m-th segment (, N) into which the interval of MQ codes, M, is divided. In this case, the length of the m-th segment is proportional to the probability of occurrence of a random number O at a given interval.

В блоке 4 пам ти записаны двоичные коды значений функции, определ ющей закон сходимости, напримерIn block 4 of memory, binary codes of the values of the function defining the law of convergence are written, for example

М M

NN

где i 2, К; N 2 where i 2, K; N 2

2 2

К - число итерацийi необходимых дл  поиска с заданной точностью га-го отрезка, на который попало значение случайного числа Q. На вход В накапливающего сумматора-вычитател  5 подаетс  двоичный код, соответствующий номеру 2 отрезка интервала м, м.K is the number of iterations required for searching with a given accuracy of the nth segment, which has got the value of a random number Q. Binary code corresponding to the number 2 of the interval interval m, m is fed to the input B of the accumulating adder-subtractor 5.

В начале работы импульсом начальной установки Sj обнул етс  счетчик 3. Кроме того, импульс й черезAt the beginning of the operation, the initial setting pulse Sj zeroed the counter 3. In addition, the pulse d through

элемент ИЛИ 10 поступает на вход генератора 7, устанавлива  на его выходе первое случайное число и на вход начальной установки накапливающего сумматора-вычитател  5. Б сумматоре-вычитателе 5 импульс S открывает элемент И 19, разреща  запись кода Bj через элемент ИЛИ 21the element OR 10 is fed to the input of the generator 7, the first random number is set at its output and to the input of the initial installation of the accumulating adder-subtractor 5. In the adder-subtractor 5, the pulse S opens element AND 19, allowing the Bj code to be written through the element OR 21

в регистр 22. Одновременно импульс. S через элемент ИЛИ 20 поступает на тактовый вход регистра 22, осуществл   запись кода В в регистр 22. На выходе регистра 22,  вл ющегос  выходом сумматора-вычитател  5, и, следовательно, на адресном входе блока 6 пам ти устанавливаетс  двоичN ный код числа В , равный А (--) .in the register 22. Simultaneously impulse. S through the element OR 20 enters the clock input of the register 22, writes the code B to the register 22. The output of the register 22, which is the output of the adder-subtractor 5, and, therefore, the binary code of the number B is set at the address input of the memory block 6 equal to A (-).

При замыкании переключател  2 тактовые импульсы S; с выхода генератора 1 поступают на счетный вход счетчика 3, который формирует коды 9; ,  вл ющиес  адресом соответствующих  чеек пам ти блока 4. Импульсами 8; , поступающими на синхронизацию блока 6, содержимое б;-х  чеек блока 6 считываетс  наWhen the switch closes 2 clock pulses S; from the output of the generator 1 is fed to the counting input of the counter 3, which generates codes 9; Which are the address of the corresponding memory cells of block 4. Pulses 8; arriving at the synchronization of block 6, the contents of the b; -x cells of block 6 are read into

второй вход блока 8 сравнени ; В последнем осуществл етс  сравнение кода А А(М|) на выходе блока 6 посто нной пам ти и кода Q на выходе генератора псевдослучайных чисел ..the second input of the comparison unit 8; The latter compares the code AA (M |) at the output of block 6 of the permanent memory and the code Q at the output of the pseudo-random number generator.

Если выполн етс  условие А(К;) Q то сигнал логической единицы j формируетс  на выходе Больше блока 8If condition A (K;) Q is satisfied, then a signal of a logical unit j is formed at the output of More than block 8

Сравнени .Compare.

При этом импульс 1 поступает через элемент ПТИ 9 на вход синхронизации блока 4 пам ти , с выхода которого считываетс  код А(М ,-, )At the same time, impulse 1 is fed through the ICD element 9 to the synchronization input of memory block 4, from the output of which code A (M, -,)

нового числа М;, адрес которого сформирован на выходе счетчика 3. Код А А(М;) с выхода блока 4 подаетс  на выход блока 5, В этот момент времени импульс | поступаетThe new number M; the address of which is formed at the output of the counter 3. The code A A (M;) from the output of block 4 is fed to the output of block 5, at this point in time the pulse | arrives

на первый вход задани  режима сумматора-вычитател  5, при этом импульс |, поступает на тактовый вход вычитател  13, на первый вход которого с выхода регистра 22 поступаетat the first input of the task of the adder-subtractor 5 mode, while the pulse | is fed to the clock input of the subtractor 13, to the first input of which from the output of the register 22 enters

предыдущее -значение кода А(М;), на второй вход - текущее значение кода А(М;+, ) .the previous is the value of code A (M;); to the second input, the current value of code A (M; +,).

По тактовому импульсу осуществл етс  формирование кода числа М;,,The clock pulse is used to form the code of the number M;

м, - дм - 2 ..;-: m - dm - 2 ..; -:

22

22

22

Импульс , задержанный элементом 15 задержки на врем  срабатывани  вычитател  13, открывает элемент И 17 и одновременно через элемент ИЛИ 20 поступает на тактовый вход регистра 22, благодар  чему с выхода вычитател  13 считываетс  полученное значение кода АС ,, ) и записываетс  в регистр 22.The pulse delayed by the delay element 15 at the response time of the subtractor 13 opens the element AND 17 and simultaneously through the element OR 20 enters the clock input of the register 22, whereby the output of the AC code is read from the output of the subtractor 13 and written to the register 22.

При поступлении на вход синхронизации блока 6 пам ти следующего тактового импульса 5;+, по сформированному в накапливающем сумматоре- вьгчитателе 5 коду А(М;, ) адреса- осуществл етс  считывание содержимого соответствующей  чейки пам ти блока 6 пам ти на второй вход блока 8 сравнени , в котором выполн етс  следующа  операци  сравнени .When the memory of block 6 of the next clock pulse 5; + arrives at the synchronization input, the code A (M ;,) formed in the accumulating adder 5 of the address 5 reads the contents of the corresponding memory cell of the memory 6 to the second input of block 8 comparison, in which the following comparison operation is performed.

Если А( ;) О, то сигнал логической единицы формируетс  на первом выходе блока 8 сравнени .If A (;) O, then a logical unit signal is generated at the first output of the comparison unit 8.

Формирование в сумматоре-вычитате- ле 5 следую1цего отрезка гистограммы осуществл етс  аналогично первому случаю, но при этом код числа ;,., формируетс  в сумматоре 14.The formation in the adder-subtractor 5 of the next segment of the histogram is carried out similarly to the first case, but the code of the number;,., Is formed in the adder 14.

МM

+ ЛМ   + LM

3. . 3..

Дальнейший поиск случайного числа осуществл етс  аналогично.Further search for a random number is carried out similarly.

При по влении на выходе счетчика 3 импульса переполнени  заканчиваетс  процесс поиска случайного числа: импульс через открытый по второму входу элемент И 11 поступает на второй вход элемента И 12, разреша  считывание кода А(М ,, Q с выхода сумматора-вычитател  на выход устройства.When the overflow pulse appears at the output of the counter 3, the search for a random number ends: the pulse through the element 11 11 opened at the second input arrives at the second input of the element 12 allowing the reading of code A (M ,, Q from the output of the subtractor to the output of the device).

Одновременно импульс | поступает через элемент ИЛИ 10 на вход генератора 7 псевдослучайных чисел и устанавливает в нем следующее случайное число Q, а сумматор-вычи- татель 5 устанавливает в начальное состо ние.Таким образом, обеспечиваетс  Hefiojiijiiioe количество шагов Simultaneously impulse | enters through the element OR 10 to the input of the generator 7 pseudo-random numbers and sets the next random number Q in it, and the adder-calculator 5 sets it to the initial state. Thus, Hefiojiijiiioe provides the number of steps

6887668876

тактов К дл  формировани  каждого случайного числа.ticks K to form each random number.

Claims (1)

Формула изобретени  5Claim 5 Генератор случайных чисел, содержащий первый блок пам ти, rtJHcpa- тор псевдослучайных чисел, блок сравнени  , первый и второй элементы ИЛИ,A random number generator containing the first memory block, the rtJHcpor of pseudo-random numbers, the comparison block, the first and second elements OR, Q генератор тактовых импульсов, выход которого через переключатель соединен с счетным входом счетч11ка, первый вход первого элемента ИЛИ  вл етс  входом начальной установкиQ clock generator, the output of which through the switch is connected to the counting input of the counter, the first input of the first element OR is the input of the initial setup 15 генератора, выход первого элемента ИЛИ соединен с входом Запуск генератора псевдослучайных чисел, выход которого соединен с первым информационным- входом блока сравнени , вто20 рой информационный вход которого15 of the generator, the output of the first element OR is connected to the input. The start of the pseudo-random number generator, the output of which is connected to the first information - the input of the comparison unit, the second information input of which соединен с выходом первого блока пам ти , отличающийс  тем, что, с целью повьппени  быстродействи , в него введены элемент И, блокconnected to the output of the first memory block, characterized in that, in order to improve speed, an AND element is entered into it 25 элементов И, второй блок пам ти и накапливающий сумматор-вычитатель, при этом выходы Больще и Меньше блока сравнени  соединены соответственно с первым и вторым вхо30 дами задани  режима накапливающего сумматора-вычитатед  выходы Больше и Меньше блока сравнени  соединены соответственно с первым и вторым входами второго элемента ИЛИ, выход которого подключен к входу синхронизации второго блока пам ти и к первому входу первого элемента И, выход которого подключен к второму входу первого элемента ИЛИ,выходThe 25 And elements, the second memory block and the accumulating adder-subtractor, while the outputs More and Less than the comparison unit are connected respectively to the first and second inputs of the accumulating adder-read mode, outputs More and Less than the comparison unit are connected respectively to the first and second inputs of the second the OR element, the output of which is connected to the synchronization input of the second memory unit and to the first input of the first AND element, the output of which is connected to the second input of the first OR element, output Q которого соединен с входом начальной установки накапливающего сумматора- вычитател  , выход которого соединен с адресным входом первого блока пам ти , вход синхронизации которогоQ of which is connected to the input of the initial installation of the accumulating adder-subtractor, the output of which is connected to the address input of the first memory block, the synchronization input of which g соединен с входом синхронизации блока сравнени  и подключен к счетному входу счетчика, выход переполнени  которого соедине н с вторым входом элемента И, выход которого соедиgQ нен с первым входом блока элементов И, выход которого  вл етс  выходом генератора случайных чисел, второй вход блока элементов И соединен с выходом сумматора-вычитател , выходg is connected to the synchronization input of the comparison unit and connected to the counter input of the counter, the overflow output of which is connected to the second input of the element AND whose output is connected to the first input of the block of elements AND whose output is the output of the random number generator connected to the output of the adder-subtractor output 55 счетчика подключен к адресному входу второго блока пам ти.A counter 55 is connected to the address input of the second memory block. 3535 0Ь/Ж.0Ь / Ж. ЛL фиеЛfieL Фиг,гFIG, g ( Начало 3(Start 3 i:D.i: d.
SU864099508A 1986-07-28 1986-07-28 Random number generator SU1368876A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU864099508A SU1368876A1 (en) 1986-07-28 1986-07-28 Random number generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU864099508A SU1368876A1 (en) 1986-07-28 1986-07-28 Random number generator

Publications (1)

Publication Number Publication Date
SU1368876A1 true SU1368876A1 (en) 1988-01-23

Family

ID=21249737

Family Applications (1)

Application Number Title Priority Date Filing Date
SU864099508A SU1368876A1 (en) 1986-07-28 1986-07-28 Random number generator

Country Status (1)

Country Link
SU (1) SU1368876A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР 1124294, кл. G 06 F 7/58, 1983. Авторское свидетельство СССР № 1256043, кл. G 06 F 15/20, 1985. *

Similar Documents

Publication Publication Date Title
SU1368876A1 (en) Random number generator
SU681428A1 (en) Device for selecting minimum number
SU402874A1 (en) DEVICE FOR PROCESSING OF STATISTICAL INFORMATION
SU1166105A1 (en) Device for calculating value of sum of two squared values in unit-counting code
RU2102788C1 (en) Situation control device
SU1580401A1 (en) Device for shaping tracks
SU1387004A2 (en) N-sensors-to-computer interface
SU1488825A1 (en) Unit for exhaustive search of combinations
SU1716507A1 (en) Generator of random numbers
SU739527A1 (en) Device for orderly sampling of parameter values
SU440795A1 (en) Reversible binary counter
SU1195428A1 (en) Device for generating pulse trains
SU1278811A1 (en) Situation control device
SU1288726A2 (en) Device for restoring continuous functions from discrete readings
SU1117645A1 (en) Device for studying transport system model
SU1124285A1 (en) Random arrival generator
SU1661788A1 (en) Digital communication channel simulator
SU881736A1 (en) Device for retrieval of numbers in a given interval
SU1758653A1 (en) Device for separating effective solutions
SU842810A1 (en) Binary frequency divider
SU1027724A1 (en) Random event generator
SU1056190A1 (en) Device for determining difference of two numbers
SU1562966A1 (en) Device for selection of asynchronous signals on basis of criterion "m out of n"
SU1092494A2 (en) Device for sorting numbers
SU1285472A1 (en) Device for selecting group requests in computer system