RU1833868C - Random numbers generator - Google Patents
Random numbers generatorInfo
- Publication number
- RU1833868C RU1833868C SU894776719A SU4776719A RU1833868C RU 1833868 C RU1833868 C RU 1833868C SU 894776719 A SU894776719 A SU 894776719A SU 4776719 A SU4776719 A SU 4776719A RU 1833868 C RU1833868 C RU 1833868C
- Authority
- RU
- Russia
- Prior art keywords
- output
- input
- inputs
- information
- key
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к вычислительной технике и предназначено дл моделировани произвольных распреде ений по нормальному закону. Цель изобретени расширение функциональных возможностей за счет моделировани произвольных эмпирических законов распределени по нормальному закону. Генератор содержит датчик равномерно распределенных случайных чисел, сумматор, вычитатель, умножитель , схемы сравнени , регистры, дешифратор, блок задани параметров распределени , синхронизатор, ключи, коммутаторы , блоки элементов задержки, элементы ИЛИ и группу элементов И. 1 ил., 1 табл.The invention relates to computer technology and is intended to simulate arbitrary distributions according to the normal law. The purpose of the invention is the expansion of functionality by modeling arbitrary empirical distribution laws in accordance with the normal law. The generator contains a uniformly distributed random number sensor, an adder, a subtractor, a multiplier, comparison circuits, registers, a decoder, a block for setting distribution parameters, a synchronizer, keys, switches, blocks of delay elements, OR elements, and a group of elements I. 1 ill., 1 table.
Description
Изобретение относитс к вычислительной технике, служит дл моделировани произвольных распределений по нормальному закону и предназначено дл использовани в цифровых устройствах в качестве приставки.The invention relates to computer technology, serves to simulate arbitrary distributions according to the normal law, and is intended for use in digital devices as a prefix.
Цель изобретени - расширение функциональных возможностей устройства за счет моделировани произвольных эмпирических законов распределени по нормальному закону.The purpose of the invention is to expand the functionality of the device by modeling arbitrary empirical distribution laws in accordance with the normal law.
Известно, что сложного вида гистограмму не всегда удаетс аппроксимировать с помощью подход щей кривой, подчин ющейс какому-либо закону распределени . Поэтому такую гистограмму целесообразно заменить взвешенной суммой нормальных закбнов распределени , то есть представить в виде зависимостиIt is known that a complex-looking histogram cannot always be approximated using a suitable curve that obeys any distribution law. Therefore, it is advisable to replace such a histogram with a weighted sum of normal distribution zabbns, i.e., present it as a dependence
f3aK(x) ЈPI fi(x),f3aK (x) Ј PI fi (x),
i 1i 1
где Pi - веро тность того, что имеет место распределение fi(x).where Pi is the probability of the distribution fi (x).
Каждое из распределений fj(x) характеризуетс -своим средним значением mxi и дисперсией Dxi. Дл разбивки произвольного закона распределени на нормальные составл ющие логичнее всего использовать простой графический способ, который заключаетс в том, что люб.ую кривую распределени (полученную на основе статистических данных) нетрудно представить в виде последовательности равнобедренных треугольников. При этом разбить таким образом, чтобы при сложении соответствующих им абсцисс получилась бы крива , как можно ближе к реальной. Треугольное распределение довольно точно замен етс нормальным законом с равной дисперсией. Известно также, что дисперси распределени по равнобедренному треуа2 гольнику с основанием 2а равна - , то естьEach of the distributions fj (x) is characterized by its mean value mxi and variance Dxi. To break down an arbitrary distribution law into normal components, it is most logical to use a simple graphical method, which consists in the fact that any distribution curve (obtained on the basis of statistical data) can be easily represented as a sequence of isosceles triangles. At the same time, split in such a way that, when the abscissa corresponding to them is added, a curve will be obtained, as close as possible to the real one. The triangular distribution is rather accurately replaced by the normal law with equal dispersion. It is also known that the dispersion of the distribution over the isosceles triangle with base 2a is -, i.e.
ёё
0000
со соwith
о°o °
оabout
0000
DxiDxi
аand
66
Gi Gi
После разложени произвольного на на нормальные составл ющие можно записать , чтоAfter decomposing an arbitrary into normal components, we can write that
тхth
mxi PI;mxi PI;
DxDx
pxi + mxi) Pi - mx ;pxi + mxi) Pi - mx;
где mxi и PI - определ ютс из графика.where mxi and PI are determined from the graph.
«"
Причем Pi гГ a Si - площадь 1-го тре ,2iSlMoreover, Pi gG a Si is the area of the 1st tray, 2iSl
угольника (Si hi ai;square (Si hi ai;
где hi, ai - высота и основание l-того треугольника ). where hi, ai is the height and base of the l-th triangle).
Следовательно, име величины mxi, Pi, Dxi и использу моделирующую зависимость (1)Therefore, having the values mxi, Pi, Dxi and using the modeling dependence (1)
x Gx У5( V«|-3)+mi;x Gx Y5 (V «| -3) + mi;
можно привести произвольный эмпирический закон распределени к нормальному. Дл случа , когда I ТГЗ, генератор представлен на чертеже.an arbitrary empirical distribution law can be reduced to normal. For the case when I TGZ, the generator is shown in the drawing.
Генератор содержит датчик 1 равномерно , распределенных случайных чисел, сумматор 2, вычитатель 3, умножитель 4, схемы 5 и 6 сравнени , регистры 7-17, дешифратор 18, синхронизатор 19, ключи 20-29, коммутаторы 30-33 коммутации, блоки 34-35 элементов задержки, элемент 36 задержки, элементы 37-41 ИЛИ, группу элементов 42- 44 И, вход 45 установки в исходное состо ние устройства, вход 46 установки в исходное состо ние синхронизатора 19, вход 47 запуска устройства, выходы 48-52 синхронизатора, вход 53 запуска синхронизатора 19, информационные выходы 54 устройства , регистры 7-15 образуют блрк задани параметров распределени .The generator contains a sensor 1 evenly distributed random numbers, an adder 2, a subtractor 3, a multiplier 4, comparison circuits 5 and 6, registers 7-17, a decoder 18, a synchronizer 19, keys 20-29, switches 30-33, blocks 34- 35 delay elements, delay element 36, elements 37-41 OR, group of elements 42-44 AND, input 45 of the installation to the initial state of the device, input 46 of the installation to the initial state of the synchronizer 19, input 47 of the start of the device, outputs 48-52 of the synchronizer , input 53 start synchronizer 19, information outputs 54 devices, registers 7-15 form a block for setting distribution parameters.
Генератор работает следующим образом .The generator operates as follows.
Вначале генератор устанавливаетс в исходное состо ние подачей сигнала на вход 45. При поступлении этого сигнала устанавливаетс в исходное состо ние синхронизатор 19, регистры 7-16, в регистр 17 заноситс код 001.First, the generator is initialized by applying a signal to input 45. Upon receipt of this signal, the synchronizer 19, registers 7-16, is reset, code 001 is entered into register 17.
После этого в регистры 7-15 занос тс коэффициенты PI (I 1,2), b, mxi (i - 1-, 3), ai (I 1., 3). Цепи занесены на фиг. 1 не показаны . Следует иметь д виду, что занос тс коэффициенты Pi и Р2 Pi + Р2Генератор готов к работе. Подачей сигнала на вход 47 оно запускаетс . Сигнал, пройд через элементы 37 ИЛИ, запускает датчик 1, поступающий на вход 53 синхронизатора 19 и запускает его, а также прохоAfter that, the coefficients PI (I 1,2), b, mxi (i - 1-, 3), ai (I 1., 3) are entered into registers 7-15. The chains are shown in FIG. 1 are not shown. It should be noted that the coefficients Pi and P2 are entered. Pi + P2. The generator is ready for operation. By applying a signal to input 47, it starts. The signal, passed through the OR elements 37, starts the sensor 1, which enters the input 53 of the synchronizer 19 and starts it, as well as
дит на вторые входы ключей 25-28, сто щих на входах схем 5 и б сравнени , и случайное число а с информационного выхода датчика 1, а также коэффициенты Pi и Рг из регистров 7 и 8 поступают соответственно на схемы 5 и 6 сравнени . Сигналы с выходов схем 5 и 6 сравнени поступают на первый и второй входы дешифратора 18. На одном из его двух выходов в соответствии с таблицейsends to the second inputs of the keys 25-28, standing at the inputs of the comparison circuits 5 and b, and the random number a from the information output of the sensor 1, as well as the coefficients Pi and Pr from the registers 7 and 8, are respectively sent to the comparison circuits 5 and 6. The signals from the outputs of the comparison circuits 5 and 6 are fed to the first and second inputs of the decoder 18. At one of its two outputs in accordance with the table
по вл етс сигнал, который фиксирует в регистре 17 один из кодов: 001, 010, 100.A signal appears that fixes one of the codes in register 17: 001, 010, 100.
Фиксаци происходит следующим образом . Если выполн ютс услови 1 (см, табл.), то на выходах дешифратора 18 сигналFixation occurs as follows. If conditions 1 are fulfilled (see table), then at the outputs of the decoder 18 the signal
отсутствует и в регистре 17 сохран етс код 001,.устанавливаемый при переводе устройства в исходное состо ние сигналом на входе 45.is absent and the code 001 is stored in register 17. It is set when the device is reset to the initial state by the signal at input 45.
Если выполн ютс услови 2, то сигналом с дешифратора 18 устанавливаетс в нуль первый разр д регистра 17 через элементы 41 ИЛИ, а во второй разр д заноситс 1, таким образом, в регистре 17 фиксируетс код 010.If conditions 2 are satisfied, then the signal from the decoder 18 is set to zero the first bit of the register 17 through the elements 41 OR, and the second bit is entered 1, thus, the code 010 is recorded in the register 17.
Аналогично при выполнении услови 3 в регистре 17 фиксируетс код 100, при этом первый разр д регистра переводитс в нуль также сигналом с другого выхода дешифратора 18 через элемент 41 ИЛИ.Similarly, when condition 3 is fulfilled, the code 100 is fixed in the register 17, while the first bit of the register is also set to zero by the signal from the other output of the decoder 18 through the OR element 41.
в результате фиксации кода в регистре 17 определ етс интервал, к которому относитс равномерно распределенное случайное число а.as a result of fixing the code in the register 17, an interval is determined to which a uniformly distributed random number a refers.
Сигналом с выхода 48 синхронизатораThe signal from the output of 48 synchronizer
19 через элемент 37 ИЛИ запускаетс датчик 1 и случайное число а и содержимое регистра 16 (в первом такте - О) подаютс на сумматор 2 через коммутаторы 32 и 33. Сумма19 through the OR element 37, the sensor 1 is started and a random number a and the contents of the register 16 (in the first cycle, O) are supplied to the adder 2 through the switches 32 and 33. The sum
Si а + ОSi a + O
задерживаетс в блоке 35 элементов задержки на врем перевода регистра 16 в нуль. По сигналу с выхода 49 синхронизатора 19 через элемент 40 ИЛИ регистр 16 устанавливаетс в О, а по сигналу с выхода 50 сумма Si с блока 35 элементов задержки заноситс через ключ 24 в регистр 16.is delayed in block 35 delay elements during the translation of the register 16 to zero. By the signal from the output 49 of the synchronizer 19 through the OR element 40, the register 16 is set to O, and by the signal from the output 50, the sum Si from the block 35 of the delay elements is entered via the key 24 into the register 16.
Далее на выходах 48, 49, 50 синхронизатора 19 вновь по вл ютс последовательно сигналы. Устройство работает аналогичным образом, в результате чего в регистре 16 образуетс суммаNext, outputs 48, 49, 50 of the synchronizer 19 again reappear in sequence. The device operates in a similar way, as a result of which a sum is generated in register 16
32 %+ Si и далее последовательно получаютс 32% + Si and further successively obtained
Зз Sa + 03; 84 Зз + «4; Ss S4 +Зз Sa + 03; 84 Зз + «4; Ss s4 +
+ «в; Se Ss + ОД .+ "In; Se Ss + OD.
После образовани Se по вл етс сигнал на выходе 51 синхронизатора 19. ПоAfter the formation of Se, a signal appears at the output 51 of the synchronizer 19. By
этому сигналу вычитателем 3 образуетс разностьa difference is formed by this subtractor 3
S Se - bS Se - b
(S и коэффициент b (b 3) поступают через ключи 22 и 23 на вычитатель 3) и также результат вычитани S и коэффициент ai через ключи 20 и 21 элементов И поступают на умножитель 4. Выборка одного из коэффициентов а осуществл етс за счет подачи кода номера (i) интервала, хран щегос в регистре 17, на коммутатор 30. Код же номера интервала выдаетс через элементов 42- 44 И группы по сигналу с выхода 51 синхронизатора 19, поступающему через элементы 38 ИЛИ на вторые входы элементов И 42-44 группы, состо щих на выходах регистра 17,(S and coefficient b (b 3) come through the keys 22 and 23 to the subtractor 3) and also the result of subtraction S and the coefficient ai through the keys 20 and 21 of the elements And go to the multiplier 4. One of the coefficients a is selected by supplying a code the number (i) of the interval stored in the register 17 to the switch 30. The code of the number of the interval is issued through the elements 42-44 AND of the group by the signal from the output 51 of the synchronizer 19 coming through the elements 38 OR to the second inputs of the elements AND 42-44 of the group consisting at the outputs of the register 17,
Результат умножени Ss S aiResult of Multiplication Ss S ai
после задержки в блоке 34 элементов задержки вместе с операндом fhxi по сигналу с выхода 52 синхронизатора 19 поступает на сумматор 2 через коммутатор 33 коммутации .after a delay in the block 34 delay elements together with the operand fhxi on a signal from the output 52 of the synchronizer 19 is fed to the adder 2 through the switch 33 switching.
Выборка одного из mxi производитс также за счет подачи кода номера (I) интервала (по сигналу с выхода 52 синхронизатора 19 на вторые входы элементов 42-44 И группы на коммутатор 31.One of the mxi is also sampled by supplying the interval number code (I) (by a signal from the output 52 of the synchronizer 19 to the second inputs of the elements 42-44 AND of the group to the switch 31.
Результат суммировани Summation Result
х Se + rhxix Se + rhxi
через ключ 29 И по сигналу также с выхода 52 синхронизации 19 выдаетс на информационные выходы 54 устройства.through the key 29 And the signal also from the output 52 of the synchronization 19 is issued to the information outputs 54 of the device.
По сигналу с выхода 52 синхронизатора 19 через элемент 40 ИЛИ регистр 16 устанавливаетс в О.сThe signal from the output 52 of the synchronizer 19 through the element 40 OR register 16 is set to O.
По сигналу с выхода элемента 36 задержки через элемент 39 ИЛИ регистр 17 устанавливаетс в состо ние Л001,Upon a signal from the output of delay element 36, through element 39 OR, register 17 is set to state L001,
При повторных обращени х работа генератора аналогична и начинаетс она подачей сигнала запуска на вход 47, так как коэффициенты в регистрах 7-15 сохран ютс , а регистры 16, 17 и синхронизатор 19 наход тс в исходном состо нии.Upon repeated calls, the operation of the generator is similar and it begins by applying a trigger signal to input 47, since the coefficients in registers 7-15 are stored, and registers 16, 17 and synchronizer 19 are in the initial state.
Таким образом, использование изобретени позвол ет расширить функциональные возможности устройства за счет моделировани произвольных распределений по нормальному закону.Thus, the use of the invention allows to expand the functionality of the device by modeling arbitrary distributions according to the normal law.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU894776719A RU1833868C (en) | 1989-11-09 | 1989-11-09 | Random numbers generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU894776719A RU1833868C (en) | 1989-11-09 | 1989-11-09 | Random numbers generator |
Publications (1)
Publication Number | Publication Date |
---|---|
RU1833868C true RU1833868C (en) | 1993-08-15 |
Family
ID=21488643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU894776719A RU1833868C (en) | 1989-11-09 | 1989-11-09 | Random numbers generator |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU1833868C (en) |
-
1989
- 1989-11-09 RU SU894776719A patent/RU1833868C/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР Ns 1012255, кл. G 06 F 7/58, 1981. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0421092A3 (en) | Method and apparatus for performing mathematical functions using polynomial approximation and a rectangular aspect ratio multiplier | |
US4135249A (en) | Signed double precision multiplication logic | |
RU1833868C (en) | Random numbers generator | |
AU596647B2 (en) | Serial digital signal processing circuitry | |
JPH04215316A (en) | Sequential finite state machine circuit and integrated circuit having such circuit | |
GB2235103A (en) | Programmable square wave generator | |
KR940004464A (en) | Pseudo-random Number Generator and Method | |
JPS58101515A (en) | Binary random number generator | |
JPS55417A (en) | Frequency comparator circuit | |
JPS57103175A (en) | Automatic music selector | |
US6144329A (en) | Apparatus and method for processing analog signals using residue-based digital operations | |
JPS5585933A (en) | Interruption signal generating circuit | |
SU1691839A2 (en) | Generator of pseudorandom numbers | |
SU1210209A2 (en) | Pseudorandom pulse sequence generator | |
SU1267420A1 (en) | Device for checking electronic units | |
SU1185583A1 (en) | Pseudorandom non-stationary pulse sequence generator | |
SU1267410A1 (en) | Generator of arrival of random events | |
SU809200A1 (en) | Device for function regeneration reproduction | |
JPS63132532A (en) | Polynomial dividing circuit for extended galois field | |
JPS5650445A (en) | Data check device | |
SU851749A1 (en) | Controllable code number generator | |
SU1672445A1 (en) | Equally distributed random numbers generator | |
SU1192121A1 (en) | Pseudorandom number generator | |
SU1125621A1 (en) | Translator from binary system to residual class system | |
SU552624A1 (en) | Analog-to-digital functional converter |