SU478298A1 - Random number generator with a given distribution law - Google Patents

Random number generator with a given distribution law

Info

Publication number
SU478298A1
SU478298A1 SU1972343A SU1972343A SU478298A1 SU 478298 A1 SU478298 A1 SU 478298A1 SU 1972343 A SU1972343 A SU 1972343A SU 1972343 A SU1972343 A SU 1972343A SU 478298 A1 SU478298 A1 SU 478298A1
Authority
SU
USSR - Soviet Union
Prior art keywords
outputs
inputs
output
input
elements
Prior art date
Application number
SU1972343A
Other languages
Russian (ru)
Inventor
Геннадий Александрович Велигурский
Анатолий Иосифович Гуринович
Original Assignee
Институт Проблем Надежности И Долговечности Машин Ан Белорусской Сср
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 Институт Проблем Надежности И Долговечности Машин Ан Белорусской Сср filed Critical Институт Проблем Надежности И Долговечности Машин Ан Белорусской Сср
Priority to SU1972343A priority Critical patent/SU478298A1/en
Application granted granted Critical
Publication of SU478298A1 publication Critical patent/SU478298A1/en

Links

Landscapes

  • Complex Calculations (AREA)

Description

j Изобретение относитс  к вычислительной технике и может быть использовано при исследовани х с помощью метода ста- тистического .моделировани . ;.... Известен управл емый, датчик случайны чисел с заданным законом распределени , содержаитй датчик равномерно распределен ных случайных чисел, многоступенчатый дешифратор, входы которого соединены с выходами датчика равномерно распределенных случайных чисел, соответственно, наборное поле, входы которого соединены с выходами многоступенчатого дешифратора соответственно, блок элементов входы которого подключены к выходам наборного пол  соответственно. Однако этот датчик имеет ложную схему и требует использовани  большого количества различны многозар5щных устройств. Так формирователь закона распределени  случайных чисел (устройство ввода) содержит столько запоминающих устройств, на сколько узловых jточек разбита функци  распределени . того, требуетс  такое же количество схем сравнени  и выходных устройств, например регистров. Цель изобретени  - упрошение схемы генератора случайных чисел с заданным законом распределени . Достигаетс  это благодар  тому, что генератор содержит блок элементов И-НЕ, первые входы которых соединены с выходами блока элементов ИЛИ соответственно первый элемент И, входы которого под- ключены к выходам блока , элементов И-НЕ, второй элемент И, первый .вход которого подключен к входу Ввод, а второй - к выходу первого элемента И, генератор импульсов, выход которого соединен с третьим входом второго элемента И, счетчик, счетный вход которого подключен к выходу второго элемента И, дешифратор, входы которого соединены с разр дными выходами счетчика, а выходы со вторыми входами блока элементов И-НЕ соответственно. Предлагаемый генератор случайных чисел предназначен дл  получени  к-разр дных случайных чисел, распределенных по I заданному закону, из П -разр дных равндмерно распределенных случайных чисел, - выдаваемых датчиком. Все числа датчика равномерно распределенных случайных чи сел равноверо тны. Их общее количество N 2 , а общее количество получаемых к-разр дных случайных чисел, распред елен ных- по заданному закону, . На чертеже представлена функционалына  схема предлагаемого генератора случайных чисел с заданным законом распре делени . V Выходы датчика 1 равномерно распрещеленных случайных чисел соединены с входами многоступенчатого дешифратора 2 выходы которого подключены к входам наборного пол  3 соответственно, к выходам которого подключены входы блока 4 элементов ИЛИ. Элементы ИЛИ предназначены дл  по лучени  случайных сигналов, распределенных по заданному закону, и св заны по выходу с выходным устройством 5. После нее предназначено дл  преобразовани  сиг налов, получаемых на выходах элементов 4 ИЛИ, в соответствующие числа. Вы .ходное устройство 5 содержит блок элеме тов 6 И-НЕ, первые входы каждого из которых соединены с выходами соответствующих элементов ИЛИ 4, а выходы с входами первого элемента И 7, к вы.ходу которого последовательно подключен второй элемент И 8 и счетчик 9, приче ко второму входу элемента И 8 прдклю. чен генератор 10 импульсов. Разр дные выходы счетчика 9 соединены с входами дешифратора 11, выходы которого соединены с вторыми, входами соответствующих элемешхзв И-НЕ 6. Датчик 1, счетчик 9 и схема 8 имеют выводы дл  подачи команд. Многоступенчатый дешифратор 2 обес|Печивает возможность получени  на его выходах сигналов с различными заранее известными веро тност ми их по влени  при поступлении на его вход равномерно распределенных случайных чисел. В данном дешифраторе перва  ступень образована двум  первыми разр дами датчика 1. Следовательно , веро тность по влени  сигнала на любом из четырех выходов первой ступени равна 1/4. Втора  ступень дешифра тора образована из выходов первой ступени и третьего разр да датчика 1 и имеет восемь выходов, а следовательно, вер  тность по влени  сигнала на любом выходе равна 1/8. Аналогично образуютс  : остальные ступени дешифратора с веро тност ми соответственно 1/6, 1/32 и | т. д. Если выходы дешифратора 2, имеющие веро тность по влени  сигналов P.j 2 Р , соединить с входами трехвходового J элемента ИЛИ, то веро тность по влени  сигнала на выходе денного элемента будет равна сумме веро тностей ИЛИ Р +Р„ + Р-. Подобным образом можно поX о лучать сигналы с любой заданной веро т- . ностью их по влени .j Требуемый закон распределени  случайных чисел обычно задаетс  либо графически , либо аналитически, а дл  настройки генератора необходима таблична  форма закона . .Поэтому в процессе подготовки к работе необходимо построить таблицу заданного закона распределени  случайных чисел в которой каждому случайному числу или интервалу чисел поставить в соответствие веро тность его по влени . Затем с помощью наборного пол  3 выходы дешифратора 2 с различными веро  тност ми по влени  сигнала соедин ют с входами одного из элементов ИЛИ 4, предназначенного дл  получени  определенной веро тности в соответствии с таблицей заданного закона распределени  случайных чисел. Работает предлагаемый генератор следующим образом. Кома1ща Подготовка подаетс  одновременно на счетчик 9 и на датчик 1. По этой команде счетчик 9 сбрасываетс  в исходное состо ние, а в датчике 1 формируетс  случайное число. В результате сброса счетчика 9 в исходное состо ние на первом выходе дешифратора 11 по вл етс  сигнал, а на всех остальных вьиодах -сигнала нет. По вление случайного числа на выходе датчика 1 приводит к тому, что на выходе одного из элементов ИЛИ 4 по вл етс  , а на всех остальных - О. При-, чем по вл етс  на выходе того элемента ИЛИ 4, вход которого соединен посредством наборного пол  с выходом многоступенчатого дешифратора 2, ,-.v соответствующим по5шившемус  числу датчика 1. Затем на вход элемента И 8 поступает команда ввод. Рассмотрим два случа  по влени  сигнала на выходе первого элемента ИЛИ 4 и на выходе любого другого элемента ИЛИ 4. В первом случае после выполнени  ко., манды Подготовка к обоим входам пер вого элемента И-НЕ приложены , следовательно; на его выходе будет О и | на выходе элемента 7 И так же будет О, который запрещает прохождение импульсов с генератора 10. Значит после по дачи команды ввод, счетчик 9 останетс  в исходном состо5шии, т. е. с него бу- дет сниматьс  число, соответствующее исходному состо5шию. Во втором случае на выходах элементов И-НЕ будет , поскольку хот  бы на один вход каждой ИЗ них подан О. На выходе элемента И 7 по вл етс  и после подачи команды ввод импульсы с генератора 10 пройдут через элемент И 8 на вход счетчика 9. С каждым новым импульсом сигнал 1 перемещаетс  последовательно по выходам дешифратора 11. После поступ лени  ( I -1)-го импульса сигнал по вл етс  на J, мэм выходе дешифратора 11. Следовательно, к обоим входам элемента 6 И-НЕ будут приложены что приведет к по влению на выходе элемента 7 И сигнала О, запрещающего прохождение импульсов с генератора 1О на счетчик 9. На .выходе счетчика 9 по влетс  двоичное число, соответствую- , щее сигналу на выходе элемента ИЛИ, 1 Многократное повторение описанного прОт цесса дает возможность получить случайные числа с заданным законом распределени . Выше приведено онисание работы генератора при получении малоразр дных случайных чисел. Уже при формировать веро тность дл  каждого конкретного числа не рационально, так как значительно увеличиваетс  число элементов И-НЕ и ИЛИ. В этом случае Ьесь диапазон изменени  аргумента закона распределени  раэбиваетс  на то же число М интервалов и формируютс  веро тности по влени  . cj чайных чисел в этих интервалах, а в ка- честве младших разр дов используютс  | разр ды датчика равномерно распределен- ( ных случайных чисел. Работа генератора : S случайных чисел в этом случае не мен - . етс .i -ц : i Предмет изобретени  Генератор случайных чисел с заданным; законом распределени , содержащий дат- : чик равномерно распределенных случайных чисел, многоступенчатый дешифратор, входы которого соединены с выходами датчика равномерно распределенных случайных I чисел соответственно, наборное поле, вхо- j ды которого соединены с выходами много-; ступенчатого дешифратора соответствен- j НО, блок элементов ИЛИ, входы которого подключены к выходам наборного пол  соответственного тличающийс  тем, что, с целью ут1р6щёни  схемы генератора , он содержит блок элементов ИНЕ , первые входы которых соединены с выходами блока элементов ИЛИ соответственно , первый элемент И входы которого подключены к выходам блока элементов И-НЕ, второй элемент И, первый .вход которого подключен ко входу ввод, а второй - к выходу первого элемента И, генератор импульсов, выход которого соединен с третьим входом второго элемента И , счетчик, счетный Ьход которого подключен к выходу второго элемента И, дешифратор, входы которого соединены с разр дными выходами счет. чика, а выходы - с вторыми входами блока элементов И-НЕ соответственно.j The invention relates to computing and can be used in studies using a statistical simulation method. ; .... A controlled one is known, a random number sensor with a given distribution law, containing a sensor of uniformly distributed random numbers, a multi-stage decoder, the inputs of which are connected to the sensor outputs of uniformly distributed random numbers, respectively, a dial-up field, the inputs of which are connected to the multi-stage outputs decoder, respectively, a block of elements whose inputs are connected to the outputs of the dial floor, respectively. However, this sensor has a false scheme and requires the use of a large number of different multi-charge devices. Thus, the generator of the distribution of random numbers (input device) contains as many memory devices as the number of junction points is divided into distribution functions. In addition, the same number of comparison circuits and output devices, such as registers, are required. The purpose of the invention is to simplify the scheme of a random number generator with a given distribution law. This is achieved due to the fact that the generator contains a block of AND-NOT elements, the first inputs of which are connected to the outputs of the block of elements OR, respectively, the first element AND, the inputs of which are connected to the outputs of the block, the elements AND-NOT, the second element AND, the first input connected to the input Input, and the second to the output of the first element I, a pulse generator, the output of which is connected to the third input of the second element And, a counter, the counting input of which is connected to the output of the second element And, the decoder, the inputs of which are connected to the bit outputs mi of the counter, and the outputs with the second inputs of the block of elements AND-NOT, respectively. The proposed random number generator is designed to obtain K-bit random numbers, distributed according to a given law, from N-bit uniformly distributed random numbers, produced by the sensor. All sensor numbers of uniformly distributed random numbers are equal. Their total number is N 2, and the total number of obtained K-bit random numbers distributed according to a given law,. The drawing shows a functional diagram of the proposed random number generator with a given distribution law. V The outputs of sensor 1 of uniformly spaced random numbers are connected to the inputs of a multistage decoder 2 whose outputs are connected to the inputs of the input field 3, respectively, to the outputs of which the inputs of the block 4 of the OR elements are connected. The OR elements are designed to receive random signals distributed according to a given law, and are connected by output to the output device 5. After it is intended to convert the signals received at the outputs of the 4 OR elements into corresponding numbers. Your input device 5 contains a block of elements 6 AND-NOT, the first inputs of each of which are connected to the outputs of the corresponding elements OR 4, and the outputs to the inputs of the first element AND 7, to the output of which the second element AND 8 and the counter 9 are connected in series. , and to the second input element AND 8 prdklyu. chen generator 10 pulses. The bit outputs of the counter 9 are connected to the inputs of the decoder 11, the outputs of which are connected to the second, the inputs of the corresponding AND-NOT 6 elements. The sensor 1, the counter 9 and the circuit 8 have outputs for giving commands. The multi-stage decoder 2 ensures that signals can be obtained at its outputs with various previously known probabilities of their appearance when uniformly distributed random numbers arrive at its input. In this decoder, the first stage is formed by the first two bits of sensor 1. Therefore, the probability of a signal appearing at any of the four outputs of the first stage is 1/4. The second stage of the decoder is formed from the outputs of the first stage and the third bit of sensor 1 and has eight outputs, and therefore, the signal appearance at any output is 1/8. Similarly, the following are formed: the remaining stages of the decoder with probabilities, respectively, 1/6, 1/32 and | etc. If the outputs of the decoder 2, having a probability of occurrence of the signals Pj 2 P, are connected to the inputs of the three-input J element OR, then the probability of the appearance of the signal at the output of the bottom element will be equal to the sum of the probabilities OR P + P "+ P- . Likewise, it is possible to receive signals from any given probability. Their appearance. j The required law of distribution of random numbers is usually given either graphically or analytically, and a tabular form of the law is needed to tune the generator. Therefore, in the process of preparation for work, it is necessary to construct a table of a given law of distribution of random numbers in which each random number or interval of numbers is matched with its probability. Then, using the keypad 3, the outputs of the decoder 2 with different probabilities of signal occurrence are connected to the inputs of one of the elements OR 4, designed to obtain a certain probability in accordance with the table of the specified random number distribution law. Works the proposed generator as follows. The company Preparation is applied simultaneously to counter 9 and sensor 1. At this command, counter 9 is reset, and a random number is generated in sensor 1. As a result of resetting the counter 9 to the initial state, a signal appears at the first output of the decoder 11, and there is no signal on all other signals. The appearance of a random number at the output of sensor 1 causes the output of one of the OR 4 elements to appear, and all the others - O. At the output of that OR 4 element whose input is connected via a dial the floor with the output of the multistage decoder 2,, -. v corresponding to the corresponding number of sensor 1. Then the input command is sent to the input of the element And 8. Consider two cases of a signal at the output of the first element OR 4 and at the output of any other element OR 4. In the first case after performing a command, the Preparations for the first element of AND-NOT are applied to both inputs, therefore; on its output will be Oh and | at the output of element 7 And there will also be O, which prohibits the passage of pulses from the generator 10. Hence, after sending the command, the counter 9 will remain in its original state, i.e. the number corresponding to the original state will be removed from it. In the second case, the outputs of the AND-NOT will be, since at least one input from each of them is O. At the output of the element, And 7 appears and after the command is given, the input pulses from the generator 10 will pass through the element And 8 to the input of the counter 9. With each new pulse, the signal 1 moves sequentially along the outputs of the decoder 11. After the arrival of the (I -1) -th pulse, the signal appears at J, Meme output of the decoder 11. Therefore, AND-NOT will be applied to both inputs of element 6 The appearance of the output element 7 And the signal O, prohibiting the passage pulse from generator 1O to counter 9. On output of counter 9, there is a binary number corresponding to the signal at the output of the element OR, 1 Repeating the described process several times makes it possible to get random numbers with a given distribution law. Above is a descriptive description of the operation of the generator when receiving small random numbers. Already, forming a probability for each particular number is not rational, since the number of AND-NOT and OR elements increases significantly. In this case, the entire range of variation of the distribution law argument is equal to the same number of M intervals and the probability of occurrence is formed. cj of tea numbers in these intervals, and | sensor bits are uniformly distributed (random numbers. Generator operation: S random numbers in this case are not changed. i.c: i Subject of the invention A random number generator with a given; distribution law containing a sensor: uniformly distributed random numbers, a multi-stage decoder, the inputs of which are connected to the sensor outputs of uniformly distributed random I numbers, respectively, a dial-in field whose inputs j are connected to the outputs of the multi-; step decoder correspondingly j BUT, a block of elements OR, i Which odes are connected to the outputs of a composable floor correspondingly different in that, in order to improve the generator circuit, it contains a block of INE elements, the first inputs of which are connected to the outputs of the block of elements OR, respectively, the first element AND of which inputs are connected to the outputs of the block of AND-NOT elements, the second element And, the first input of which is connected to the input input, and the second - to the output of the first element And, the pulse generator, the output of which is connected to the third input of the second element And, the counter, the counting input of which is connected to during the second AND gate, the decoder having inputs connected to the outputs of bit dnymi account. tick, and the outputs - with the second inputs of the block of elements AND-NOT, respectively.

SU1972343A 1973-12-03 1973-12-03 Random number generator with a given distribution law SU478298A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU1972343A SU478298A1 (en) 1973-12-03 1973-12-03 Random number generator with a given distribution law

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU1972343A SU478298A1 (en) 1973-12-03 1973-12-03 Random number generator with a given distribution law

Publications (1)

Publication Number Publication Date
SU478298A1 true SU478298A1 (en) 1975-07-25

Family

ID=20568266

Family Applications (1)

Application Number Title Priority Date Filing Date
SU1972343A SU478298A1 (en) 1973-12-03 1973-12-03 Random number generator with a given distribution law

Country Status (1)

Country Link
SU (1) SU478298A1 (en)

Similar Documents

Publication Publication Date Title
US3413452A (en) Variable presetting of preset counters
JPH0211180B2 (en)
SU478298A1 (en) Random number generator with a given distribution law
US3713026A (en) Apparatus for generating pulse trains with predetermined adjacent pulse spacing
US3764790A (en) Technique for extending the frequency range of digital dividers
US6226345B1 (en) High speed clock having a programmable run length
US3337721A (en) Count by six counter
SU493902A1 (en) A device for generating a series of pulses
SU729586A1 (en) Number comparing arrangement
SU1427389A1 (en) Stochastic converter
SU1287281A1 (en) Frequency divider with fractional countdown
SU1465892A1 (en) Device for modeling programming technology
SU458831A1 (en) Device for statistical modeling of a complex work system
SU712895A1 (en) Antiemergency automatics
SU1765895A1 (en) Device for conversion of binary unitary code to complete binary code
SU451203A2 (en) Push pull binary counter
SU1670789A1 (en) Divider of pulse repetition frequency with fractional count-down ratio
SU1172004A1 (en) Controlled frequency divider
SU414603A1 (en)
SU378829A1 (en) RANDOM VALUES SENSOR
RU2024057C1 (en) Petry-net analyzer
GB785568A (en) Improvements in or relating to frequency divider circuits
SU748878A1 (en) Pulse distributor
SU1161952A1 (en) Device for calculating values of logical functions
SU1325470A1 (en) Random number generator