SU960812A1 - Controllable random number generator - Google Patents

Controllable random number generator Download PDF

Info

Publication number
SU960812A1
SU960812A1 SU813253046A SU3253046A SU960812A1 SU 960812 A1 SU960812 A1 SU 960812A1 SU 813253046 A SU813253046 A SU 813253046A SU 3253046 A SU3253046 A SU 3253046A SU 960812 A1 SU960812 A1 SU 960812A1
Authority
SU
USSR - Soviet Union
Prior art keywords
output
generator
block
inputs
input
Prior art date
Application number
SU813253046A
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 SU813253046A priority Critical patent/SU960812A1/en
Application granted granted Critical
Publication of SU960812A1 publication Critical patent/SU960812A1/en

Links

Description

(54) УПРАВЛЯЕМЫЙ ГЕНЕРАТОР СЛУЧАЙНЫХ ЧИСЕЛ(54) CONTROLLED GENERATOR OF RANDOM NUMBERS

Изобретение относитс  к вычислительной технике и может найти применение при статистическом моделировании в цифровых вычислительных машинах.The invention relates to computing and can be used in statistical modeling in digital computers.

Р-зЕестен управл емый генератор случайных чисел, содержащий датчик равномерно распределенных случайньж чисел, запоминающее устройствоi схемы параллельного сравнени  чисел , триггеры, схемы совпадени , выходное устройство и позвол ющий получать случайные числа с заданным законом распределени  за один такт работы датчика. |l .The P-ZESTEN controlled random number generator contains a sensor of uniformly distributed random numbers, a memory device of a parallel comparison circuit, triggers, coincidence circuits, an output device and allowing to obtain random numbers with a given distribution law for one sensor cycle. | l.

Однако устройство имеет высокую сложность.However, the device has a high complexity.

Известен также генератор, содержащий генератор равномерно распределенных случайных чисел, схему сравнени , запоминающее устройство, блок логарифмического перебора, генератор тактовых импульсов 2j.A generator is also known that contains a generator of uniformly distributed random numbers, a comparison circuit, a memory, a logarithmic block, a clock pulse generator 2j.

Недостатком устройства  вл етс  низкое быстродействие, так как т-разр дное с.т1учайное число форми-. руетс  за vm+1) такт.The disadvantage of the device is its low speed, since the t-bit ct is a unique number. Ruetz vm + 1) time.

Наиболее близким т ехническим решением к изобретению  вл етс  генератор случайных чисел, сЬдержащий генератор тактовых импульсов, генератор равномерно распределенных случайных чисел, вход которого соединен с первым выходом генератора тактовых импульсов, запоминающее устройство, схему сравнени , перва  и втора  группы входов которой подключены к выходам запоминающего устройства и генератора рав10 номерно распределенных случайных чисел соответственно, первую и вторую группы элементов И, дешифратор, регис.тр, выходы которого через дешифратор соединены с первой группой The closest technical solution to the invention is a random number generator, a holding clock generator, a generator of uniformly distributed random numbers, the input of which is connected to the first output of the clock generator, a memory device, the comparison circuit, the first and second groups of inputs of which are connected to the outputs of the memory devices and a generator of uniformly distributed random numbers, respectively, the first and second groups of elements AND, the decoder, the registration table, whose outputs are decoder connected with the first group

15 входов запоминающего устройства, второй вход запоминающего устройства подключен к nepEioMy выходу г.енератора тактовых импульсов, входы регистра соединены с выходами первой груп20 пы элементов И, ; лерва  и втора  группы входов которой подключены к выходам схемы сравнени  и генератора тактовых импульсов соответственно , выходы регистра через вторую 15 memory inputs, the second memory input is connected to the nepEioMy output of the clock generator, the register inputs are connected to the outputs of the first group of elements And; the first and second groups of inputs of which are connected to the outputs of the comparison circuit and the clock pulse generator, respectively, the register outputs through the second

25 группу элементов И соединены с выходом устройства, выход генератора тактовых импульсов подключен к второй группе входов второй группы элементов И. В генераторе дл  получени  25, the group of elements I is connected to the output of the device, the output of the generator of clock pulses is connected to the second group of inputs of the second group of elements I. In the generator to obtain

30 последовательности случайных чисел30 sequences of random numbers

с заданньП законом распределени  примен етс  функциональное преобразование , основанное на кусочно-линейной аппроксимации заданного распределени  F(x) ГЗ.with a given distribution law, a functional transformation is applied based on a piecewise linear approximation of a given distribution F (x) GZ.

Однако иззестний генератор име-ет низкую точность, поскольку область возможных значений аргумента х разбиваетс  на п равных интерзалов,However, the known generator has a low accuracy, since the range of possible values of the argument x is divided into n equal intervals,

Целью изобретени   вл етс  повышение точности всспроиэнедени  распределени  F(x) за счет разбиени  области значений аргумента х на л неравных интервалов„The aim of the invention is to improve the accuracy of the distribution of F (x) by dividing the range of values of the argument x into l unequal intervals.

Поставленна  цель достигаетс  тем что в управл емый генератор случайны чисел, содержащий генератор тактовыу: импульсов, блок пам ти, первый дешифратор, первый регистр пам ти, выход которого через первый дешифратор соединен с первым нходом блока пам ти, блок сравнени , первый и второй блоки элементов И, генератор равномерно распределенных чисел, группа выходов которого соединена с соответствующими входами первой группы 6JiOKa сравнени , выход второго блока элементов И  вл етс  выходом генер |Тора, введены второй и третий регистры пам ти, блок анализа кодов, счетчик, второй дешифратор и элемент ИЛИ, причем первый и второй входы Пуск, а.также гервый к второй входы задани  режиь а генератора тактовых импульсов соедшнены с первым и вторь  1 входами генератора f (п - число выходов второго дешифратора) выходом второго дешифратора и первым выходом бло.са анализа кодов соответственно, пер:е-.,гй выход генератора тактовых кмпульсов подключен к первому входу счетчика, к к первому входу второго элементов И, второй и третий входы которого соединены с выходом -трету его регистр;, пам ти и выходом 1енерс:торг. равномерно распределенных случайных чисел соответственно , второй выход генератора тактовых импульсоп соединен о перВЕлми входами nepsoio и второго регистров пам ти , блока пам ти и блока анализа кодов, первый выход блока подключен к второму входу второго регис ра rtaMHTH,, выходы которого соединены ( соответствую ЦИ1Ми входами второй группы блока сравнени , вход которого подключен к третьему выходу геп-ератсра тактовых импульсов, второй выход блока пам ти подкл:.:чаи к второму в.оду первого регистра пам ти,, третрй вход которого соединек с вторым выходом 5noia анализа кодов, второй и третий входы которого подключены к тоетьему выходу блока пам ти и выходу блока ср ;внени  соответственно , четвертый т-ыуод генераторе;The goal is achieved by the fact that a controlled random number generator, containing a clock: pulse generator, memory unit, first decoder, first memory register, the output of which is connected to the first input of the memory unit through the first decoder, comparison unit, first and second blocks And elements, the generator of uniformly distributed numbers, the group of outputs of which is connected to the corresponding inputs of the first group of 6JiOKa comparison, the output of the second block of elements And is the generator | Tora output, the second and third memory registers are entered , code analysis block, counter, second decoder and OR element, the first and second Start inputs, as well as the second to the second inputs of the clock generator connected to the first and second 1 inputs of the generator f (n is the number of outputs of the second decoder) the output of the second decoder and the first output of the block of code analysis, respectively, lane: e -., the first output of the clock generator is connected to the first input of the counter, to the first input of the second And elements, the second and third inputs of which are connected to the output of its third register ;, memory and access 1eners: bargaining. uniformly distributed random numbers, respectively, the second output of the clock pulse generator is connected by the first inputs of nepsoio and the second memory registers, the memory block and the code analysis unit, the first output of the block is connected to the second input of the second register rtaMHTH, whose outputs are connected (corresponding to DI1Mi and inputs the second group of the comparator unit, the input of which is connected to the third output of the clock pulse pulse, the second output of the memory block connect:.: tea to the second input of the first memory register, the third input of which is connected to the second output of the 5noia code analysis, the second and third inputs of which are connected to the network output of the memory unit and the output of the cp unit; output, respectively, the fourth t-cell generator;

тактовых к.-::1ульсов соединен с входном генератора разномерно распоеделенных случайн лх чисел, группа выходов котсрого 11одключена к соответствующим зходг1м первой группы первого блока элементов И, ахо.цы второй группы которого соедиьены с соответствующими выходами второго дешифратора ,Г а выхо.аь4 первого блока элементов И соединены с группой входов элемента ИЛИ соответстьенно, вход которого соединен с выходом блока сравнени , а выход элемента ИЛИ соединен с перзглм входом третьего регистра пам ти, Бторой вход которого соодинен с п тым выходом генератора тактовых импульсов , шестой и седьмой БУХОДЫ которого подключены к второму входу счетчика и входу второго де:лифратора соответственно, четвертый вход первс:го регистра пам ти соединен с п-ьгм выходом ВТО1ЭОГО дешифратора, групгта ВХОДОР которого подключена к аьтходам счетчикг соответственно.clock to .- :: 1ulso is connected to the input generator of randomly divided random numbers and numbers, the output group is connected to the corresponding first group of the first block of elements And, the second group of which is connected to the corresponding outputs of the second decoder, Г and output4 of the first the block of elements AND is connected to the group of inputs of the element OR, respectively, the input of which is connected to the output of the comparison unit, and the output of the element OR is connected to the perglom input of the third memory register, whose second input is in conjunction with The second output of the clock generator, the sixth and seventh BOXES of which are connected to the second input of the counter and the input of the second de: lifter, respectively, the fourth input of the first memory register is connected to the nth output of the VTO1 decoder, the INPUT group of which is connected to the inputs, respectively.

Кроме того, блок анализа кодов содержит четыре группы элементов И, элемент ИЛИ, элемент НЕ и два регистра пам ти, пеовые входы которых образуют первый вход блока, второй вход которого соадилен с втор.:-лли входами регистров пам ти, тов И первой группы соеди.ен с первым ВХОДОМ 3.j3iv SHTa ИЛИ , выход э;:ементов И второй групта ЛЕ. i первым выходом 6JiOfca, зыходь,: элементов И третьей и чета--его и грул г :;сади1;ены соответственно с -«тог ЫдМ и иретьим входами элемента И.1И, выход которого  вл етс  BTOpHjx-i выходом бчока, первый выход первого реггютра пам ти соединен с первыми входами зламентов И первой и третьей груп;., BJ:Gрой выход первого регистра пам ти соединен с первыми входами элементов И второй и четвертой групп, первый выход второго регистра пам 1 г соединен с втсрыми входг гли элег.ьч-. тов И первой и второй групп, второй выход, второго регистра .ч соединен с STOpBiviH Ехола -:Н элементов И третьей к четвертой групп, трс-тии вход блока соединен с третьими входами элементов И второй и третьей 1рупп и с нходом элемента Hi-, зьход которого соединек с третьим входом элгм&:чта И четвертой групга,In addition, the code analysis block contains four groups of AND elements, the OR element, the NOT element, and two memory registers, whose peaks form the first input of the block, the second input of which is co-inserted with the second: - or the inputs of the memory registers, com. connect with the first INPUT 3.j3iv SHTa OR, exit e:; ements And the second group LE. i the first output 6JiOfca, zykhod: the elements of the third and the couple are his and his g:; sadi; eny, respectively, with - “tod IdM and the third inputs of the E.1I element, whose output is BTOpHjx-i bchoka output, the first output The first reggaeter of memory is connected to the first inputs of the first and third groups;., BJ: The first output of the first memory register is connected to the first inputs of the elements of the second and fourth groups, the first output of the second memory register is 1 g connected to each other. oo- Both the first and second groups, the second output, the second register .ch connected to STOpBiviH Yehola: N elements And the third to the fourth group, the input of the unit is connected to the third inputs of the second and third groups and the input of the Hi-, zkhod which is connected to the third entrance elgm &: cht AND fourth group,

Нэ фиг, приведена структурна  схама управл емого гекератора случайных чисел; на фиг «2 - функцислгальна  схема блока анализа; на фьг.Г функцкональне   схема генерглтора -;-;: тоЕЫХ импульссз; на фиг. 4 - грем;;-:ные диаграмрды работы управл емого генератора случайных чиса..; на фиг. 5 :уоочно-;ннейНЕл атроксима;; - ; jfдапного расггределени.ч pixi . Управл емый генератор содержит первый 1 пам ти, первый деши фратор 2, блок 3 пам ти, генератор 4 тактовых импульсов, второй регистр 5 пам ти, блок 6 сравнени , блок 7 анализа кодов, генератор 8 равномерно распределенных случайных чисел, первый блок 9 элементов И, элемент ИЛИ 10, счетчик 11, второй дешифратор 12, третий регистр 13, второй блок 14 элементов И, входы 15 и 16 генератора и -выход 1.7 генератора. Выход первого регистра 1 через первый дешифратор 2 соединен с первым входом блока 3 пам ти, первый, второй и третий выходы которого под ключены к первым входам регис5тро.в 5 и 1 блока 7 анализа соответственно. Первый, второй, третий и четвертый входы генератора 4 тактовых импульсов подключены к первому 15 и второ му 16 входам устройства, последнему выходу второго дешифратора 12 и к второму выходу блока 7 анализа соответственно. Первый выход генера тора 4 тактовых импульсов соединен с первым входом счетчика 11 и с тре тьим входом второго блока 14 элементов И-, первый и второй входы блока 14 подключены к выходу регист ра 13 и к второму выходу генератора 8 равномерно распределенных случайных чисел соответственно, а выход блока 14 соединен ,с выходом 17 устройства . Второй выход генератора 4 тактовых импульсов соединен с вторыми входами регистров 1 и 5, блока 3 па м ти и блока-7 анализа, первый выхо блока 7 анализа подключен к четвертому входу регистра 1. Третий выход генератора 4 подключен к третье му входу блока 6 сравнени , перва  втора  группы входов которого соеди нены соответственно с первой группо выходов генератора 8, с выходами ре гистра 5, а выход блока 6 оравнени  подключен к третьему входу блока 7 анализа и к первому входу элемента ИЛИ 10. Четвертый выход генератора 4 тактовых импульсов подключен к входу генератора 8 равномерно распр деленных случайных чисел, перва  группа выходов которого соединена с с первой группой входов блока 9 эле ментов И, втора  группа входов блока 9 подключена к выходам дешифрато ра 12, а выходы блока 9 соединены с второй группой входов элемента ИЛИ Выход элемента ИЛИ 10 соединен с пе вым входом регистра 13, второй вход которого подключен к седьмому выход генератора 4 тактовых импульсов, а п тый и шестой выходы генератора 4 соединены с вторыми входами счетчика 11 и дешифратора I. соответствен Третий вход регистра 1 подключен к последнему выходу дешифратора 12, входы которого соединены с выходами счетчика 11. Блок 7 анализа (фиг.2) содерукнт двухзар дный регистр 18 пам ти, блок 19 элементов И, элемент НЕ 20, элемент ИЛИ 21, входы 22-24 и выходы 26 и 25, причем перва  и втора  группы входов регистра 18 соединены соответственно с входами 22 и 23 блока 7 анализа, а выход 24 блока 7: подключен к третьему входу элементов И 1Э и 19з и к входу элемента НЕ 20, выход которого соединен с третьим входом элемента И 19д , первый выход первого разр да регистра 18 подключен к первым входам элементов И 19 и 19, а второй выход первого разр да регистра 18 соединен с первыми входами элементов И 19д. и 19, первый выход второго разр да регистра 18 соединен с вторыми входами элементов И 19 и 194, а второй выход второго разр да регистра 18 подключен к вторь1М входам элементов И 19 и 19,, выход элемента И 1 соединен с первым выходом 25 блока 7 анализа, а выходы элементов И 19 , 19 и 19 через элемент ИЛИ 21 подключены к второму выходу 26 блока 7 анализа. Генератор 4 тактовых импульсов (фиг.З) содержит элементы И 27 и ИЛИ 28, триггеры 29, генератор 30 импульсов, триггер 31, элемент НЕ 32, блок 33 элементов И, входы 1516 , 34 и 35 и группу выходов 36, причем первый и второй входы генератора 30 импульсов соединены с первым 15 и вторым 16 входами устройства соответственно, а первый выход генератора 30 импульсов подключен к вторым входам элементов И 33 , 332, 334. и 335-, вторые входы элементов И 33j и 33, седьмой выход 36-, генератора 4 тактовых импульсов, второй и третий входы триггера 29 и второй вход триггера 31 соединены с вторым выходом генератора 30 импульсов , третий 34 и четвертый 35 входы генератора 4 соединены соответственно с первым и третьим входами триггера 31, а также с первыми входами элементов ИЛИ 28 и И 27 соответственно, первый выход триггера 31 подключен к третьему входу элемента И 33, к первым входам элементов И 33 и к второму входу элемента И 27, выход которого соединен с вторым входом элемента ИЛИ 28,а выход элемента ИЛИ 28 подключен к первому входу триггера 29, второй выход триггера 31 подключен к первому входу элемента И 33, а первые входы элементов И 33 и 33д соединены с выходом-триггера 29,выход элемента И 33 через элемент НЕ 32 подключен к первому вхоцу элемента, И 33 , выходы блока 33 элементов К соединены с соответству ющими выходами 36 генератора 4 -такт вых импульсов. Управл емый генератор случайных чисел работает следующим образом. Получение случайных чисел (i l п) с заданным законом распределени  F{x) основано на сравнении равномер но распределенных случайных чисел , снимаемый с выхода генератора 8. со значени ми F (к .} и отыскании интервала, где выполн етс  ус ловие р / V- - I V 1 т При попадании числа в интерва/ F(X,-) ; F(. ) управл емый генератор выдает число х., подчиненное закону F(х). Будем считать, что в запоминающем устройстве 3 записаны значени  функции F(x,), а в регистре 1 находитс  адрес  чейки пам ти, в которо хранитс  значение функции F(x) при X 0,5. При поступлении сигнала Пуск по входу 15 происходит запуск генер тора 4 тактовых импульсов, который вырабатывает серии импульсов, управ л ющие работой устройства (фиг,4), По сигналу с первого выхода генератора 4 счетчик 11 устанавливаетс  S начальное состо ние, а по сигналу со второго выхода генератора тактовых импульсов происходит чтение пер вого слова из блока 3 пам ти и прием этого снова в регистры 1 и 5 и в блок 7 анализа. По сигналу с четвер . сго выхода генератора 4 производит с  запуск генератора 8 равномерно распределенных случайных чисел. Каждое слово,- хран щеес  в запом ка;о2ам устройстве 3, состоит из тре частей: в старших разр дах слова за писаке значение функции распределени  F(x:),, а в мла,Д1г.:их разр дах адрес  чейки пга-м ти. р которой хранитс  следующее слово и двухразр дньгЛ код Z ,. При чтении очередного слова из пам ти Б адресный регистр поступает алрес следующего слова, в pet-KCTp 5 - значение функции F;x. а в Iблок 7 анализа - код , ои чтении из пам ти первого сло ва & регистр 5 поступает значечие орункции Р{х-0,5), которое в момент времени, задаваемый сигналом с третьего выхода генератора 4 тактовых импульсов, сравнизаетс  в блоке 6 сравкеки  с числом s , снимаекшм с выхода генератора. 8 равномерно распреде .кенкых случайных чисел„ Если F(x,;)r на выходе схемы сравнени  формируетс  единичный сигнал (), в противном случае - нулевой ) . Сигнал Ь с выхода схемы срав.чени  поступает в блок 7 анализа, а через элеменТ ИЛИ 10 записываетс  в младший разр д регистра 13, На этом формирование старшего разр да случайно- , го числа заканчиваетс . Дальнейша  работа генератора зависит от значени  кода Z.; , поступившего в предыдущем такте в регистр 18 блока 7 анализа, схема которого приведена на фиг.2. В этой схеме перва  группа входов 22; блока 7 соединена с третьей группой выводов блока 3 пам ти. Поэтому код Z. из запоминающего устройства 3 записываетс  в регистр 18 в моменты времени, задаваемые управл ющим сигналом, поступипшим на второй вход 23 блока 7 анализа. Сигнал Ь с выхода схемы 6 сравнени  поступает на третий вход 24 блока 7 анализа,, .Первый выход 25 блока 7 соединен с входом установки в единичное состо ние младшего разр да регистра 1 , nosTOf iy, если на первом выходе 25 блока 7 анализа формируетс  единичный сигнал, в младшем разр де регистра 1 записываетс  единица, в противном случае в этом разр де сохран етс  ранее записанное значение. Рассмотрим работу управл емого генератора случайных чисел при ,,-00 на примере формировани  р.э.эр да числа х . На походе элемеьгсИ 192 (т.е. на первом ЕЬходе 25 блока 7) единичный сигнал может пп зи ь с  только при и , так как выходы элемента И 1 5;,, соедиие;{ы с вто-. рыми (инверсными) выходами ps::- Jгpa 18 и с третьим входом блока , Поэтому при на выходе 25 блока 7 еи-ли за формируетс  единичный сигнал и D мла.иший разр д регистра 1 запис: ;вастср единица. По сформированному таким образом Е. регистре 1 адресу 1 кз пам ти считываетс  слово, з старших разр дах которого записано значение функции F(,75), Здесь А,,- код , хран щийс  в (1.) старши.: разр дах регистра 1; (f - разр дность р гистра 1; А - исполнительный адрес,. Если Ь-О, на выходе 25 блока 7 формируетс  нулевой сигнал и в м.падшем раар де регистра 1 сохран етс  прежнее нулевое значение, т.е. , При формировании второго разр да числа по адресу в пам ти хранитс  слово, в старших разр дах которого записано зна-1е:ние функции F(.25). Таким образом получаетс , что в зависимости от значени Ь. ;-:з пам ти считываетс  либо значение функции F(,25), либо F(,5;, Поскольку при F (х 0 ,-5 ) , то Б этом случае из пам ти считываетс  значение F(,,25), т.е. значен.-:: функции F(x) на середин- имт( рваа OixsO,5, Если же (,5) ,. то и из пам ти считываетс  значение функции F(x) при ,75, т.е. ри значении аргумента, на середине интервала 0,. Аналогичным образом происходит формирование адресов и выбор срединных значений функции F(x) и при формировании остальных разр дов случайного числа , если . Случайное число формируетс  в регистре 13 сдвига, в мла:дший разр д которого по сигналу с выхода блока б сравнени  записываетс  единица, если F(), и ноль - в противном случае. Сдвиг в сторону старших разр дов ранее 15 сформированных разр дов числа х осуществл етс  в регистре 13 по сигналу с седьмого выхода генератора 4 тактовых импульсов.Ne FIG. Is a structural frame of a controlled random number hecker; Fig 2 is a functional diagram of the analysis block; On the f. G functionally, the generator diagram is -; -;: TOE pulse; in fig. 4 - greasy ;; -: charts of the operation of a controlled random number generator ..; in fig. 5: wooch-; nneHel atroxime ;; -; jfixed pixi The controlled generator contains the first 1 memory, the first deci fraction 2, the memory block 3, the 4 clock pulse generator, the second memory register 5, the compare block 6, the code analysis block 7, the generator of evenly distributed random numbers, the first block of 9 elements And, the element OR 10, the counter 11, the second decoder 12, the third register 13, the second block 14 of the elements And, the inputs 15 and 16 of the generator and the output 1.7 generator. The output of the first register 1 is connected via the first decoder 2 to the first input of the memory block 3, the first, second and third outputs of which are connected to the first inputs of the register 5 to 5 and 1 and the analysis block 7, respectively. The first, second, third and fourth inputs of the generator 4 clock pulses are connected to the first 15 and second 16 inputs of the device, the last output of the second decoder 12 and the second output of the analysis unit 7, respectively. The first output of the 4 clock pulse generator is connected to the first input of the counter 11 and to the third input of the second block 14 of the I- elements, the first and second inputs of the block 14 are connected to the output of the register 13 and to the second output of the generator 8 of uniformly distributed random numbers, respectively the output of the block 14 is connected to the output 17 of the device. The second output of the generator 4 clock pulses is connected to the second inputs of registers 1 and 5, the 3 unit of data and the analysis unit 7, the first output of the analysis unit 7 is connected to the fourth input of the register 1. The third output of the generator 4 is connected to the third input of the comparison unit 6 , the first two groups of inputs of which are connected respectively with the first group of outputs of the generator 8, with the outputs of the register 5, and the output of Equation 6 is connected to the third input of the analysis unit 7 and to the first input of the element OR 10. The fourth output of the generator 4 clock pulses is connected tothe generator 8 evenly distributed random numbers, the first group of outputs of which is connected to the first group of inputs of block 9, AND, the second group of inputs of block 9 is connected to the outputs of the decoder 12, and the outputs of block 9 are connected to the second group of inputs of the element OR OR 10 is connected to the first input of the register 13, the second input of which is connected to the seventh generator output of 4 clock pulses, and the fifth and sixth outputs of generator 4 are connected to the second inputs of counter 11 and decoder I. respectively The third register input 1 connected to the last output of the decoder 12, the inputs of which are connected to the outputs of the counter 11. The analysis unit 7 (FIG. 2) contains a two-charge memory register 18, a block of 19 AND elements, an HE element 20, an OR 21 element, inputs 22-24 and outputs 26 and 25, with the first and second groups of inputs of the register 18 connected respectively to the inputs 22 and 23 of the analysis unit 7, and the output 24 of the unit 7: connected to the third input of the elements I 1E and 19z and to the input of the element HE 20, the output of which is connected to the third element input 19d, the first output of the first bit of register 18 is connected to the first inputs of the element Commerce And 19 and 19, and the second output of the first bit of the register 18 is connected to the first inputs of the elements And 19d. and 19, the first output of the second bit of the register 18 is connected to the second inputs of the elements AND 19 and 194, and the second output of the second bit of the register 18 is connected to the second 1M inputs of the elements 19 and 19, the output of the element I 1 is connected to the first output 25 of block 7 analysis, and the outputs of the elements And 19, 19 and 19 through the element OR 21 connected to the second output 26 of the block 7 analysis. The clock pulse generator 4 (FIG. 3) contains AND 27 and OR 28 elements, triggers 29, pulse generator 30, trigger 31, HE element 32, AND block 33, inputs 1516, 34 and 35, and a group of outputs 36, the first and The second inputs of the pulse generator 30 are connected to the first 15 and second 16 inputs of the device, respectively, and the first output of the pulse generator 30 is connected to the second inputs of And 33, 332, 334. and 335, the second inputs of And 33j and 33, seventh output 36- , the generator 4 clock pulses, the second and third inputs of the trigger 29 and the second input of the trigger 31 are connected to the second m output of the pulse generator 30, the third 34 and fourth 35 inputs of the generator 4 are connected respectively with the first and third inputs of the trigger 31, as well as with the first inputs of the elements OR 28 and AND 27, respectively, the first output of the trigger 31 is connected to the third input of the element And 33, to the first inputs of the elements AND 33 and to the second input of the element AND 27, the output of which is connected to the second input of the element OR 28, and the output of the element OR 28 is connected to the first input of the trigger 29, the second output of the trigger 31 is connected to the first input of the element 33, and the first inputs elements and 33 and 33d with dineny yield-flop 29, and output element 33 through the NOT element 32 is connected to first element vhotsu, and 33, the block 33 outputs the elements K are connected to corresponding outputs 36 yuschimi generator 4 -takt O pulses. Managed random number generator works as follows. Obtaining random numbers (il p) with a given distribution law F {x) is based on comparing uniformly distributed random numbers taken from the output of generator 8. with values of F (k} and finding the interval where the condition p / V is satisfied - - IV 1 t When a number falls into the interval / F (X, -); F (.), The controlled generator outputs the number x., Subject to the law F (x). We assume that the values of the function F (3 x,), and register 1 contains the address of the memory location in which the value of the function F (x) is stored at X 0.5. When a signal is received La Start at input 15 starts the generator of 4 clock pulses, which produces a series of pulses controlling the operation of the device (FIG. 4). By the signal from the first output of the generator 4, the counter 11 is set to S the initial state, and by the signal from the second output The clock generator reads the first word from memory block 3 and takes it back to registers 1 and 5 and analysis block 7. At a signal from four. With the output of generator 4, the generator starts with 8 uniformly distributed random numbers. Each word, stored in the keypad; o2 device 3, consists of three parts: in the higher bits, the word for the scribe is the value of the distribution function F (x :), and in mA, D1g: their bits are cell address mi ti p which is stored the next word and two-digit dL code Z,. When reading the next word from memory B, the address register enters the alres of the next word, in pet-KCTp 5, the value of the function F; x. and in Analysis Block 7, a code that is read from the memory of the first word & Register 5 receives the value P (x = 0.5), which at the time specified by the signal from the third generator output, 4 clock pulses, is compared in block 6 with the number s, removed from the generator output. 8 uniformly distributing random random numbers. If F (x,;) r, a single signal () is generated at the output of the comparison circuit, otherwise it is zero). The signal L from the output of the comparison circuit enters the analysis block 7, and through the element OR 10 is recorded in the lower bit of the register 13. At this, the formation of the high bit of the random number ends. Further operation of the generator depends on the value of the code Z .; received in the previous cycle in the register 18 of the analysis block 7, the scheme of which is shown in Fig.2. In this scheme, the first group of inputs is 22; unit 7 is connected to the third group of outputs of memory unit 3. Therefore, the code Z. from the storage device 3 is recorded in the register 18 at the times specified by the control signal received at the second input 23 of the analysis unit 7. The signal L from the output of the comparison circuit 6 is fed to the third input 24 of the analysis block 7 ,. The first output 25 of the block 7 is connected to the input of the unit in the low-order state of register 1, nosTOf iy, if the first output 25 of the analysis block 7 is formed the signal in the low bit of register 1 is written to one, otherwise the previously recorded value is saved in this bit. Consider the operation of a controlled random number generator with, - 00 using the example of the formation of r.e.er and the number x. On the campaign of element 192 (i.e., on the first E 25th exit of block 7), a single signal can only be written with and, since the outputs of the element E 1 5 ;, the connection; {s with second. red (inverse) outputs ps :: - Jgpa 18 and with the third input of the block. Therefore, with output 25 of block 7 of the circuit, a single signal is generated and D is the smallest register 1 record:; wastcr unit. According to the register 1, which is generated in such a way E., of the 1 kz of memory, the word is read, the most significant bits of which contain the value of the function F (, 75). Here A ,, is the code stored in (1.) senior: register bits one; (f is the bit size of the register 1; A is the executive address. If bL is O, a zero signal is formed at the output 25 of block 7, and the zero value is stored in m fallen de reg register 1, i.e. The second digit of the number at the address in the memory stores the word, in the higher bits of which the knowledge F of the function F (.25) is written. Thus, it turns out that, depending on the value of b.; -: the memory reads either the value functions F (, 25), or F (, 5 ;, Since at F (x 0, -5), then in this case the value of F is read from the memory (,, 25), i.e. value- :: functions F (x) on the middle imt (pbaa OixsO, 5, If (, 5), then the value of the function F (x) is read from the memory at, 75, i.e. at the argument value, in the middle of the interval 0, in the same way the formation of and selecting the median values of the function F (x) and forming the remaining bits of the random number if. A random number is formed in the shift register 13, in mill: the lower bit of which, by the output of the comparison block b, a unit is written if F (), and zero otherwise. The shift towards the higher bits before the 15 bits of numbers formed is carried out in register 13 according to the signal from the seventh output of the generator 4 clock pulses.

Рассмотрим работу управл емого 20 генератора случайных чисел при . В этом случае работа генератора зависит от значени  сигнала q, формируемого на втором выходе 26 блока 7 анализа. Если , форми- 25 рование старших разр дов числа к заканчиваетс , а в младшие разр ды числа X. , -начина  со следующего , такта с веро тностью 0,5, записываютс  единицы. Сигнал q формируетс  на выходе элемента ИЛИ 21, входы ко- ., торого соединены с выходами элементов к 19. , 19-3 и Поэтому сигнал q равен единице, если , илр Z 11, а b 1, или 01, а 35 , В остальных случа х /см. схему блока 7, приведенную на фиг.2),Consider the operation of a controlled 20 random number generator with. In this case, the operation of the generator depends on the value of the signal q generated at the second output 26 of the analysis unit 7. If, the formation of the most significant bits of the number k is completed, and the lower bits of the number X., starting from the next, clock cycle with a probability of 0.5, units are recorded. The signal q is formed at the output of the element OR 21, the inputs of which are connected to the outputs of the elements to 19., 19-3, and therefore the signal q is equal to one if il z Z 11 and b 1, or 01, and 35, B other cases x / cm. block diagram 7, shown in Fig.2),

Сигнал q поступает на четвертый вход 35 генератора 4 тактовых импульсов , схема которого приведена 40 на фиг.З. В этой схеме генератор 30 импульсов формирует на первом и втором выходах непрерывные последовательности тактовых импульсов, следующие с одинаковой частотой и сдви- 45 нутые друг относительно друга на половину периода. Поэтому такт работы предлагаемого генератора состоит из двух микротактов. До поступ- , лени  на вход 35 генератора 4 сигнала 50 , генератор 4 в каждом такте (кроме первого) в первом микротакте формирует сигналы на втором 36 и п том 365- выходах, а во втором микротакте - сигналы на выходах 36 и 36- . jj В первом такте каждого цикла формируютс  все названные сигналы за исключением сигнала на п том выходе. В первом такте также формируютс  сигналы на первом 36 и четвертом л Збд выходах генератора 4 (см.временную диаграмму, изображенную на фиг.4). По сигналам с второго выхода генератора 4 осуществл етс  чтение информации из блока 3 пам ти и ее прием в регистры 1 и 5 и в 5The signal q is fed to the fourth input 35 of the generator 4 clock pulses, the circuit of which is shown 40 in FIG. In this scheme, the pulse generator 30 forms on the first and second outputs continuous sequences of clock pulses, which follow with the same frequency and are shifted relative to each other by half the period. Therefore, the operation cycle of the proposed generator consists of two micro-tacts. Before entering signal 35 of generator 4, signal 50, generator 4 in each cycle (except the first) in the first micro tact generates signals on the second 36 and fifth 365 outputs, and in the second micro tact - signals on outputs 36 and 36-. jj In the first cycle of each cycle, all the named signals are formed with the exception of the signal at the fifth output. In the first cycle, the signals are also formed on the first 36 and fourth l ZD of the outputs of the generator 4 (see the time diagram shown in figure 4). The signals from the second output of the generator 4 are used to read information from memory block 3 and receive it in registers 1 and 5 and in 5

блок 7 анализа.По сигналам с третьего и четвертого выходов генератора 4 осуществл етс  срабатывание блока 6 сравнени  и генератора 8 случайных чисел соответственно. Дл  увеличени  содержимого счетчика 11 на единицу и сдвига содержимого регистра 13 используютс  управл ющие сигналы , формируемые на п том и седьмом выходах генератора 4 тактовых импульсов соответственно. Сигнал с первого выхода генератора 4 необходим дл  установки счетчика 11 в исходное состо ние и выдачи сформированного в предыдущем цикле случайного числа на выход 17 генератора . Все названные сигналы формируютс  генератором 4 как в случае , так и в случае Z 00 при . Заметим, что в случае Z. сигнал на первом выходе блока 7 анализа всегда равен нулю иследовательно исполнительный адрес А равен адресу, поступающему в регистр 1 из запоминающего устройства 3. Поэтому в этом случае возможен переход к чтению из пам ти только одной узловой точки F(), а не выбор одной точки из двух, как в случаеZ - 0€. При поступлении сигнала на четвертый вход генератора 4 тактовы импульсов триггер 29 переходит в единичное состо ние, а триггер 31 в нулевое. Считаем, что в схеме используютс  двухступенчатые синхронные 1К-триггеры, на второй вход (вход синхронизации) которых поступает сигнал-с второго выхода генератора 30 (фиг.З). Поэтому триггеры 29 и 31 смен ют свои состо ни  по заднему фронту импульса, снимаемого со второго выхода генератора 30, и разрешают тем самым по вление импульсов на четвертом 36 и шестом 36g выходах- генератора 4. При этом прохождение сигналов на первый 36 , второй 36 2 и третий 36. выходы блока 4 запрещено. В следующем такте по сигналу с второго выхода генератора 30 триггер 29 возвращаетс  в нулевое состо ние, запреща  там самым дальнейшее прохождение импульсо на четвертый выход блока 4. Поэтому после поступлени  сигнала на четвертом 36 выходе блока 4 может по витьс  только один импульс, который запустит генератор 8 равномерно распределенных случайных чисел .analysis unit 7. According to the signals from the third and fourth outputs of generator 4, the comparison unit 6 and the random number generator 8 are activated, respectively. To increase the content of the counter 11 by one and shift the contents of the register 13, control signals are used that are generated at the fifth and seventh outputs of the generator 4 clock pulses, respectively. The signal from the first output of the generator 4 is necessary for setting the counter 11 to the initial state and issuing the random number generated in the previous cycle to the output 17 of the generator. All of these signals are generated by generator 4 in both the case and in the case of Z 00 at. Note that in the case of Z., the signal at the first output of the analysis block 7 is always zero and, consequently, the executive address A is equal to the address supplied to register 1 from memory 3. Therefore, in this case, it is possible to switch to reading only one node F from the memory ( ), and not the choice of one point of the two, as in the case of Z - 0 €. When a signal arrives at the fourth input of the generator 4 clock pulses, the trigger 29 goes to one state, and the trigger 31 goes to zero. We assume that the scheme uses two-step synchronous 1K-flip-flops, to the second input (synchronization input) of which a signal is received from the second output of the generator 30 (FIG. 3). Therefore, the triggers 29 and 31 change their states on the falling edge of the pulse removed from the second output of the generator 30, thereby allowing the appearance of pulses on the fourth 36 and sixth 36g outputs of the generator 4. At the same time, the passage of signals to the first 36, second 2 and third 36. outputs of block 4 is prohibited. In the next cycle, the signal from the second output of the generator 30 triggers the 29 returns to the zero state, prohibiting the pulse from passing further to the fourth output of block 4. Therefore, after the signal arrives at the fourth 36 output of block 4, only one pulse can appear, which will start the generator 8 evenly distributed random numbers.

Опрос разр дов генератора 8 проиходит по сигналам с выходов дешифратора 12 в моменты времени, задаваем сигналами с шестого выхода генератора 4. Сформированный таким образом поток импульсов с выходов генератора 8 через элемент ИЛИ 10 поступает на вход младшего разр да регистра 13 сдвига. Таким образе р после завершени  формировани  очередного случайного числа в младших разр дах регистра 13 находитс  код, веро тность по влени  единицы в разр дах которого равна 0,5.Interrogation of generator bits 8 takes place on signals from outputs of decoder 12 at time points, set by signals from sixth generator output 4. The stream of pulses generated from generator outputs 8 through OR 10 input is fed to input of low-order shift register 13. Thus, after completing the formation of the next random number in the lower bits of the register 13, there is a code, the probability of occurrence of a unit in the bits of which is 0.5.

Формирование очередного случайного числа заканчиваетс  в тот момент времени, когда счетчик 11 п-ереходит в,(т-1)-ое состо ние и на последнем выходе дешифратора 12 по в/  етс  импульс, который устанавливает в регистре 1 начальный адрес - адрес  чейки пам ти, в которой хранитс  значение F(,5). Здесь т-разр дность случайного числа х . Импульс с последнего выхода дешифратора 12 поступает также на третий вход 34 блока 4 и переводит триггеры 29 и 31 в единичное соето ние , запреща  тем самым прохождение сигнала на шестой выход 36 генератора 4, так как первый вход элемента И 33g соединен с вторым (инверсным ) выходом триггера 31, и разреша  прохождение сигналов с выхода генератора 30 на первый 36 , второй Зб2, третий 36 и четвертый Збд выходы блока 4, Поскольку в следующем такте по сигналу с второго выхода генератора 30 импульсов триггер 29 возвращаетс  в нулевое состо ние , а выход триггера 29 соединен с первыми входами элементов И 33 и 33j, то на первый 36 и четвертый 36 выходы блока 4 проходит только один импульс. По импульсу с первого выхода блока 4 происходит установка в начальное (нулевое) состо ние счетчика 11, считываетс  сформированноев предыдущем цикле случайное число х с регистра 13 и начинаетс  цикл формировани  следующего случайного числа. При необходимости разр дность формируемых случайных чисел может быть увеличена за счет добавлени  к числу равномерно распределенного числа с генератора 8 (рыходы генератора 8 через элементы ii 14 соединены с выходами 17 устройства). Поскольку первый вход, элемента И 33. через элемент НЕ 3,2 соединен с первым выходом 4, то на п том выходе 36. сигнал «может по витьс  только в тс моменты времени, когда отсутствует сигнал на выходе элемента И 33. Седьмой выход блока 4 соединен непосредственно с вторым выходом генератора 30, поэтому сигналы на выходе 36 ге нератора 4 по вл ютс  в каждом такте .The formation of the next random number ends at that moment in time when the counter 11 n-goes to, (t-1) -th state and at the last output of the decoder 12 a pulse is sent in / out, which sets in register 1 the starting address - the address of the memory cell and in which the value of F (, 5) is stored. Here is the t-rank of the random number x. The pulse from the last output of the decoder 12 also enters the third input 34 of block 4 and converts the triggers 29 and 31 into a single connection, thereby prohibiting the passage of the signal to the sixth output 36 of the generator 4, since the first input of the And 33g element is connected to the second (inverse) trigger output 31, and allowing signals from the output of generator 30 to the first 36, second Zb2, third 36 and fourth Zbd outputs of block 4, since in the next cycle the signal from the second output of generator 30 pulses trigger 29 returns to the zero state, and trigger 29 is connected to first inputs of AND gates 33 and 33j, to the first 36 and fourth 36 extends unit 4 outputs only one pulse. The pulse from the first output of block 4 is set to the initial (zero) state of counter 11, the random number x generated from the previous cycle is read from register 13 and the next random number is started to form. If necessary, the size of the generated random numbers can be increased by adding to the number of a uniformly distributed number from the generator 8 (the generator outputs 8 through the elements ii 14 are connected to the outputs 17 of the device). Since the first input of the element AND 33. through the element NOT 3.2 is connected to the first output 4, then the fifth output 36. the signal "can appear only at times when there is no signal at the output of the element 33. The seventh output of the block 4 is connected directly to the second output of the generator 30, so the signals at the output 36 of the generator 4 appear in each cycle.

Вс  описанна  выше последовательность рабочих циклов по формированию случайных чисел х,- продолжаетс  до The above described sequence of work cycles for generating random numbers x continues to

тех пор, пока не поступает сигнал Стоп на вход 16 генератора 4. При поступлении этого сигнала генератор 30 импульсов прекращает формировать импульсные последовательности и работа управл емого генератора случайных чисел на этом заканчиваетс  .until the Stop signal arrives at the input 16 of the generator 4. When this signal arrives, the pulse generator 30 stops forming pulse sequences and the operation of the controlled random number generator ends there.

Способом повышени  точности воспроизведени  распределени  F(x)  вл етс  увеличение количества п интервалов аппроксимации за счет меньшени  длин h этих интервалов. Получаема  при этом погрешность аппроксимации функции F(x) в случае кусочно-линейной интерпол ции определ етс  по известной формуле НьютонаThe way to increase the reproduction accuracy of the distribution F (x) is to increase the number n of the approximation intervals due to the shorter length h of these intervals. The resulting error in the approximation of the function F (x) in the case of piecewise linear interpolation is determined by the well-known Newton formula

е 1;|рЧЧ)|ллс,кс,e 1; | rchc) | lls, ks,

где hwhere h

- длина 1-го участка аппроксимации; )/MCiKc-- значение модул - the length of the 1st section of the approximation; ) / MCiKc-- module value

второй производной функции F(x) Б точке т, где погрешность аппроксимаци максимальна,the second derivative of the function F (x) B to the point m, where the approximation error is maximal,

В известном устройстве область значений аргумента х разбиваетс  на п равных интервалов, длина которых в случае формирований исел X.. равна где m - раэрг-.дность чисел. При этом количество участков аппроксимации определ етс  ПО формуле п l/h 2. Таким образо при увеличении разр дностк m формируемых чисел уменьшаетс  погре иност воспроизведени  распределени  Fix) за счет уменьшени  длины h y iacTков аппроксимации, т.е. за счет увеличени  количества узлов аппроксимации F() .In the known device, the range of values of the argument x is divided into n equal intervals, the length of which, in the case of formations, is xel X .. is equal to where m is the rarg-distribution of numbers. At the same time, the number of approximation areas is determined by the formula n l / h 2. Thus, with an increase in the size m of the formed numbers, the reproducibility of the distribution of the distribution Fix) decreases due to a decrease in the length h y iA of the approximation, i.e. by increasing the number of approximation nodes F ().

Поскольку дл  хранени  узловых точек F(x. ) необходимо использовать запоминающее устройство емкостью п-1 чисел, то такой способ повышени  точности воспроизведени  сопр жен со значительными аппаратурными затратами. Действительно, увеличение разр дности формируемых чисел всегда на один разр д требует увеличени  в два раза объама запоминающего устройства, -Так как количество п участков аппроксимации возрастает в два раза.Since the storage of the nodal points F (x.) Is necessary to use a storage device with a capacity of n-1 numbers, this method of improving the accuracy of reproduction is associated with significant hardware costs. Indeed, the increase in the size of the formed numbers always by one bit requires a doubling of the storage capacity of the memory device, “Since the number n of approximation areas doubles.

Предлагаемое устройство реализует способ получени  случайных чисел х, , основанный на кусочно-линейной аппроксимации функции распределени  F(x) при разбиении области значений аргумента х на п неравных ино:ервалов . Длина h каждого интервала выбираетс  при этом таким образом, чтобы погрешность аппроксимдции не превышала заданной величины. Поэтом на тех участках, на которых модуль второй производной I F (f) возрастает , следует уменьшить длину h{ интервала, а при уменьшении |Р() длину h можно увеличит График на фиг.5 иллюстрирует прин т при построении генератора метод аппроксимации заданного распределени  F(x). При формировании первого разр да числа равномерно распределенное случайное число сравниваетс  со значением F(,5) . (х 0,5 то формируемое число х - может прин ть значение из интервала 0,. Если (,5), то число х оказыва с  в интервале ,5. При форми ровании второго разр да в зависимос ти от результата первого испытани  число сравниваетс  либо со значением F(, 25) . если х,-€{0,0, 5), л бо со значением F(,75) если (О, 5,1) . Процесс сравнени  Ч со срединными значени ми функции F(x) продолжаетс  до тех пор, пока не попадает ц интервал F(Xj)( ), .(2) Однако в силу разбиени  области изменени  х на п неравных интервало число %, может попасть в интервал (2) не за m шагов (как в известном устройстве), а раньше. Здесь m как и прежде разр дность формируемых чисел X,о Пример 1. nycTb 7/F(,75) Тогда в силу монотонности функции F{x) имеем 7F(,5) и следователь но в результате первого испытани  получаем, что (0,5;1). На втором шаге (такте) число сравниваетс  с F(,75), в результате чего получа ем (0,75;1). Поскольку дальнейше разбиение интервала (0,75;1) попо-лам в данном случае не предусмотрено (фиг. 5), то выдачей числа-х из найденного интервала и заканчиваетс  цикл формировани  очередного числа (недостающие т-2 разр да числа х снимаютс  с генератора равномерно распределенных случайных чисел ) . Таким образом в рассматриваемом примере за два такта формируютс  два старших разр да числа , а в младшие разр ды, начина  с третьего , с веро тностью 0,5 занос тс  единицы (в предлагаемом устройстве два старших разр да формируютс  с помощью схемы сравнени , а младшие разр ды - путем опроса значений разр дов генератора 8 дешифр атором 12 с последующим занесением результата в младший разр д регистра 13 сдвига, содержимое которого в каждом такте сдвигаетс  на один разр д ) . п р и м е р 2. Пусть F(): F() . Тогда интервал (3/16 1/4), которому должно принадлежать формируемое число , будет найден за четыре шага (в первом такте) сравниваетс  с F(,5), во втором с F(), в третьем - с F(), в четвертом - с F(). Таким образом в зависимости от значени  поиск интервала (2) происходит за К шагов (тактов), где К - случайна  величина, меньша  или равна  т. Поэтому устройство, реализующее рассматриваемый способ генерировани  случайных чисел х, должно функционировать таким образом, чтобы в процессе работы на каждом шаге определ лось попало ли число в интервал (2) или нет. С этой целью предлагаемое устройство содержит блок 7 анализа, который определ ет . момент попадани  числа в интервал (2). При попадании в.интервал (2) блок 7 анализа формирует сигнал и предлагаемый генератор переходит в режим занесени  в младшие разр ды выходного регистра 13 с веро тностью 0,5 единичных сигналов. После завершени  формировани  т-разр дного случайного числа X, по сигналу с последнего выхода дешифратора 12 генератор переходит к формированию следующего случайного числа, а число х, сформированное в предыд тцем цикле, с выходов регистра 13 и генератора 8 черезблок 14 элементов И подаетс , на выход 17 устройства. С целью определени  момента попадани  числа в интервал (2) в запоминающее устройство 3 в период настройки генератора на реализацию заданного закона распределени  записываютс  не только значени  функции F() и адреса следующих узловых точек , но и двухразр дный код Z. Этот код в каждом такте поступает в блок 7 анализа,.который в зависимости от значени  Z и значени  сигнала Ь с выхода схемы 6 сравнени  формирует сигнал q. . В предлагаемом устройстве прин то, что при Z.00 генератор формирует следующий разр д числа х обычным образом , т.е. после делени  пополам очередного интервала и сравнени  с F(x) в следующем такте дел тс  пополам оба полученных полуинтервала, а выбор узловой точки происходит в зависимости от значени  сигнала Ь: при из пам ти считываетс  значение функции, подсчитанное на середине левого полуинтервала, а при - на середине правого полуинтервала. Поступление в блок 7 анализа ко- , да означает, что искомый ин . тервал (2) найден и генератор начина  со следующего такта по сигналу , сформированному в блоке 7, формирует оставшиес  младшие разр ды числа х , занос  в регистр 13 равноверо тные двоичные сигналы. Очевидно возможен и такой случай, когда все m разр дов числа формируютс  с помощью схемы сравнени . В этом случае определение момента попадани  в искомый интервал проис ходит по сигналу с последнего выхода дешифратора 12, а формирование сигнала блокируетс  путем поступлени  из пам ти в блок 7 анализа кода , исключа  тем самым возможность занесени  в младшие разр ды регистра 13 равноверо тных двоичных сигналов.The proposed device implements a method for obtaining random numbers x, based on a piecewise linear approximation of the distribution function F (x) by dividing the range of the values of the argument x into n unequal differential values. The length h of each interval is selected in such a way that the approximation error does not exceed a specified value. Therefore, in those areas where the modulus of the second derivative IF (f) increases, the length h (interval) should be reduced, and if | P () decreases, the length h can be increased. The graph in Figure 5 illustrates the approximation of a given distribution F (x). When forming the first digit of a number, a uniformly distributed random number is compared with the value F (, 5). (x 0.5 then the generated number x can take a value from the interval 0, if (, 5), then the number x turns out to be c in the interval, 5. When forming the second bit, depending on the result of the first test, the number is compared or with the value F (, 25). if x, - € {0,0, 5), l bo with the value F (, 75) if (O, 5,1). The process of comparing H with the median values of the function F (x) continues until the interval ц F (Xj) (),. (2) falls within. However, by dividing the range of changes into n unequal numbers,% can fall into interval (2) not for m steps (as in the known device), but earlier. Here m is, as before, the size of the generated numbers X, Пример Example 1. nycTb 7 / F (, 75) Then, due to the monotonicity of the function F (x), we have 7F (, 5) and, consequently, as a result of the first test, we obtain that (0 , 5; 1). In the second step (cycle), the number is compared with F (, 75), with the result that we get (0.75; 1). Since there is no further breakdown of the interval (0.75; 1) populations in this case (Fig. 5), the generation of the next number (the missing t-2 digits of the number x are removed from generator of uniformly distributed random numbers). Thus, in the considered example, two high-order digits are formed in two cycles, and in the lower-order digits, starting from the third, with a probability of 0.5, units are dropped (in the proposed device, the two higher-order digits are formed using the comparison circuit, and bits - by polling the values of generator bits 8 decryptor 12 and then putting the result in the lower bit of the shift register 13, the contents of which are shifted by one bit in each cycle). Example 2. Let F (): F (). Then the interval (3/16 1/4) to which the generated number should belong will be found in four steps (in the first clock) compared with F (, 5), in the second with F (), in the third with F (), in the fourth - with F (). Thus, depending on the value, the search for interval (2) occurs in K steps (cycles), where K is a random value, less than or equal to m. Therefore, a device implementing the considered method of generating random numbers x must function in such a way that at each step, it was determined whether the number fell into the interval (2) or not. For this purpose, the proposed device contains an analysis unit 7, which determines. the moment the numbers hit the interval (2). When the interval (2) enters the analysis block 7, it generates a signal and the proposed generator switches to the low-order bits of the output register 13 with a probability of 0.5 single signals. After completing the formation of the t-bit random number X, the signal from the last output of the decoder 12 generator proceeds to form the next random number, and the number x formed in the previous cycle, from the outputs of the register 13 and generator 8, through the block 14 of the elements I, is fed to output 17 of the device. In order to determine when a number falls into the interval (2) in the storage device 3, not only the values of the function F () and the addresses of the following nodal points, but also the two-digit code Z are recorded during the period of tuning the generator to implement the specified distribution law. This code is in each clock cycle enters analysis block 7, which, depending on the value of Z and the value of the signal L from the output of the comparison circuit 6, forms the signal q. . In the proposed device, it is assumed that, with Z.00, the generator forms the next bit of the number x in the usual way, i.e. after dividing the next interval in half and comparing with F (x) in the next clock cycle, both received half-intervals are divided in half, and the node point is selected depending on the value of the signal b: the function value calculated in the middle of the left half-interval is read from the memory, and - in the middle of the right half-interval. Admission to the unit 7 analysis code, yes means that the desired engine. The interval (2) is found and the generator, beginning with the next clock cycle, according to the signal formed in block 7, forms the remaining minor bits of the number x, bringing in the register 13 equal binary signals. Obviously, such a case is possible when all m bits of a number are formed using a comparison circuit. In this case, the determination of the moment of entry into the desired interval occurs by the signal from the last output of the decoder 12, and the formation of the signal is blocked by entering the code analysis from block 7, thereby excluding the possibility of entering into equal binary signals to the lower bits of the register 13.

При работе генератора возможна ситуаци , когда после делени  пополам очередного интервала в следующем такте необходимо делить пополам только один из двух полученных полуинтервалов . С целью определени  полуинтервала , подлежащего делению, ввод тс  следующие значени  управл ющего сигнала: и . Если Z. 01, в следующем такте делитс  пополам только правый полуинтервал, а при попадании - в левый не подлежащий делению полуинтервал (т.е. при ) в блоке 7 формируетс  сигнал и генератор переходит к формированию младших равноверо тных разр дов числа . Если , в следующем такте делитс  пополам левый полуинтервал, а при попадании . в правый полуинтервал (т.е. при )When the generator is in operation, it is possible that, after dividing the next interval in half into the next cycle, it is necessary to halve only one of the two half-openings obtained. For the purpose of determining the half-interval to be divided, the following control signal values are entered: and. If Z.01, in the next cycle, only the right half-interval is divided in half, and when hit, the left-open half-interval not to be divided (i.e., in) in block 7 a signal is formed and the generator proceeds to form lower-order digit digits. If, in the next cycle, the left half-interval is divided in half, and on hit. in the right half-interval (i.e., at)

Из сравнени  таблиц видно, что предлагаемое устройство в зависимости 60 От разр дности формируемых чисел позвол ет сократить объем пам ти в 2,1-2,9 раза при сохранении точности 6 аппроксимации. Сокращение объема пам ти ведет также к уменьшению раз- 65From a comparison of the tables it can be seen that the proposed device, depending on 60 On the size of the generated numbers, allows to reduce the memory size by 2.1-2.9 times while maintaining the accuracy of 6 approximations. Reducing the amount of memory also leads to a reduction in size.

в блоке 7 формируетс  сигнал . Поэтому блок 7 анализа формирует сигнал не только при , но и при Z 01, если , и при Z 11, если .in block 7, a signal is generated. Therefore, the analysis unit 7 generates a signal not only at, but also at Z 01, if, and at Z 11, if.

Таким образом, предлагаемый генератор позвол ет воспроизводить заданное распределение F(x) при разбиении области X на п неравных интервалов , определ   в каждом такте выполн етс  ли условие (2) или нет. .Поскольку в известном устройстве определение момента попадани  в интервал (2) происходит только в т-ом такте, то известное устройство не позвол ет делить область значений к на п неравных интервалов, и следовательно , требует дополнительного объема пам ти дл  достижени  тех же точностных характеристик, /которые имеет предлагаемое устройство.Thus, the proposed generator makes it possible to reproduce a given distribution F (x) when the region X is divided into n unequal intervals, whether the condition (2) is satisfied in each clock cycle or not. Since, in the known device, the detection of the moment of falling into the interval (2) occurs only in the tth cycle, the known device does not allow dividing the range of values to into n unequal intervals, and therefore, requires additional memory to achieve the same accuracy characteristics. / which has the proposed device.

С целью сравнени  точностных характеристик предлагаемого устройства и известного был проведен по формуле (1) расчет погрешностк аппроксимации показательного распределени  F(x)l -ехр(-Х-х) при Л 8. В табл.1 и 2 приведены полученные при этом значени  погрешности аппроксимации и объема пам ти N в зависимости от разр дности m формируемых чисел х . Объем пам ти определ дтс ; по формуле N п-1, где п - количество интервалов аппроксимации, обеспечивающих точность , . В табл.1 приведен характеристики известного устройства , а в табл,2 - характер;;стики предлагаемого устройства.In order to compare the accuracy characteristics of the proposed device and the known one, formula (1) was used to calculate the approximation error of the exponential distribution F (x) l -exp (-X x) for L 8. Tables 1 and 2 show the error values obtained approximations and memory size N depending on the size m of the generated numbers x. The amount of memory is determined by the DTS; according to the formula N p-1, where n is the number of approximation intervals that provide accuracy,. Table 1 shows the characteristics of the known device, and Table 2 shows the character ;; sticks of the proposed device.

Таблица 1Table 1

Таблица 2table 2

р дности регистра 1 и количества выходов дешифратора 2.Registers 1 register and the number of outputs of the decoder 2.

Claims (1)

1. Авторское свидетельство СССР № 213424, кл. G Об F 1/02, 1966.1. USSR author's certificate No. 213424, cl. G About F 1/02, 1966. свидетельство СССР 06 F 1/02, 1969. свидетельство СССР 06 F 1/02, 1971USSR certificate 06 F 1/02, 1969. USSR certificate 06 F 1/02, 1971 6363 .-Ll.-Ll
SU813253046A 1981-03-06 1981-03-06 Controllable random number generator SU960812A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU813253046A SU960812A1 (en) 1981-03-06 1981-03-06 Controllable random number generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU813253046A SU960812A1 (en) 1981-03-06 1981-03-06 Controllable random number generator

Publications (1)

Publication Number Publication Date
SU960812A1 true SU960812A1 (en) 1982-09-23

Family

ID=20944897

Family Applications (1)

Application Number Title Priority Date Filing Date
SU813253046A SU960812A1 (en) 1981-03-06 1981-03-06 Controllable random number generator

Country Status (1)

Country Link
SU (1) SU960812A1 (en)

Similar Documents

Publication Publication Date Title
SU960812A1 (en) Controllable random number generator
US4149258A (en) Digital filter system having filters synchronized by the same clock signal
US4031530A (en) Digital second-order clock linearizer
SU840900A1 (en) Divider
SU1741156A1 (en) Device for defining complement of a set
SU1288726A2 (en) Device for restoring continuous functions from discrete readings
SU1265975A1 (en) Device for generating time intervals
SU928353A1 (en) Digital frequency multiplier
SU1539999A2 (en) Automatic frequency ring-tuning device
SU1653153A1 (en) Variable-ratio divider
SU1506553A1 (en) Frequency to code converter
SU1547072A2 (en) Device for determining number of units in binary number
SU1239833A1 (en) Synthesizer of frequency-modulated signals
SU1162052A1 (en) Converter of code with sign digit to two's complement form
SU1223350A1 (en) Pseudorandom number generator
SU762140A1 (en) Frequency signal shaping device
SU1120321A1 (en) Device for extracting 7-th root of number
SU1198750A1 (en) Group frequency standard
SU1270758A1 (en) Device for dividing binary numbers
SU798727A1 (en) Apparatus for controlling speed-up and deceleration of actuating motor
SU997255A1 (en) Controllable frequency divider
SU661814A1 (en) Ring counter
SU953735A2 (en) Frequency divider using any integral division factor
SU849229A1 (en) Device for computing root mean square
SU1487020A1 (en) Unit for synchronization of computer system