SU1397907A1 - Random number generator - Google Patents
Random number generator Download PDFInfo
- Publication number
- SU1397907A1 SU1397907A1 SU864149087A SU4149087A SU1397907A1 SU 1397907 A1 SU1397907 A1 SU 1397907A1 SU 864149087 A SU864149087 A SU 864149087A SU 4149087 A SU4149087 A SU 4149087A SU 1397907 A1 SU1397907 A1 SU 1397907A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- output
- input
- inputs
- keys
- key
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к вычислительной технике и может быть не- . пользовано дл получени чисел с заданным законом распределени на основе реализации метода обратных функций в сочетании с одним из классов операторных р дов (р ды С.Ли). Цель изобретени - расширение функциональных возможностей за счет формировани случайных чисел с законами распредеThe invention relates to computing and may be non-. used to obtain numbers with a given distribution law based on the implementation of the inverse function method in combination with one of the classes of operator series (S.Li series). The purpose of the invention is to expand the functionality by forming random numbers with the distribution laws.
Description
i lO)i lO)
соwith
CD CD
i;oi; o
лени , содержащими нормировочные множители, и повышение быстродействи и надежности. Генератор случайны чисел содержит генератор 1 тактовых импульсов, датчик равномерно распределенных случайных чисел, регистр 2 пам ти, вычитатель 4, квадратор 5, умножители 7-9, блок 6 возведени в куб, сумматор 10, регистр 11 пам ти , триггеры 12,13, формирователиlaziness, containing normalization factors, and improving speed and reliability. The random number generator contains a generator of 1 clock pulses, a sensor of uniformly distributed random numbers, a memory register 2, a subtractor 4, a quad 5, multipliers 7–9, a cubing block 6, an adder 10, a memory register 11, triggers 12.13, shapers
1one
Изобретение относитс к вычислительной технике и может быть использовано дл получени случайных чисел с заданным законом распределени на основе реализации метода обратных функций в сочетании с одним из классов операторных р дов (р ды С.Ли).The invention relates to computer technology and can be used to obtain random numbers with a given distribution law based on the implementation of the inverse function method in combination with one of the classes of operator series (S. Li series).
Цель изобретени - расширение функциональных возможностей за счет формировани случайных чисел с законами распределени , содержащими нормировочные множители, и повышение быстродействи и надежности.The purpose of the invention is to enhance the functionality by generating random numbers with distribution laws containing normalization factors, and improving speed and reliability.
На чертеже приведена функциональна схема ге.нератора.The drawing shows the functional scheme ge.
Генератор случайных чисел содержи генератор 1 тактовых импульсов, регистр 2 пам ти, датчик 3 равномерно распределенных случайных чисел, вычитатель 4, квадратор 5, блок 6 возведени в куб, умножители 7-9, сумматор 10, регистр 11 пам ти, триггеры 12 и 13, формирователи 14 и 15 импульсов, элементы И 16-18, элемент ИЛИ 19, ключи 20-33, регистры 34-36 пам ти, линию 37 задержки, вход 38 Опрос и выход 39.Random number generator contains 1 clock pulse generator, memory register 2, uniformly distributed random number sensor 3, subtractor 4, quad 5, cube raising unit 6, multipliers 7-9, adder 10, memory register 11, triggers 12 and 13 , shapers 14 and 15 pulses, elements AND 16-18, element OR 19, keys 20-33, memory registers 34-36, delay line 37, input 38 Poll and output 39.
Работа генератора происходит в два этапа: первьй этап - подготовительный , второй этап - основной. При подготовительном этапе генератор рассчитывает нормировочные множители, перемножает их на коэффициенты операторного р да D, D, Dj и записывает результаты в регистры 34-36. При основном этапе схема генератора настраиваетс на реализацию случайных чисел с заданным законом распределени .The generator works in two stages: the first stage is the preparatory stage, the second stage is the main stage. At the preparatory stage, the generator calculates the normalization factors, multiplies them by the coefficients of the operator series D, D, Dj and writes the results into registers 34-36. At the main stage, the generator circuit is configured to implement random numbers with a given distribution law.
Работу генератора рассмотрим на примере реализации случайных чисел сThe generator will consider the example of the implementation of random numbers with
14 15 импульсов, элементы И 16-18, регистры 34-36 пам ти, элемент, ИЛИ 19, линию 37 задержки, ключи 20-33. вл етс введение дополнительных блоков, организаци св зей между элементами, исключение электромеханических устройств, применение параллельного структурного способа вычислени на основном этапе работы генератора . 1 ил.14 15 pulses, elements AND 16-18, memory registers 34-36, element, OR 19, delay line 37, keys 20-33. is the introduction of additional units, the organization of links between elements, the elimination of electromechanical devices, the use of a parallel structural method of calculation at the main stage of the generator. 1 il.
5five
00
5five
00
5five
00
законом гамма-распределени . На подготовительном этапе в начальном состо нии триггеры 12 и 13 обнулены. С инверсных выходов этих триггеров сигналы поступают на элемент ИЛИ 19, с выхода которого снимаетс сигнал на управл ющий вход ключа 20. При включении генератора 1 тактовых импульсов происходит подача первого управл ющего импульса через ключ 20 на счетный вход триггера 12, под воздействием которого триггер 12 переходит в единичное состо ние. Сигналы с пр мого выхода триггера 12 и инверсного выхода триггера 13 поступают на входы элемента И 18, с выхода которого формируетс сигнал управлени , постуг пающий на третий вход регистра 2 пам ти . Под действием этого сигнала с второго, четвертого, шестого, седьмого и дев того выходов регистра 2 пам ти посто нные коэффициенты (заранее расчитанные и введенные в регистр 2 в соответствии с требуемым законом распределени ) поступают в определенные блоки: К, - в умножитель 7, К - в умножитель 8, Kj - в умножитель 9, а - в умножитель 7, квадратор 5 и блок 6 возведени в куб, К , - в сумматор 10. Одновременно с этим с пр мого выхода триггера 12 поступает сигнал на управл ющие входы ключей 27-29. Тем самым готовитс схема генератораgamma distribution law. At the preparatory stage, in the initial state, the triggers 12 and 13 are reset. From the inverse outputs of these triggers, the signals arrive at the element OR 19, the output of which removes the signal to the control input of the switch 20. When the clock pulse 1 is turned on, the first control pulse is fed through the switch 20 to the counting input of the trigger 12, under the influence of which the trigger 12 goes into a single state. The signals from the direct output of the trigger 12 and the inverse output of the trigger 13 are fed to the inputs of the element 18, from the output of which a control signal is generated, which is frightened at the third input of the memory register 2. Under the action of this signal from the second, fourth, sixth, seventh and ninth outputs of register 2 of memory, constant coefficients (calculated in advance and entered into register 2 in accordance with the required distribution law) are transferred into certain blocks: K, - to multiplier 7, K - to multiplier 8, Kj - to multiplier 9, and - to multiplier 7, quadrant 5 and cube block 6, K, to adder 10. At the same time, from the direct output of trigger 12, a signal goes to the control inputs of keys 27-29. This prepares the generator circuit.
дл расчета гамма-функции F (а). Ре2 л to calculate the gamma function f (a). Pe2 l
зультаты а и а с выходов квадратора 5 и блока 6 возведени в куб соответственно поступают в умножители 8 и 9. Результаты К,а, и Kja с выходов умножителей 7, 8 и 9 соответственно через ключи 27, 28 и 29 поступают в сумматор 10, где происThe results a and a from the outputs of the quad 5 and block 6 of the cube, respectively, are fed into the multipliers 8 and 9. The results K, a, and Kja from the outputs of the multipliers 7, 8 and 9, respectively, through the keys 27, 28 and 29 go to the adder 10, where did
ходит их суммирование между собой и с коэс)фИ11 1ентом К,. Сумма четырех слгаемых записываетс в выходном регистре сумматора 10.their summation between themselves and with the coeff The sum of the four slogans is recorded in the output register of the adder 10.
При поступлении с генератора 1 тактовых и myльcoв второго управл ющего импульса на счетный вход триггера 12 происходит перевод триггераWhen a second control pulse arrives from the generator 1 clock and mylc to the counting input of the trigger 12, the trigger is transferred
12в нулевое состо ние, а триггера12 in the zero state, and the trigger
13- в единичное состо ние. При тако состо нии триггеров 12 и 13 исчезает сигнал с выхода элемента И 18, остаетс сигнал на выходе элемента ИЛИ13- to one state. In this state of the triggers 12 and 13, the signal from the output of the element And 18 disappears, the signal remains at the output of the element OR
19 и формируетс сигнал на выходе элемента И 16, который поступает на второй вход регистра 2 пам ти, на управл ющие входы ключей 23, 30-32 и на вход формировател 15 и myльcoв (последний форЬ Шрует импульсы по переднему фронту управл ющих СИГНсШОВ,19 and a signal is generated at the output of the AND element 16, which is fed to the second input of the register 2 of the memory, to the control inputs of the keys 23, 30-32 and to the input of the imaging unit 15 and mycov (the last form sends pulses on the leading edge of the control SIGNALS,
а формирователь 14 импульсов - по заднему фронту сигнала, снимаемого с пр мого выхода триггера 12). Схема генератора настраиваетс на перемножение нормировочного коэффициента с коэффициентами операторного р да D, , D и D. В этом состо нии ключей происходит подача результата с выходного регистра сумматора 10 через ключ 23 на умножитель 7, квадратор 5 и блок 6 возведени в куб. Результаты Г(а) и Г(а) с квадратора 5 и блока 6 возведени в куб соответственно поступают на первые входы умножителей 8 и 9, на вторые входы которых под действием управл ющего сигнала , поступающего с элемента И 16 на второй вход регистра 2 пам ти, поступают коэффициенты D и D с п тог и восьмого выходов регистра 2 пам ти а также коэффициент D, с третьего выхода регистра 2 пам ти поступает на умнолмтель 7. Результаты r(a)D, Cr(a), и Г(а)3 0з с выходов умножителей 7, 8 и 9 соответственно через ключи 30, 31 и 32 поступают на регистры 36, 35 и 34, где происходит их запоминание. Одновременно с этим формируетс сигнал обнулени сумматора 10 по цепи формирователь 15 импульсов - лини 37 задержки - вход Сброс сумматора 10.and the driver of 14 pulses - on the trailing edge of the signal taken from the direct output of the trigger 12). The generator circuit is tuned to multiply the normalization factor with the operator row coefficients D,, D, and D. In this key condition, the result is fed from the output register of the adder 10 via key 23 to multiplier 7, quadrant 5 and block 6 of cubing. The results of G (a) and G (a) from the quad 5 and cube-building block 6, respectively, go to the first inputs of multipliers 8 and 9, to the second inputs of which, under the action of a control signal coming from element 16, to the second input of register 2 t, the coefficients D and D come from the ramp and the eighth outputs of memory register 2 as well as the coefficient D, from the third output of memory register 2 goes to the multiplexer 7. The results are r (a) D, Cr (a), and g (a ) 3 0з from the outputs of multipliers 7, 8 and 9, respectively, via keys 30, 31 and 32 are sent to registers 36, 35 and 34, where they are stored a. At the same time, a signal is generated to reset the adder 10 along the circuit driver of 15 pulses — delay line 37 — input Reset of the adder 10.
При поступлении третьего управл ющего импульса происходит перевод схемы генератора на реализацию случайных чисел с законом гамма-распределени . В этом случае триггеры 12 и 13 наход тс в единичном состо нииWhen the third control pulse arrives, the generator circuit is transferred to the realization of random numbers with the gamma distribution law. In this case, triggers 12 and 13 are in a single state.
00
5five
5five
Q Q
00
5five
5five
00
5five
Исчезает сигнал с выхода элемента ИЛИ 19, тем самым отключаетс цепь подачи управл ющих сигналов с генератора 1 через ключ 20 на счетный вход триггера 12. Одновременно с этим исчезает сигнал с выхода элемента И 16 и формируетс сигнал на выходе элемента И 17, который поступает на управл ющие входы ключей 21, 22 к 33 Подготовительньй этап окончен.The signal from the output of the element OR 19 disappears, thereby disconnecting the control signal supply circuit from generator 1 through the switch 20 to the counting input of trigger 12. At the same time, the signal from the output of the AND 16 element disappears and the output signal of the AND 17 element is generated, which goes to control inputs of keys 21, 22 to 33 The preparatory stage is over.
В дальнейшем схема генератора работает следующим образом. При формировании генератором 1 тактовых импульсов четвертого управл ющего импульса происходит его подача через ключ 21 на датчик 3 случайных чисел, который вьдает первое равномерное распределение в интервале О, 1 число d на вычитатель 4.In the future, the generator circuit works as follows. When the fourth control pulse is generated by the generator 1 of clock pulses, it is fed through the key 21 to the sensor 3 of random numbers, which appears the first uniform distribution in the interval O, 1 is the number d to the subtractor 4.
Одновременно этот управл ющий импульс воздействует на управл ющие входы ключей 24-26 и на первый вход регистра 2 пам ти, с первого и дес того выходов которого посто нные коэффициенты F(XU) и XQ поступают соответственно в вьгштатель 4 и сумматор 10.At the same time, this control pulse acts on the control inputs of keys 24-26 and on the first input of register 2 of memory, from the first and ten outputs of which the constant coefficients F (XU) and XQ go to indicator 4 and adder 10, respectively.
В квадраторе 5 и блоке 6 возведени в куб происходит возведение соответственно в степени два и три разности i/-F(X(j), снимаемой с вычита-- тел 4 через ключ 22. Кроме того, разность (XO) с выхода вычитате- л 4 через ключ 22 поступают в умножитель 7.In quad 5 and block 6, the cube takes place, respectively, to the power of two and three differences i / -F (X (j), removed from the subtraction of bodies 4 through the key 22. In addition, the difference (XO) from the output of the subtract l 4 through the key 22 are received in the multiplier 7.
В умножител х 7-9 происходит перемножение результатов вычитател 4, квадратора 5 и блока 6 возведени в куб на результаты соответственно регистров 36, 35 и 34, которые поступают на входы умножителей 7-9 через ключи 24-26 с регистров 36, 35 и 34. Результаты с блоков 7-9 поступают через ключи 27-29, управл ющие входы которых наход тс под воздействие сигнала, снимаемого с пр мого выхода триггера 12, на сумматор 10, где происходит суммирование четырех чисел.In the multiplier 7-9, the multiplier results of the subtractor 4, quadrant 5 and cube-building block 6 are multiplied by the results of registers 36, 35 and 34, which are fed to the inputs of multipliers 7-9 via keys 24-26 from registers 36, 35 and 34 The results from blocks 7-9 come through the keys 27-29, the control inputs of which are influenced by the signal taken from the direct output of the trigger 12 to the adder 10, where the four numbers are summed.
Сумма Xo+U-FCxo)r(a)Di+ro - -F(xo)4r(a)4D,(x,)(a)Dj поступает через ключ 33 в регистр 11 пам ти. После регистрации первого случайного числа по закону гамма- распределени с управл ющего вь1хода регистра 11 пам ти поступает сигнал через линию 37 задержки на вход Сброс сумматора 10, Под действиемThe sum Xo + U-FCxo) r (a) Di + ro - −F (xo) 4r (a) 4D, (x,) (a) Dj is fed through the key 33 into memory register 11. After the registration of the first random number according to the gamma distribution law, the control signal from register 11 of the memory receives a signal through the input delay line 37 Reset of the adder 10, Under the action of
этого сигнала происходит обнуле1гае регистров сумматора 10,This signal is zeroed out the registers of the adder 10,
С поступлением п того управл ющег импульса процесс повтор етс по при- веде;- ной схеме четвертого управл ющего импульса. Таким образом, в результате действи последующих управл ющих и тульсов в регистре 11 пам ти формируютс случайные числа по закону гамма-распределени . При замене коэффициентов в блоке 2 пам ти необходимо триггеры 12 и 13 привести в нулевое состо ние путем подачи управл ющего импульса на вход 38, With the arrival of the fifth control pulse, the process is repeated in the drive circuit of the fourth control pulse. Thus, as a result of subsequent control and pulses, random numbers are formed in memory register 11 according to the gamma distribution law. When replacing the coefficients in memory block 2, the triggers 12 and 13 must be brought to the zero state by applying a control pulse to the input 38,
При моделировании законов распределени , в которых отсутствуют нормировочные множители, необходимо в регистр 2 пам ти ввести следующие коэффициенты: F(X(,), Хд , D,, Do, 1)3, К,К и . В этом случае на подготовительном этапе в регистра 36, 35 и 34 записываютс коэффициенты D, D и БЗ соответственно. В дальнейшем предлагаемьй генератор реали- зует такие же законы распределени , как и известньш.When modeling the distribution laws in which there are no normalization factors, it is necessary to enter the following coefficients in memory register 2: F (X (,), Xd, D ,, Do, 1) 3, K, K, and. In this case, at the preparatory stage, the coefficients D, D and BZ are recorded in register 36, 35 and 34, respectively. In the future, the generator implements the same distribution laws as the known one.
Регистры ЗД-Зб пам ти синхронизируютс сигналом с выхода элемента И 16.The memory backup registers are synchronized by the signal from the output of the AND 16 element.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864149087A SU1397907A1 (en) | 1986-11-17 | 1986-11-17 | Random number generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864149087A SU1397907A1 (en) | 1986-11-17 | 1986-11-17 | Random number generator |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1397907A1 true SU1397907A1 (en) | 1988-06-15 |
Family
ID=21268256
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU864149087A SU1397907A1 (en) | 1986-11-17 | 1986-11-17 | Random number generator |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1397907A1 (en) |
-
1986
- 1986-11-17 SU SU864149087A patent/SU1397907A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 401985, кл. С 06 F 7/58, 1971. Авторское свидетельство СССР № 1099319, кл. G 06 F 7/58, 1984. 58 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4692888A (en) | Method and apparatus for generating and summing the products of pairs of numbers | |
SU1397907A1 (en) | Random number generator | |
JPS54159831A (en) | Adder and subtractor for numbers different in data length using counter circuit | |
SU744555A1 (en) | Device for computing walsh conversion coefficients | |
SU1363199A1 (en) | Random-number generator | |
SU1605254A1 (en) | Device for performing fast walsh-adamar transform | |
SU1444817A1 (en) | Device for computing walsh coefficients | |
SU1264200A1 (en) | Digital correlator | |
SU1751748A1 (en) | Complex number multiplying device | |
SU408338A1 (en) | MULTICHANNEL CORRELATOR | |
SU608157A1 (en) | Multiplier | |
SU1562904A1 (en) | Device for multiplying by coefficients | |
SU1363248A1 (en) | Digital filtration device | |
SU855963A2 (en) | Clock pulse generator | |
SU1569827A1 (en) | Device for exbtraction of square root | |
SU1385128A1 (en) | Frequency-pulsed signal adder | |
SU1187176A1 (en) | Device for impementing fast haar transform | |
SU1352482A1 (en) | Frequency multiplier | |
SU1517026A1 (en) | Dividing device | |
SU1531105A1 (en) | Device for modeling queuing systems | |
SU1166104A1 (en) | Device for calculating values of sine-cosine dependensies | |
SU1236497A1 (en) | Device for generating elements of multiplicative groups of galois fields of gf(p) | |
SU1688259A1 (en) | Device foe convolution calculating | |
SU1185339A1 (en) | Device for calculating residues of number to two arbitrary moduli | |
SU1569823A1 (en) | Multiplying device |