RU2042187C1 - Device for generation of uniform distribution of random integers - Google Patents

Device for generation of uniform distribution of random integers Download PDF

Info

Publication number
RU2042187C1
RU2042187C1 SU4866926A RU2042187C1 RU 2042187 C1 RU2042187 C1 RU 2042187C1 SU 4866926 A SU4866926 A SU 4866926A RU 2042187 C1 RU2042187 C1 RU 2042187C1
Authority
RU
Russia
Prior art keywords
output
register
input
inputs
registers
Prior art date
Application number
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 SU4866926 priority Critical patent/RU2042187C1/en
Application granted granted Critical
Publication of RU2042187C1 publication Critical patent/RU2042187C1/en

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

FIELD: computer engineering. SUBSTANCE: device has sorting unit, registers, accumulating adders, synchronization unit and generator of random numbers with uniform distribution. Device provides possibility to generate random integers in given range. EFFECT: increased field of application. 14 dwg

Description

Изобретение относится к вычислительной технике, в частности к устройствам для получения псевдослучайных величин, и может быть использовано для статистического моделирования. The invention relates to computing, in particular to devices for obtaining pseudo-random variables, and can be used for statistical modeling.

В вычислительной технике известно устройство формирования целочисленных случайных величин с равномерным законом распределения, лежащих в заданном диапазоне, в котором используется датчик случайных чисел, состоящий из физического генератора шума, амплитуда выходного сигнала которого изменяется во времени случайным образом, ограничителя уровня, счетчика, блока преобразования чисел в заданный диапазон и взятия целой части числа. In computer technology, a device is known for generating integer random variables with a uniform distribution law lying in a predetermined range, in which a random number sensor is used, consisting of a physical noise generator, the amplitude of the output signal of which varies randomly in time, a level limiter, counter, and a number conversion unit into the given range and taking the integer part of the number.

Недостатками устройства являются неустойчивая работа датчика в условиях нестабильности параметров элементов схемы генератора шума, а также невозможность точного воспроизведения результатов формирования случайных чисел, что затрудняет контроль и отладку моделей. The disadvantages of the device are the unstable operation of the sensor in conditions of instability of the parameters of the elements of the noise generator circuit, as well as the inability to accurately reproduce the results of the formation of random numbers, which makes it difficult to control and debug models.

Известно также устройство формирования целочисленных псевдослучайных величин с равномерным законом распределения, лежащих в заданном диапазоне, в котором используются программный датчик псевдослучайных величин, распределенных равномерно на интервале (0, 1), и блок преобразования чисел в заданный диапазон, реализующий операции умножения, суммирования и взятия целой части числа. It is also known a device for generating integer pseudorandom variables with a uniform distribution law lying in a given range, in which a software sensor of pseudorandom variables distributed uniformly in the interval (0, 1), and a unit for converting numbers to a given range that implements the operations of multiplication, summation and taking the integer part of the number.

Однако данное устройство также имеет недостатки. Практика эксплуатации датчиков равномерно распределенных псевдослучайных чисел, реализованных на элементах вычислительной техники, показала, что ввиду конечности числа разрядов представления чисел (т.е. ограниченности длины периода последовательности максимальной длины) целочисленные псевдослучайные величины в заданном диапазоне повторяются. Это явление для некоторых задач статистического моделирования является нежелательным. Кроме того, наблюдаются существенное отклонение закона распределения получаемых чисел от равномерного, а также большой разброс заданных числовых характеристик получаемых реализаций, что также ограничивает практическое применение устройства. However, this device also has disadvantages. The practice of operating sensors of uniformly distributed pseudorandom numbers implemented on computer elements has shown that, due to the finiteness of the number of digits of the number representation (i.e., the limited length of the sequence period of the maximum length), integer pseudorandom values in a given range are repeated. This phenomenon is undesirable for some statistical modeling tasks. In addition, there is a significant deviation of the distribution law of the obtained numbers from the uniform, as well as a large scatter of the set numerical characteristics of the resulting implementations, which also limits the practical application of the device.

Наиболее близким техническим решением к изобретению является генератор равномерно распределенных псевдослучайных величин, который содержит первый и второй генераторы запускающих импульсов, первый, второй и третий элементы задержки, элемент ИЛИ, триггер, генератор тактовых импульсов, счетчик, группу элементов И, блок регистров памяти, блок из N групп по N элементов И в группе, N элементов ИСКЛЮЧАЮЩЕЕ ИЛИ, схему сравнения и регистр памяти. The closest technical solution to the invention is a generator of uniformly distributed pseudorandom variables, which contains the first and second triggering pulses, the first, second and third delay elements, an OR element, a trigger, a clock, a counter, a group of AND elements, a block of memory registers, a block from N groups of N elements AND in the group, N elements EXCLUSIVE OR, comparison circuit and memory register.

Однако известное устройство является генератором равномерно распределенных псевдослучайных величин и предназначено для формирования заданного количества псевдослучайных чисел заданной разрядности, которые распределены равномерно на интервале (0.1). В этом устройстве отсутствуют элементы, позволяющие генерировать распределенные равномерно целочисленные псевдослучайные величины, лежащие в заданном диапазоне. Кроме того, в силу традиционности используемого механизма получения псевдослучайных чисел в данном устройстве построенное на его основе устройство формирования целочисленных псевдослучайных величин (с добавлением блока преобразования чисел в заданный диапазон) имеет своими недостатками: повторяемость целочисленных псевдослучайных величин, а также отклонение закона распределения от равномерного. However, the known device is a generator of uniformly distributed pseudorandom variables and is intended to generate a given number of pseudorandom numbers of a given bit, which are distributed uniformly on the interval (0.1). There are no elements in this device that allow generating uniformly distributed integer pseudorandom values lying in a given range. In addition, due to the traditional nature of the mechanism used to obtain pseudorandom numbers in this device, the device based on it for generating integer pseudorandom variables (with the addition of a unit for converting numbers to a given range) has its drawbacks: the repeatability of integer pseudorandom variables, as well as the deviation of the distribution law from uniform.

Цель изобретения повышение точности распределения с одновременной реализацией возможности генерирования распределенных равномерно целочисленных псевдослучайных величин, лежащих в заданном диапазоне. The purpose of the invention is to increase the accuracy of distribution with the simultaneous realization of the possibility of generating distributed uniformly integer pseudorandom variables lying in a given range.

Для достижения цели в устройство формирования равномерно распределенных псевдослучайных величин, содержащее первый и второй генераторы запускающих импульсов, первый, второй и третий элементы задержки, элемент ИЛИ, триггер, генератор тактовых импульсов, счетчик, группу элементов И, блок регистров памяти, блок из N групп по N элементов И в группе, N элементов ИСКЛЮЧАЮЩЕЕ ИЛИ, схему сравнения и регистр памяти, введены четвертый, пятый, шестой, седьмой, восьмой и девятый элементы задержки и шесть формирователей, причем вход четвертого элемента задержки устройства соединен с выходом третьего элемента задержки генератора равномерно распределенных псевдослучайных величин, выход четвертого элемента задержки соединен с входом первого формирователя и входом пятого элемента задержки устройства, выход пятого элемента задержки соединен с входом второго формирователя и входом шестого элемента задержки устройства, выход шестого элемента задержки соединен с входом третьего формирователя и входом седьмого элемента задержки устройства, выход седьмого элемента задержки соединен с входом четвертого формирователя и восьмого элемента задержки устройства, выход восьмого элемента задержки соединен с входом пятого формирователя, вход девятого элемента задержки устройства соединен с выходом схемы сравнения генератора, выход девятого элемента задержки соединен с входом шестого формирователя, n (n требуемое количество чисел) сумматоров, первый и второй регистры устройства, регистр упорядочиваемой последовательности, информационный вход которого соединен с выходами N элементов ИСКЛЮЧАЮЩЕЕ ИЛИ генератора, вход разрешения записи с выходом первого формирователя, вход начальной установки с выходом второго генератора запускающих импульсов, а вход разрешения выдачи числа с выходом второго формирователя, регистр последовательности номеров упорядочиваемых псевдослучайных чисел, информационный вход которого соединен с выходом счетчика генератора, вход разрешения записи с выходом первого формирователя, вход начальной установки с выходом второго генератора запускающих импульсов, а вход разрешения выдачи числа с выходом второго формирователя, n 1 блоков упорядочения и формирования рангов псевдослучайных чисел, каждый из которых содержит первый и второй регистры, коммутатор последовательности рангов, схему сравнения и коммутатор упорядочиваемой последовательности, причем первые входы схемы сравнения и коммутатора упорядочиваемой последовательности каждого блока упорядочения и формирования рангов соединены с выходом регистра упорядочиваемой последовательности устройства, а входы разрешения выдачи информации схемы сравнения каждого блока упорядочения и формирования рангов соединены с выходом четвертого формирователя, элемент И, один из входов которого соединен с выходом схемы сравнения, а другой вход с выходом пятого формирователя, информационный вход первого регистра первого блока упорядочения и формирования рангов соединен с выходом регистра упорядочиваемой последовательности устройства, вход разрешения записи первого регистра каждого блока упорядочения и формирования рангов соединен с выходом элемента И, вход начальной установки с выходом второго генератора запускающих импульсов, а вход разрешения выдачи числа с выходом третьего формирователя, выход первого регистра каждого блока упорядочения и формирования рангов соединен с вторыми входами схемы сравнения и коммутатора упорядочиваемой последовательности, управляющий вход которого соединен с выходом схемы сравнения, информационный вход второго регистра первого блока упорядочения и формирования рангов соединен с выходом регистра последовательности псевдослучайных чисел устройства, вход разрешения записи второго регистра каждого блока упорядочения и формирования рангов соединен с выходом элемента И, вход начальной установки с выходом второго генератора запускающих импульсов, а вход разрешения выдачи числа с выходом третьего формирователя, выход второго регистра каждого блока упорядочения и формирования рангов соединен с вторым входом коммутатора последовательности рангов и с первым входом соответствующего сумматора, первый вход коммутатора последовательности рангов каждого блока упорядочения и формирования рангов соединен с выходом регистра номеров упорядочиваемых чисел устройства, а управляющий вход соединен с выходом схемы сравнения, выходы коммутатора упорядочиваемой последовательности и коммутатора последовательности рангов, начиная с первого блока упорядочения и формирования рангов, соединены с информационными входами первого и второго регистров соответственно последующих блоков упорядочения и формирования рангов, а выходы коммутатора упорядочиваемой последовательности и коммутатора последовательности рангов (n 1)-го блока упорядочения и формирования рангов соединены с информационными входами первого и второго регистров устройства соответственно, входы управления записью которых соединены с выходом пятого формирователя, выход второго регистра устройства соединен с первым входом n-го сумматора, вторые входы всех сумматоров соединены соответственно диапазону вырабатываемых целочисленных псевдослучайных величин с выходом первого генератора запускающих импульсов, входы разрешения выдачи числа всех сумматоров соединены с выходом шестого формирователя, а выходы сумматоров являются выходами устройства. To achieve the goal, a device for generating uniformly distributed pseudorandom variables containing the first and second triggering pulses, the first, second and third delay elements, an OR element, a trigger, a clock pulse generator, counter, a group of AND elements, a block of memory registers, a block of N groups by N elements AND in the group, N elements EXCLUSIVE OR, a comparison scheme and a memory register, the fourth, fifth, sixth, seventh, eighth and ninth delay elements and six shapers are introduced, and the input of the fourth element The device delay is connected to the output of the third delay element of the generator of uniformly distributed pseudorandom variables, the output of the fourth delay element is connected to the input of the first driver and the input of the fifth delay element of the device, the output of the fifth delay element is connected to the input of the second driver and the input of the sixth delay element of the device, the output of the sixth delay element connected to the input of the third driver and the input of the seventh delay element of the device, the output of the seventh delay element is connected to the house of the fourth shaper and the eighth delay element of the device, the output of the eighth delay element is connected to the input of the fifth shaper, the input of the ninth delay element of the device is connected to the output of the generator comparison circuit, the output of the ninth delay element is connected to the input of the sixth shaper, n (n is the required number of numbers) of adders, the first and second registers of the device, the register of an ordered sequence, the information input of which is connected to the outputs of N elements EXCLUSIVE OR generator, permission input recordings with the output of the first shaper, the input of the initial setting with the output of the second generator of triggering pulses, and the input of the resolution for issuing the number with the output of the second shaper, the register of the sequence of numbers of the ordered pseudorandom numbers, the information input of which is connected to the output of the counter of the generator, the recording permission input with the output of the first shaper, the input of the initial installation with the output of the second generator of triggering pulses, and the input of the resolution of the issuance of the number with the output of the second driver, n 1 learning and forming the ranks of pseudo-random numbers, each of which contains the first and second registers, a rank sequence switch, a comparison circuit and an ordered sequence switch, the first inputs of the comparison sequence circuit and an ordered sequence switch of each ordering and ranking unit being connected to the output of the device ordered sequence register, and the inputs for permitting the issuance of information of the comparison scheme of each ordering and ranking unit are connected to the output of the fourth shaper, the And element, one of the inputs of which is connected to the output of the comparison circuit, and the other input with the output of the fifth shaper, the information input of the first register of the first ordering and ranking unit is connected to the output of the register of the device’s ordered sequence, the write permission of the first register of each block ordering and formation of ranks is connected to the output of the element And, the input of the initial installation with the output of the second generator of triggering pulses, and the input permission to issue la with the output of the third shaper, the output of the first register of each ordering and ranking unit is connected to the second inputs of the comparison circuit and the switchable order sequence, the control input of which is connected to the output of the comparison circuit, the information input of the second register of the first ordering and ranking unit is connected to the output of the sequence register pseudo-random numbers of the device, the input permission to write the second register of each ordering and ranking unit is connected to by the element element I, the input of the initial setup with the output of the second trigger pulse generator, and the input of the number output with the output of the third shaper, the output of the second register of each ordering and ranking unit is connected to the second input of the sequence sequence switch and to the first input of the corresponding adder, the first input of the switch the sequence of ranks of each ordering and ranking unit is connected to the output of the register of numbers of the ordered numbers of the device, and the control input is connected n with the output of the comparison circuit, the outputs of the commutator of the ordered sequence and the commutator of the sequence of ranks, starting from the first block of ordering and formation of ranks, are connected to the information inputs of the first and second registers of the subsequent units of ordering and formation of ranks, respectively, and the outputs of the commutator of the ordered sequence and commutator of the sequence of ranks ( n 1) of the block ordering and forming ranks connected to the information inputs of the first and second registers of the device respectively, the recording control inputs of which are connected to the output of the fifth shaper, the output of the second register of the device is connected to the first input of the nth adder, the second inputs of all adders are connected according to the range of integer pseudorandom variables generated with the output of the first trigger pulse generator, and the inputs enable the number of all adders connected to the output of the sixth shaper, and the outputs of the adders are the outputs of the device.

Введенные элементы, позволяющие достичь цель повышение точности распределения с одновременной реализацией возможности генерирования распределенных равномерно целочисленных псевдослучайных величин, лежащих в заданном диапазоне, и отличающие заявляемое техническое решение от прототипа позволяют сделать вывод о соответствии критерию "новизна". The introduced elements that allow to achieve the goal of improving the accuracy of the distribution while simultaneously realizing the possibility of generating distributed uniformly integer pseudorandom variables lying in a given range and distinguishing the claimed technical solution from the prototype allow us to conclude that the criterion of "novelty" is met.

Свойства, отличающие заявляемое техническое решение от прототипа, не выявлены в других технических решениях при изучении данной и смежных областей техники и, следовательно, обеспечивают заявляемому решению соответствие критерию "существенные отличия", а именно обеспечение возможности получения распределенных равномерно целочисленных псевдослучайных величин, лежащих в заданном диапазоне, исключение повторяемости величин в заданном диапазоне и повышение точности их равномерного распределения. Properties that distinguish the claimed technical solution from the prototype are not identified in other technical solutions when studying this and related areas of technology and, therefore, provide the claimed solution with the criterion of "significant differences", namely, the possibility of obtaining distributed uniformly integer pseudorandom variables lying in a given range, eliminating the repeatability of values in a given range and improving the accuracy of their uniform distribution.

На фиг. 1 и 2 представлена блок-схема предлагаемого устройства для формирования равномерно распределенных целочисленных псевдослучайных величин, лежащих в заданном диапазоне; на фиг. 3-10 приведены временные диаграммы работы предлагаемого устройства; на фиг. 11 и 12 гистограммы равномерно распределенных целочисленных псевдослучайных величин, выработанных сопоставимыми моделями прототипа с блоком преобразования чисел в заданный интервал (фиг. 11) и заявляемого устройства (фиг. 12); на фиг. 13 и 14 графики оценки выборочных автокорреляционных функций псевдослучайных последовательностей, выработанных моделью прототипа (фиг. 13) и заявляемого устройства (фиг. 14). In FIG. 1 and 2 show a block diagram of the proposed device for the formation of uniformly distributed integer pseudorandom values lying in a given range; in FIG. 3-10 shows the timing diagrams of the proposed device; in FIG. 11 and 12 histograms of uniformly distributed integer pseudo-random values generated by comparable prototype models with a unit for converting numbers to a given interval (Fig. 11) and the claimed device (Fig. 12); in FIG. 13 and 14 graphs of the evaluation of selected autocorrelation functions of pseudo-random sequences developed by the prototype model (Fig. 13) and the claimed device (Fig. 14).

Устройство содержит генератор 26 равномерно распределенных на интервале (0,1) псевдослучайных величин, в который входят первый и второй генераторы 1 и 3 запускающих импульсов, первый, второй и третий элементы 2, 7 и 13 задержки, элемент ИЛИ 4, триггер 5, генератор 6 тактовых импульсов, счетчик 8, группа 9 элементов И, блок 10 регистров памяти, блок 11 из N групп по N элементов И в группе, N элементов ИСКЛЮЧАЮЩЕЕ ИЛИ 12, схему 14 сравнения и регистр 15 памяти, шесть элементов 16-20 и 39 задержки, шесть формирователей 21-25 и 40, n сумматоров 38, первый регистр 31 и второй регистр 37 устройства, регистр 30 упорядочиваемой последовательности, регистр 27 последовательности номеров упорядочиваемых псевдослучайных чисел, n 1 блоков 32 упорядочения и формирования рангов псевдослучайных чисел, каждый из которых содержит первый регистр 34, второй регистр 28, коммутатор 29 последовательности рангов, схему 35 сравнения, коммутатор 36 упорядочиваемой последовательности и элемент И 33. The device comprises a generator 26 of pseudorandom variables evenly distributed over the interval (0,1), which includes the first and second triggering pulses 1 and 3, the first, second and third delay elements 2, 7 and 13, the OR element 4, trigger 5, the generator 6 clock pulses, counter 8, group 9 of AND elements, block 10 of memory registers, block 11 of N groups of N AND elements in a group, N elements EXCLUSIVE OR 12, comparison circuit 14 and memory register 15, six elements 16-20 and 39 delays, six shapers 21-25 and 40, n adders 38, the first register 31 and the second re device 37, register 30 of an ordered sequence, register 27 of a sequence of numbers of ordered pseudorandom numbers, n 1 blocks 32 of ordering and forming ranks of pseudorandom numbers, each of which contains a first register 34, second register 28, switch 29 of the sequence of ranks, comparison circuit 35, switch 36 of an ordered sequence and element 33.

Входы каждого из N элементов ИСКЛЮЧАЮЩЕЕ ИЛИ 12 соединены с соответствующими выходами элементов И блока 11 из N групп по N элементов И в группе, первые входы элементов И каждой из групп которого соединены с выходом соответствующего элемента И группы 9. Первые входы элементов И группы 9 соединены с выходами соответствующих разрядов счетчика 8 и с первой группой входов схемы 14 сравнения, вторая группа входов которой соединена с выходами регистра 15 памяти. Соответствующие установочные входы триггеров регистра 15 соединены с установочным входом счетчика 8, установочным входом блока 10 регистров памяти, входом первого элемента 2 задержки и выходом первого генератора 1 запускающих импульсов, вход которого соединен с входом второго генератора 3 запускающих импульсов. Выход генератора 3 через элемент ИЛИ 4 соединен с первым входом триггера 5, второй вход которого соединен с выходом первого элемента 2 задержки. Выход схемы 14 сравнения через второй элемент 7 задержки соединен с вторым входом элемента ИЛИ 4, выход триггера 5 соединен с входом генератора 6 тактовых импульсов, выход которого соединен с входом синхронизации счетчика 8 непосредственно, а с вторыми входами элементов И группы 9 через третий элемент 13 задержки. Выходы регистров блока 10 регистров памяти соединены с вторыми входами элементов И соответствующей группы элементов И блока 11 из N групп по N элементов И в группе. Вход четвертого элемента 16 задержки устройства соединен с выходом третьего элемента 13 задержки генератора равномерно распределенных псевдослучайных величин, выход четвертого элемента 16 задержки соединен с входом первого формирователя 21 и входом пятого элемента 17 задержки устройства. Выход пятого элемента 17 задержки соединен с входом второго формирователя 22 и входом шестого элемента 18 задержки устройства, выход шестого элемента 18 задержки соединен с входом третьего формирователя 23 и входом седьмого элемента 19 задержки устройства. Выход седьмого элемента 19 задержки соединен с входом четвертого формирователя 24 и входом восьмого элемента 20 задержки устройства, выход восьмого элемента 20 задержки соединен с входом пятого формирователя 25. Вход девятого элемента 39 задержки устройства соединен с выходом схемы 14 сравнения генератора 26, выход девятого элемента 39 задержки устройства соединен с входом шестого формирователя 40. Информационный вход регистра 30 упорядочиваемой последовательности соединен с выходами N элементов ИСКЛЮЧАЮЩЕЕ ИЛИ 12 генератора 26, вход разрешения записи соединен с выходом первого формирователя 21, вход начальной установки с выходом второго генератора 3 запускающих импульсов, а вход разрешения выдачи числа с выходом второго формирователя 22. Информационный вход регистра 27 последовательности номеров упорядочиваемых псевдослучайных чисел соединен с выходом счетчика 8 генератора 26, вход разрешения записи соединен с выходом первого формирователя 21, вход начальной установки с выходом второго генератора 3 запускающих импульсов, а вход разрешения выдачи числа с выходом второго формирователя 22. The inputs of each of the N elements EXCLUSIVE OR 12 are connected to the corresponding outputs of the elements AND block 11 of N groups of N elements AND in the group, the first inputs of the elements AND of each group of which are connected to the output of the corresponding element And group 9. The first inputs of the elements AND group 9 are connected with the outputs of the corresponding bits of the counter 8 and with the first group of inputs of the comparison circuit 14, the second group of inputs of which are connected to the outputs of the memory register 15. The corresponding installation inputs of the triggers of the register 15 are connected to the installation input of the counter 8, the installation input of the block 10 of the memory registers, the input of the first delay element 2 and the output of the first trigger pulse generator 1, the input of which is connected to the input of the second trigger pulse generator 3. The output of the generator 3 through the OR element 4 is connected to the first input of the trigger 5, the second input of which is connected to the output of the first delay element 2. The output of the comparison circuit 14 through the second delay element 7 is connected to the second input of the OR element 4, the output of the trigger 5 is connected to the input of the clock generator 6, the output of which is connected directly to the synchronization input of the counter 8, and to the second inputs of the And elements of group 9 through the third element 13 delays. The outputs of the registers of the block 10 of the memory registers are connected to the second inputs of the elements AND of the corresponding group of elements AND of the block 11 of N groups of N elements AND in the group. The input of the fourth delay element 16 of the device is connected to the output of the third delay element 13 of the generator of uniformly distributed pseudorandom values, the output of the fourth delay element 16 is connected to the input of the first driver 21 and the input of the fifth delay element 17 of the device. The output of the fifth delay element 17 is connected to the input of the second driver 22 and the input of the sixth device delay element 18, the output of the sixth delay element 18 is connected to the input of the third driver 23 and the input of the seventh device delay element 19. The output of the seventh delay element 19 is connected to the input of the fourth shaper 24 and the input of the eighth delay element 20 of the device, the output of the eighth delay element 20 is connected to the input of the fifth shaper 25. The input of the ninth delay element 39 of the device is connected to the output of the comparison circuit 14 of the generator 26, the output of the ninth element 39 the delay device is connected to the input of the sixth shaper 40. The information input of the register 30 of an ordered sequence is connected to the outputs of N elements EXCLUSIVE OR 12 of the generator 26, the input permission the recording is connected to the output of the first shaper 21, the input of the initial setting with the output of the second generator 3 triggering pulses, and the input of the resolution of the issuance of the number with the output of the second shaper 22. The information input of the register 27 of the sequence of numbers of the ordered pseudorandom numbers is connected to the output of the counter 8 of the generator 26, the recording permission input connected to the output of the first shaper 21, the input of the initial installation with the output of the second generator 3 triggering pulses, and the input of the resolution of the issuance of the number with the output of the second form spruce 22.

Первые входы схемы 35 сравнения и коммутатора 36 упорядочиваемой последовательности каждого блока 32 упорядочения и формирования рангов соединены с выходом регистра 30 упорядочиваемой последовательности устройства, а входы разрешения выдачи информации схемы 35 сравнения каждого блока 32 упорядочения и формирования рангов соединены с выходом четвертого формирователя 24. Один из входов элементов И 33 соединен с выходом схемы 35 сравнения, а другой вход с выходом пятого формирователя 25. Информационный вход первого регистра 34 первого блока 32 упорядочения и формирования рангов соединен с выходом регистра 30 упорядочиваемой последовательности устройства, вход разрешения записи первого регистра 34 каждого блока 32 упорядочения и формирования рангов соединен с выходом элемента И 33, вход начальной установки с выходом второго генератора 3 запускающих импульсов, а вход разрешения выдачи числа с выходом третьего формирователя 23. Выход первого регистра 34 каждого блока 32 упорядочения и формирования рангов соединен с вторыми входами схемы 35 сравнения и коммутатора 36 упорядочиваемой последовательности, управляющий вход которого соединен с выходом схемы 35 сравнения. Информационный вход второго регистра 28 первого блока 32 упорядочения и формирования рангов соединен с выходом регистра 27 последовательности номеров псевдослучайных чисел устройства, вход разрешения записи второго регистра 28 каждого блока 32 упорядочения и формирования рангов соединен с выходом элемента И 33, вход начальной установки с выходом второго генератора запускающих импульсов, а вход разрешения выдачи числа с выходом третьего формирователя 23. Выход второго регистра 28 каждого блока 32 упорядочения и формирования рангов соединен с вторым входом коммутатора 29 последовательности рангов и с первым входом соответствующего сумматора 38. Первый вход коммутатора 29 последовательности рангов каждого блока 32 упорядочения и формирования рангов соединен с выходом регистра 27 номеров упорядочиваемых чисел устройства, а управляющий вход соединен с выходом схемы 35 сравнения. Выходы коммутатора 36 упорядочиваемой последовательности и коммутатора 29 последовательности рангов, начиная с первого блока 32 упорядочения и формирования рангов, соединены с информационными входами первого и второго регистров 34 и 28 соответственно последующих блоков упорядочения и формирования рангов, а выходы коммутатора 36 упорядочиваемой последовательности и коммутатора 29 последовательности рангов (n 1)-го блока 32 упорядочения и формирования рангов соединены с информационными входами первого и второго регистров 31 и 37 устройства соответственно, входы управления записью которых соединены с выходом пятого формирователя 25. Выход второго регистра 37 устройства соединен с первым входом n-го сумматора 38, вторые входы всех сумматоров 38 соединены соответственно диапазону вырабатываемых целочисленных псевдослучайных величин с выходом первого генератора 1 запускающих импульсов, входы разрешения выдачи числа всех сумматоров 38 соединены с выходом шестого формирователя 40, а выходы сумматоров 38 являются выходами устройства. The first inputs of the comparison circuit 35 and the ordering sequence switch of each block 32 of ranking and forming ranks are connected to the output of the register 30 of the ordered sequence of the device, and the inputs of allowing information from the circuits 35 of the comparison of each block 32 of ranking and forming are connected to the output of the fourth shaper 24. One of the inputs of the elements And 33 is connected to the output of the comparison circuit 35, and the other input to the output of the fifth shaper 25. The information input of the first register 34 of the first block 32 emphasis of grazing and formation of ranks is connected to the output of the register 30 of the device’s orderable sequence, the input of recording permission of the first register 34 of each block 32 of ordering and formation of ranks is connected to the output of the element And 33, the input of the initial setup with the output of the second generator 3 triggering pulses, and the input of the resolution of issuing the number the output of the third shaper 23. The output of the first register 34 of each block 32 of the ranking and formation of ranks is connected to the second inputs of the comparison circuit 35 and the switch 36 of the ordered sequence ovation, the control input of which is connected to the output of the comparison circuit 35. The information input of the second register 28 of the first block 32 of ranking and forming ranks is connected to the output of the register 27 of the sequence of numbers of pseudo-random numbers of the device, the input permission to write the second register 28 of each block 32 of ranking and forming of ranks is connected to the output of the element And 33, the input of the initial setup with the output of the second generator triggering pulses, and the input permits the issuance of the number with the output of the third shaper 23. The output of the second register 28 of each block 32 of the ranking and formation of ranks is connected to torym entrance switch 29 of ranks and to the first input of the corresponding adder 38. The first input 29 of the switch unit 32 ranks each streamline and formation of ranks connected to the output register numbers 27 numbers orderable device and a control input connected to the output of comparison circuit 35. The outputs of the switchable sequence sequence switch 36 and the rank sequence switch 29, starting from the first ranking and ranking unit 32, are connected to the information inputs of the first and second registers 34 and 28 of the subsequent ranking and formation units, respectively, and the outputs of the sequence sequence switch 36 and the sequence switch 29 ranks of the (n 1) th block 32 ordering and forming ranks are connected to the information inputs of the first and second registers 31 and 37 of the device respectively Accordingly, the recording control inputs are connected to the output of the fifth shaper 25. The output of the second register 37 of the device is connected to the first input of the nth adder 38, the second inputs of all adders 38 are connected according to the range of the generated integer pseudorandom variables with the output of the first trigger pulse generator 1, resolution inputs issuing the number of all adders 38 are connected to the output of the sixth shaper 40, and the outputs of the adders 38 are the outputs of the device.

Суть изобретения заключается в достижении цели за счет применения к исходной последовательности, вырабатываемой генератором равномерно распределенных псевдослучайных величин, нелинейного преобразования. Именно, исходную последовательность равномерно распределенных на интервале (0, 1) псевдослучайных величин, сформированных известным устройством, упорядочивают по возрастанию и одновременно формируют последовательность рангов исходных величин. В качестве искомой последовательности равномерно распределенных целочисленных псевдослучайных величин, лежащих в заданном диапазоне, берется полученная последовательность рангов, каждый член которой суммируется с заданной константой. The essence of the invention is to achieve the goal by applying to the original sequence generated by the generator of uniformly distributed pseudorandom variables, non-linear transformation. Namely, the initial sequence of pseudo-random variables uniformly distributed over the interval (0, 1) formed by the known device is ordered in ascending order and at the same time a sequence of ranks of the initial values is formed. As the desired sequence of uniformly distributed integer pseudorandom variables lying in a given range, we take the obtained sequence of ranks, each member of which is summed with a given constant.

Пусть с помощью генератора образуется выборка объема n и из исходной совокупности извлекается очередной элемент, которому предстоит занять свое место в упорядоченном ряду. Каким будет его ранг? Очевидно, если значение ζi (i n + 1), присущее элементу, еще не известно, или с другими элементами он не сравнивался, объективная возможность для него занять любое из мест в выборке одинакова. Это значит, что совокупность рангов случайная n-мерная дискретная величина и распределена равновероятно. Таким образом, применяя к исходной последовательности псевдослучайных величин операцию упорядочения и одновременно формируя их ранги, получают целочисленную выборку рангов, распределенную по равномерному закону на интервале [1, n] где n объем выборки, даже если у исходной выборки закон распределения отличается от равномерного. Если определить ранг как номер наблюдения в упорядоченном ряду, то исключается также эффект повторяемости целочисленных псевдослучайных величин. Применяя операцию сдвига к каждой из полученных псевдослучайных величин (а именно суммируя их с константой, равной разности левой (правой) границы требуемого диапазона и левой (правой) границы полученной последовательности рангов), получают равномерно распределенные целочисленные псевдослучайные величины, лежащие в заданном диапазоне.Let a sample of volume n be formed with the help of a generator, and the next element that will take its place in an ordered row will be extracted from the original set. What will be his rank? Obviously, if the value ζ i (in + 1) inherent in an element is not yet known, or it has not been compared with other elements, the objective possibility for it to take any of the places in the sample is the same. This means that the set of ranks is a random n-dimensional discrete quantity and is equally distributed. Thus, applying the ordering operation to the initial sequence of pseudorandom variables and simultaneously forming their ranks, we obtain an integer sample of ranks distributed according to the uniform law on the interval [1, n] where n is the sample size, even if the distribution law differs from the uniform one in the original sample. If we define the rank as the number of observations in an ordered series, then the effect of the repeatability of integer pseudorandom variables is also excluded. Applying the shift operation to each of the obtained pseudorandom variables (namely, summing them with a constant equal to the difference between the left (right) boundary of the required range and the left (right) boundary of the obtained sequence of ranks), we obtain uniformly distributed integer pseudorandom values lying in the given range.

Устройство работает следующим образом (фиг. 3-10). С включением устройства управляющее напряжение подается на генераторы 1 и 3 запускающих импульсов. При этом генератор 3 вырабатывает импульс, который через элемент ИЛИ 4 поступает на вход установки в ноль триггера 5 и устанавливает его в нулевое состояние. Этим же импульсом производится установка в единицу регистров 34 и 28 каждого блока 32 упорядочения и формирования рангов, а также установка в ноль регистров 30 и 27 устройства. После задержки на время Т1 переходных процессов в триггере 5 генератор 1 также вырабатывает импульс, который обнуляет счетчик 8 и устанавливает в соответствующие состояния триггеры блока 10 регистров памяти, регистра 15 памяти и регистры сумматоров 38. При этом в регистре 15 памяти устанавливается число, соответствующее числу точек, которые должны быть сформированы генератором равномерно распределенных псевдослучайных величин, а в регистрах сумматоров 38 устанавливается число k 1 (либо l k), где k и l левая и правая границы соответственно заданного диапазона формирования целочисленных псевдослучайных величин, что обеспечивается соответствующим соединением выхода генератора 1 с входами триггеров регистра 15 памяти и регистров сумматоров 38. Кроме того, импульс с выхода генератора 1 запускающих импульсов после задержки в элементе 2 на время Т2 переходных процессов при записи чисел в регистры памяти 15, блока 10 и сумматоров 38 подается на второй вход триггера 5 и устанавливает его в единичное состояние. В результате начинает работать генератор 6 тактовых импульсов, сигналы которого поступают на счетный вход счетчика 8. Счетчик 8 формирует номера точек, каждого из которых соответствует определенное состояние разрядов счетчика. Импульс, который был подан на вход счетчика 8, после задержки в элементе 13 на время Т13 переходных процессов в счетчика поступает на входы элементов И группы 9. Тем самым производится опрос разрядов счетчика 8, и сигналы, соответствующие состоянию разрядов счетчика, поступают на входы групп блока 11 из N групп по N элементов И в группе. При этом сигнал с выхода элемента И группы 9, соответствующий первому разряду счетчика 8, поступает на первые входы элементов И первой группы, сигнал с выхода второго элемента И группы 9 на первые входы элементов И второй группы блока 11 из N групп по N элементов И в группе и т.д. Таким образом, если соответствующий разряд счетчика 8 находится в состоянии "1", то код соответствующего регистра блока 10 регистров памяти поступает на выход блока 11 из N групп по N элементов И в группе. В элементах ИСКЛЮЧАЮЩЕЕ ИЛИ 12, на которые поступают коды из блока 11, производится логическое сложение сигналов, поступающих на их входы. В результате на выходах этих элементов формируется первое псевдослучайное число, которое поступает на информационный вход регистра 30 упорядочиваемой последовательности.The device operates as follows (Fig. 3-10). When the device is turned on, the control voltage is supplied to the triggering pulses 1 and 3. In this case, the generator 3 generates a pulse which, through the OR element 4, enters the installation input to zero of trigger 5 and sets it to the zero state. The same pulse is used to set registers 34 and 28 of each block 32 of ordering and rank formation into a unit, as well as to set the device registers 30 and 27 to zero. After a delay of time T 1 of transients in the trigger 5, the generator 1 also generates a pulse that resets the counter 8 and sets the triggers of the block 10 of memory registers, memory register 15 and adder registers 38 to the corresponding states. In this case, the number corresponding to the number of points that must be generated by the generator of uniformly distributed pseudorandom variables, and in the adder registers 38 the number k 1 (or lk) is set, where k and l are the left and right boundaries of the given about the range of formation of integer pseudorandom values, which is ensured by the corresponding connection of the output of the generator 1 with the inputs of the triggers of the register 15 of the memory and the registers of the adders 38. In addition, the pulse from the output of the generator 1 of the triggering pulses after a delay in element 2 for the time T 2 transients when writing numbers to the memory registers 15, block 10 and adders 38 is fed to the second input of trigger 5 and sets it to a single state. As a result, the generator 6 clock pulses begins, the signals of which are fed to the counting input of the counter 8. The counter 8 generates the numbers of points, each of which corresponds to a certain state of the bits of the counter. The pulse that was applied to the input of the counter 8, after a delay in the element 13 at the time T 13 of the transient processes, enters the counter to the inputs of the elements And of group 9. Thus, the bits of the counter 8 are interrogated, and the signals corresponding to the state of the bits of the counter are fed to the inputs block groups 11 of N groups of N elements AND in the group. The signal from the output of the element And group 9, corresponding to the first digit of the counter 8, is fed to the first inputs of the elements And the first group, the signal from the output of the second element And the group 9 to the first inputs of the elements And the second group of block 11 of N groups of N elements And group, etc. Thus, if the corresponding bit of the counter 8 is in the state "1", then the code of the corresponding register of the block 10 of the memory registers goes to the output of the block 11 of N groups of N elements And in the group. In the elements EXCLUSIVE OR 12, to which the codes from block 11 are received, the logical addition of the signals arriving at their inputs is made. As a result, the first pseudo-random number is generated at the outputs of these elements, which is fed to the information input of the register 30 of the ordered sequence.

Тактовый импульс с выхода элемента 13 задержки поступает также на группу элементов 16-20 задержки и затем на формирователи 21-25. Формирователь 21 формирует импульс приема псевдослучайного числа и его номера в регистры 30 и 27, который поступает на входы разрешения записи регистров 30 и 27. Формирователь 22 формирует импульс выдачи числа (ВЧ), который поступает на входы разрешения считывания регистров 30 и 27. Формирователь 23 формирует импульс ВЧ регистров 34, 28 и 37 (ВЧ Рг 34, 28, 37), который поступает на входы разрешения считывания регистров 34, 28 и 37. Формирователь 24 формирует строб-импульс, поступающий на схемы 35 сравнения. Формирователь 25 формирует импульс приема числа (ПЧ) в регистры 34, 28, 31 и 37 (ПЧ Рг 34, 28, 31, 37), поступающий на один из входов схемы И 33, а также на входы разрешения записи регистров 34, 28, 31 и 37. The clock pulse from the output of the delay element 13 also goes to the group of delay elements 16-20 and then to the formers 21-25. Shaper 21 generates a pulse for receiving a pseudo-random number and its number in registers 30 and 27, which is fed to the write enable inputs of registers 30 and 27. Shaper 22 generates a pulse for issuing a number (HF), which goes to the read enable inputs for registers 30 and 27. Shaper 23 generates a pulse of the RF registers 34, 28 and 37 (RF Rg 34, 28, 37), which is fed to the read enable inputs of the registers 34, 28 and 37. The driver 24 generates a strobe pulse arriving at the comparison circuit 35. Shaper 25 generates an impulse for receiving a number (IF) in registers 34, 28, 31 and 37 (IF Rg 34, 28, 31, 37), coming to one of the inputs of circuit I 33, as well as to the recording permission inputs of registers 34, 28, 31 and 37.

Таким образом, после поступления первого импульса с выхода генератора 6 тактовых импульсов (вернее после истечения промежутка времени Т13 с момента выработки первого тактового импульса) состояние узлов устройства следующее: на выходе элементов ИСКЛЮЧАЮЩЕЕ ИЛИ генератора 26 и на входе регистра 30 присутствует первое псевдослучайное число, на выходе счетчика 8 генератора 26 и на входе регистра 27 присутствует номер первого псевдослучайного числа единица.Thus, after the first pulse arrives from the output of the generator 6 clock pulses (or rather, after the expiration of the time interval T 13 from the moment the first clock pulse was generated), the state of the device nodes is as follows: at the output of the EXCLUSIVE OR elements of the generator 26 and at the input of the register 30, the first pseudorandom number is present, at the output of the counter 8 of the generator 26 and at the input of the register 27 there is a number of the first pseudo-random number one.

После истечения промежутка времени Т16 формирователь 21 формирует импульс приема псевдослучайного числа и его номера в регистры 30 и 27. После задержки на время Т17 переходных процессов в регистрах 30 и 27 формирователь 22 формирует импульс ВЧ длительностью τ1, поступающий на входы разрешения считывания регистров 30 и 27, с которых осуществляется съем кодов первого псевдослучайного числа и его номера. Код первого псевдослучайного числа поступает на первые входы схем 35 сравнения и коммутаторов 36 каждого блока 32 упорядочения и формирования рангов, а также на первый вход регистра 34 первого блока 32 упорядочения и формирования рангов. Код номера первого псевдослучайного числа поступает на первые входы коммутаторов 29 каждого блока 32 упорядочения и формирования рангов, а также на первый вход регистра 28 первого блока 32 упорядочения и формирования рангов.After the expiration of the time interval T 16, the shaper 21 generates an impulse for receiving a pseudo-random number and its number into the registers 30 and 27. After a delay of T 17 for transients in the registers 30 and 27, the shaper 22 generates a high-frequency pulse of duration τ 1 , which is fed to the register enable inputs 30 and 27, from which the codes of the first pseudo-random number and its number are removed. The code of the first pseudo-random number arrives at the first inputs of comparison circuits 35 and switches 36 of each ranking and ranking unit 32, as well as to the first input of the register 34 of the first ranking and ranking unit 32. The code number of the first pseudo-random number is supplied to the first inputs of the switches 29 of each ordering and ranking unit 32, as well as to the first input of the register 28 of the first ordering and ranking unit 32.

После истечения промежутка времени Т18 формирователь 23 формирует импульс ВЧ регистров 34, 28, 37. Этот импульс поступает на входы считывания регистров 34, 28 каждого блока 32 упорядочения и формирования рангов, а также регистра 37 устройства, разрешая выдачу кодов чисел, хранящихся в этих регистрах. При этом на вторые входы схем 35 сравнения и коммутаторов 36 и 29 каждого блока 32 упорядочения и формирования рангов поступают коды чисел, хранящихся в регистрах 34 и 28 соответственно, т.е. коды единиц, а на первые входы n сумматоров 38 устройства коды чисел, хранящихся в регистрах 28 каждого блока 32 упорядочения и формирования рангов и в регистре 37 устройства (т.е. также коды единиц).After the period of time T 18 expires, the driver 23 generates a pulse of the RF registers 34, 28, 37. This pulse is fed to the read inputs of the registers 34, 28 of each block 32 of ordering and ranking, as well as the register 37 of the device, allowing the issuance of codes of numbers stored in these registers. At the same time, the codes of numbers stored in registers 34 and 28, respectively, are received at the second inputs of comparison circuits 35 and switches 36 and 29 of each block 32 for ranking and forming ranks, unit codes, and at the first inputs of n adders 38 of the device, codes of numbers stored in the registers 28 of each block 32 for ranking and forming ranks and in the register 37 of the device (i.e. also unit codes).

После истечения промежутка времени Т19 формирователь 24 формирует строб-импульс длительностью τ2(фиг. 4), поступающий на входы разрешения выдачи информации схем 35 сравнения каждого блока 32 упорядочения и формирования рангов. На выходе всех схем 35 сравнения формируется импульс положительной полярности (логической "1"), который, воздействуя на управляющие входы коммутаторов 36 и 29 всех блоков 32, устанавливает их в положение, когда на выход коммутаторов 36 поступает информация с выхода регистров 34, а на выход коммутаторов 29 информация с выхода регистров 28 (для данного случая первого импульса с выхода генератора 6 тактовых импульсов коды единиц).After the expiration of the time interval T 19, the shaper 24 generates a strobe pulse of duration τ 2 (Fig. 4), which is fed to the inputs of the resolution of the information output from the circuits 35 for comparing each block 32 for ranking and forming ranks. The output of all the comparison circuits 35 generates a pulse of positive polarity (logical "1"), which, acting on the control inputs of the switches 36 and 29 of all blocks 32, sets them to the position when the output of the switches 36 receives information from the output of the registers 34, and the output of the switches 29 information from the output of the registers 28 (for this case, the first pulse from the output of the generator 6 clock pulses unit codes).

После истечения промежутка времени Т20 формирователь 25 формирует импульс ПЧ в регистры 34, 28, 31 и 37 (фиг. 4), поступающий на один из входов элементов И 33 каждого блока 32, на втором входе которых (в данном случае) в течение длительности строб-импульса τ2 присутствует логическая "1". Импульс с выхода элементов И 11 разрешает запись информации в регистры 34 и 28 каждого блока 32. При этом в регистр 34 первого блока 32 переписывается из регистра 30 устройства первое псевдослучайное число, в регистр 28 первого блока 32 (из регистра 27 устройства) его номер (единица), а в регистры 34 и 28 остальных блоков 32 и регистры 31 и 37 устройства переписывается информация с выхода коммутаторов 36 и 29 соответствующих блоков 32.After the expiration of the time interval T 20, the driver 25 generates an IF pulse in the registers 34, 28, 31 and 37 (Fig. 4), arriving at one of the inputs of the elements And 33 of each block 32, at the second input of which (in this case) for a duration pulse gate τ 2 there is a logical "1". The pulse from the output of elements And 11 permits the recording of information in the registers 34 and 28 of each block 32. In this case, the first pseudorandom number is written to the register 34 of the first block 32, and its number is written to the register 28 of the first block 32 (from the device register 27) unit), and information from the output of the switches 36 and 29 of the corresponding blocks 32 is written to the registers 34 and 28 of the remaining blocks 32 and the registers 31 and 37 of the device.

Благодаря временному рассовмещению импульсов с выхода генератора 6 тактовых импульсов, а также импульсов с формирователей 21-25 ложное срабатывание схем 35, а также прохождение ложного кода на выход коммутаторов 36 и 29 исключаются. Due to the temporary combining of pulses from the output of the generator 6 clock pulses, as well as pulses from the shapers 21-25, false operation of circuits 35, as well as the passage of a false code to the output of switches 36 and 29, are eliminated.

С поступлением второго импульса с выхода генератора 6 тактовых импульсов осуществляются формирование и съем кода второго псевдослучайного числа, которое записывается в регистр 30 устройства, а его номер (двойка) фиксируется счетчиком 8 и запоминается в регистре 27. Импульсом ВЧ осуществляется съем кодов второго псевдослучайного числа и его номера с регистров 30 и 27 устройства соответственно, которые поступают на схемы 35 сравнения и коммутаторы 36 и 29 каждого блока 32 и на входы регистров 34 и 28 первого блока 32. Импульсом ВЧ регистров 34, 28, 37 производится выдача кодов чисел, хранящихся в этих регистрах (см. фиг. 4-9), которые поступают на схемы 35 сравнения, коммутаторы 36 и 29 каждого блока 32, а также сумматоры 38. С поступлением с формирователя 24 на входы разрешения выдачи информации схем 35 сравнения каждого блока 32 строб-импульса происходит сравнение второго числа с содержимым регистра 34 каждого блока 32. Так как второе число в нашем примере больше первого, то на выходе схемы 35 сравнения первого блока 32 формируется сигнал логического "0". На выходе схемы 35 сравнения остальных блоков 32 формируется сигнал логической "1". Сигнал логического "0" с выхода схемы 35 сравнения первого блока 32, воздействуя на управляющие входы коммутаторов 36 и 29 первого блока 32, устанавливает их в положение, когда на выход коммутатора 36 поступает информация с выхода регистра 30, т.е. второе псевдослучайное число, а на выход коммутатора 29 его номер, т.е. число два. Сигнал логической "1" с выхода схемы 35 сравнения остальных блоков 32, воздействуя на управляющие входы коммутаторов 36 и 29, устанавливает их в положение, когда на выход коммутаторов 36 поступает информация с выходов соответствующих регистров 34, а на выход коммутаторов 29 информация с выхода соответствующих регистров 28 (для данного случая второго импульса с выхода генератора 6 тактовых импульсов коды единиц, начиная с коммутаторов 36 и 29 второго блока 32. После поступления с формирователя 25 импульса ПЧ регистров 34, 28, 31 и 37 в регистр 34 второго блока 32 из регистра 30 устройства переписывается второе псевдослучайное число, а в регистр 28 второго блока 32 (из регистра 27 устройства) его номер (два), в регистры 34 и 28 третьего и последующих блоков 32 и регистры 31 и 37 устройства переписывается информация с выхода коммутаторов 36 и 29 соответствующих блоков 32. В регистрах 34 и 28 первого блока 32 остаются первое псевдослучайное число и его номер соответственно. With the arrival of the second pulse from the output of the 6 clock pulse generator, the second pseudo-random number code is generated and removed, which is recorded in the device register 30, and its number (two) is fixed by the counter 8 and stored in register 27. The RF pseudo-random number codes are removed and its numbers from the registers 30 and 27 of the device, respectively, which go to the comparison circuits 35 and the switches 36 and 29 of each block 32 and to the inputs of the registers 34 and 28 of the first block 32. The pulse of the RF registers 34, 28, 37 produces It is necessary to issue codes of numbers stored in these registers (see Fig. 4-9), which are sent to the comparison circuits 35, the switches 36 and 29 of each block 32, and also the adders 38. With the input from the shaper 24 to the permission inputs for the output of the circuit information 35, each block 32 of the strobe pulse is compared, the second number is compared with the contents of the register 34 of each block 32. Since the second number in our example is larger than the first, a logical "0" signal is generated at the output of the comparison circuit 35 of the first block 32. At the output of the circuit 35 for comparing the remaining blocks 32, a logical "1" signal is generated. The logic signal "0" from the output of the comparison circuit 35 of the first block 32, acting on the control inputs of the switches 36 and 29 of the first block 32, sets them to the position when the output of the register 36 receives information from the output of the register 30, i.e. the second pseudo-random number, and the output of the switch 29 is its number, i.e. number two. The logical signal "1" from the output of the comparison circuit 35 of the remaining blocks 32, acting on the control inputs of the switches 36 and 29, sets them to the position when the output of the switches 36 receives information from the outputs of the respective registers 34, and the output of the switches 29 receives information from the output of the corresponding registers 28 (for this case, the second pulse from the output of the generator 6 clock pulses unit codes, starting from the switches 36 and 29 of the second block 32. After receipt from the shaper 25 of the pulse of the inverter registers 34, 28, 31 and 37 in the register 34 of the second block 3 2, the second pseudo-random number is written from the device register 30, and its number (two) is written to the register 28 of the second block 32 (from the device register 27), information from the output of the switches is transferred to the registers 34 and 28 of the third and subsequent blocks 32 and the device registers 31 and 37 36 and 29 of the respective blocks 32. The first pseudo-random number and its number, respectively, remain in the registers 34 and 28 of the first block 32.

С поступлением третьего импульса с выхода генератора 6 тактовых импульсов в соответствии с изложенной логикой работы в регистрах 34 и 28 первого блока 32 записаны третье псевдослучайное число и его номер (если оно меньше первого), в регистрах 34 и 28 второго блока 32 первое псевдослучайное число и его номер, в регистрах 34 и 28 третьего блока 32 второе (максимальное из трех) псевдослучайное число, состояние регистров 34 и 28 остальных блоков 32, а также регистров 31 и 37 остается без изменений (см. фиг. 4-8). With the arrival of the third pulse from the output of the generator 6 clock pulses in accordance with the above logic in the registers 34 and 28 of the first block 32 recorded the third pseudo-random number and its number (if it is less than the first), in the registers 34 and 28 of the second block 32 the first pseudo-random number and its number, in the registers 34 and 28 of the third block 32, the second (maximum of three) pseudo-random number, the state of registers 34 and 28 of the remaining blocks 32, as well as registers 31 and 37 remains unchanged (see Fig. 4-8).

С поступлением n импульсов псевдослучайные числа упорядочены в порядке возрастания, а их ранги хранятся в сумматорах 38. With the arrival of n pulses, pseudo-random numbers are ordered in increasing order, and their ranks are stored in adders 38.

В течение всего процесса работы устройства код с выхода счетчика 8 сравнивается в схеме 14 сравнения с кодом, записанным в регистре 15 памяти. При равенстве кодов на выходе схемы 14 сравнения формируется импульс, который после задержки в элементе 7 на время переходных процессов в счетчике 8 через элемент ИЛИ 4 поступает на вход установки в ноль триггера 5, что приводит к прекращению работы устройства. Одновременно импульс с выхода схемы 14 сравнения после задержки в элементе 39 на время Т39 > Т13 + Т16 + Т17 + τ1 поступает на формирователь 40. Импульс с выхода формирователя 40 поступает на вход разрешения считывания всех сумматоров 38. С поступлением этого импульса в сумматорах 38 производятся сложение хранящихся в их регистрах чисел k 1 либо l k, где k и l левая и правая границы соответственно заданного диапазона формирования целочисленных псевдослучайных величин и рангов упорядоченной последовательности псевдослучайных чисел, и выдача результата искомой последовательности целочисленных псевдослучайных величин, лежащих в заданном диапазоне.During the entire process of operation of the device, the code from the output of the counter 8 is compared in the comparison circuit 14 with the code recorded in the memory register 15. If the codes are equal, the output of the comparison circuit 14 generates a pulse, which, after a delay in the element 7 for the duration of the transient processes in the counter 8, passes through the OR element 4 to the input of the zero trigger 5, which leads to the termination of the device. At the same time, the pulse from the output of the comparison circuit 14 after a delay in the element 39 for the time T 39 > T 13 + T 16 + T 17 + τ 1 is supplied to the driver 40. The pulse from the output of the driver 40 is fed to the read permission input of all adders 38. With this pulse in adders 38, the numbers k 1 or lk stored in their registers are added, where k and l are the left and right boundaries, respectively, of the given range of formation of integer pseudorandom variables and ranks of an ordered sequence of pseudorandom numbers, and the result is output the desired sequence of integer pseudorandom variables lying in a given range.

На фиг. 11 и 12 параметры, характеризующие выборку, имеют следующие значения: n 300, k 1, l 300. Число интервалов разбиения диапазона изменения случайных величин при построении гистограммы p30. Для выборки целочисленных псевдослучайных величин, выработанных моделью прототипа, получены следующие числовые характеристики: диапазон изменения 0-299, 82 числа в этом диапазоне были повторены от двух до четырех раз; оценка среднего значения

Figure 00000001
146,04; оценка стандартного отклонения
Figure 00000002
= 83,4. Для выборки целочисленных псевдослучайных величин, выработанных моделью заявляемого устройства, числовые характеристики имели следующие значения: диапазон изменения 1-300, повторяемость отсутствует; оценка среднего значения
Figure 00000003
150,5; оценка стандартного отклонения
Figure 00000004
= 86,6.In FIG. 11 and 12, the parameters characterizing the sample have the following values: n 300, k 1, l 300. The number of intervals for dividing the range of variation of random variables when plotting the p30 histogram. For the selection of integer pseudorandom values developed by the prototype model, the following numerical characteristics were obtained: the range of change was 0-299, 82 numbers in this range were repeated two to four times; average estimate
Figure 00000001
146.04; standard deviation estimate
Figure 00000002
= 83.4. For a sample of integer pseudorandom values developed by the model of the claimed device, the numerical characteristics had the following values: range of 1-300, the repeatability is absent; average estimate
Figure 00000003
150.5; standard deviation estimate
Figure 00000004
= 86.6.

Теоретические значения математического ожидания mo и стандартного отклонения σо равны соответственно mo 150, σо= 86,1.The theoretical values of the mathematical expectation m o and the standard deviation σ o are respectively m o 150, σ o = 86.1.

На фиг. 13 и 14 приведены графики оценки выборочных автокорреляционных функций r1(i), rм(i) последовательности, выработанных моделью прототипа (фиг. 13) и заявляемого устройства (фиг. 14) соответственно.In FIG. 13 and 14 are graphs of the evaluation of sample autocorrelation functions r 1 (i), r m (i) of the sequence developed by the prototype model (Fig. 13) and the claimed device (Fig. 14), respectively.

Сопоставительный анализ приведенных графических данных и числовых характеристик показывает высокую эффективность заявляемого устройства. Эмпирическая плотность распределения выборки, полученной при помощи заявляемого устройства, а также числовые характеристики практически не отличаются от теоретической равномерной плотности и теоретических числовых характеристик в отличие от эмпирической плотности и числовых характеристик выборки, полученной при помощи модели прототипа. Кроме того, в выборку, полученную согласно заявляемому устройству, дополнительная корреляция не вносится. A comparative analysis of the graphical data and numerical characteristics shows the high efficiency of the claimed device. The empirical density of the distribution of the sample obtained using the inventive device, as well as the numerical characteristics practically do not differ from the theoretical uniform density and theoretical numerical characteristics, in contrast to the empirical density and numerical characteristics of the sample obtained using the prototype model. In addition, in the sample obtained according to the claimed device, no additional correlation is made.

Таким образом, использование предлагаемого устройства формирования равномерно распределенных целочисленных псевдослучайных величин, лежащих в заданном диапазоне, обеспечивает по сравнению с существующим устройством следующие преимущества. Предлагаемое устройство обеспечивает получение распределенных равномерно целочисленных псевдослучайных величин, лежащих в заданном диапазоне. Нелинейное преобразование, которому подвергается первоначальная выборка распределенных равномерно на интервале (0, 1) величин, а именно упорядочение и одновременное формирование ее рангов как искомой последовательности, позволяет исключить повторяемость величин в заданном диапазоне. Вследствие равновероятного распределения совокупности рангов получают целочисленную выборку, распределенную по равномерному закону, даже если у исходной выборки закон отличается от равномерного. Thus, the use of the proposed device for the formation of uniformly distributed integer pseudorandom values lying in a given range, provides the following advantages compared to the existing device. The proposed device provides a distributed uniformly integer pseudorandom values lying in a given range. The nonlinear transformation to which the initial sample is subjected to the distribution of values uniformly distributed over the interval (0, 1), namely, the ordering and simultaneous formation of its ranks as the desired sequence, eliminates the repeatability of values in a given range. Due to the equally probable distribution of the set of ranks, an integer sample is obtained distributed according to a uniform law, even if the law for the original sample is different from the uniform one.

Claims (1)

УСТРОЙСТВО ДЛЯ ФОРМИРОВАНИЯ РАСПРЕДЕЛЕНИЯ РАВНОМЕРНО ЦЕЛОЧИСЛЕННЫХ ПСЕВДОСЛУЧАЙНЫХ ВЕЛИЧИН, содержащее синхронизатор, узлы сортировки чисел, каждый из которых состоит из первого регистра, элемента И, блока сравнения и первого коммутатора, и два регистра, причем в каждом узле сортировки выход элемента И соединен с входом разрешения считывания первого регистра этого узла сортировки, выход которого подключен к первому входу блока сравнения и к первому информационному входу первого коммутатора, выход первого регистра соединен с информационным входом первого регистра первого узла сортировки, вторыми входами блоков сравнения и вторыми информационными входами первых коммутаторов всех узлов сортировки, выход первого коммутатора каждого узла сортировки, кроме последнего, соединен с информационным входом первого регистра последующего узла сортировки, выход первого коммутатора последнего узла сортировки подключен к информационному входу второго регистра, первый выход синхронизатора соединен с первыми входами элементов И всех узлов сортировки и входом разрешения записи второго регистра, второй и третий выходы синхронизатора подключены соответственно к синхровходу первого регистра и синхровходам блоков сравнения, отличающееся тем, что, с целью расширения класса решаемых задач за счет формирования псевдослучайных величин, лежащих в заданном диапазоне, в него введены генератор равномерно распределенных случайных последовательностей, два регистра, накапливающие сумматоры и в каждый узел сортировки второй регистр и второй коммутатор, причем первый выход генератора равномерно распределенных случайных последовательностей подключен к информационному входу первого регистра, входы разрешения записи и считывания которого подключены к одновременным входам третьего регистра и четвертому и пятому выходам синхронизатора, второй выход которого соединен с синхровходом третьего регистра и синхровходами регистров всех узлов сортировки, второй выход генератора равномерно распределенных случайных последовательностей соединен с информационным входом третьего регистра, выход которого подключен к первым информационным входам вторых коммутаторов и информационному входу второго регистра первого узла сортировки, шестой выход синхронизатора подключен к входам разрешения записи регистров всех узлов сортировки, в каждом узле сортировки выход элемента И соединен со входом разрешения считывания второго регистра своего узла, выход которого подключен к второму информационному входу второго коммутатора, выход блока сравнения соединен с вторым входом элемента И и управляющими входами коммутаторов, выход второго коммутатора каждого узла сортировки, кроме последнего, соединен с информационным входом второго регистра последующего узла сортировки, выход второго коммутатора последнего узла сортировки подключен к информационному входу четвертого регистра, вход разрешения записи и синхровход которого соединены соответственно с первым и седьмым выходами синхронизатора, восьмой выход которого подключен к синхровходам накапливающих сумматоров, информационный вход каждого из которых, кроме последнего, соединен с выходом второго регистра одноименного узла сортировки, выход четвертого регистра подключен к информационному входу последнего сумматора, входы установки которых соединены с входами задания диапазона устройства, а выходы являются выходами устройства. A device for forming a distribution of uniformly integer pseudorandom values, containing a synchronizer, nodes for sorting numbers, each of which consists of a first register, an AND element, a comparison unit and a first switch, and two registers, and in each sorting node the output of the And element is connected to the read permission input the first register of this sorting node, the output of which is connected to the first input of the comparison unit and to the first information input of the first switch, the output of the first register is connected to the information the input of the first register of the first sorting node, the second inputs of the comparison blocks and the second information inputs of the first switches of all sorting nodes, the output of the first switch of each sorting node, except the last, is connected to the information input of the first register of the subsequent sorting node, the output of the first switch of the last sorting node is connected to the information input of the second register, the first output of the synchronizer is connected to the first inputs of the elements AND of all sort nodes and the recording permission input the second register, the second and third outputs of the synchronizer are connected respectively to the sync input of the first register and the sync inputs of the comparison blocks, characterized in that, in order to expand the class of problems to be solved by generating pseudorandom variables lying in a given range, a generator of uniformly distributed random sequences is introduced into it, two registers accumulating adders and in each sorting node a second register and a second switch, the first output of a uniformly distributed random generator of sequences is connected to the information input of the first register, the write and read enable inputs of which are connected to the simultaneous inputs of the third register and the fourth and fifth outputs of the synchronizer, the second output of which is connected to the sync input of the third register and the sync inputs of the registers of all sorting nodes, the second output of the generator of uniformly distributed random sequences is connected with the information input of the third register, the output of which is connected to the first information inputs of the second switch ditch and the information input of the second register of the first sorting node, the sixth output of the synchronizer is connected to the write enable inputs of the registers of all sorting nodes, in each sorting node the output of the And element is connected to the read permission of the second register of its node, the output of which is connected to the second information input of the second switch, the output of the comparison unit is connected to the second input of the AND element and the control inputs of the switches, the output of the second switch of each sorting node, except the last, is connected to inf the input of the second register of the subsequent sorting node, the output of the second switch of the last sorting node is connected to the information input of the fourth register, the recording enable input and clock input of which are connected respectively to the first and seventh outputs of the synchronizer, the eighth output of which is connected to the clock inputs of the accumulating adders, the information input of each of which except the last one, it is connected to the output of the second register of the sorting node of the same name, the output of the fourth register is connected to information Nome entry last adder, inputs of which are connected to inputs of reference devices range, and the outputs are the outputs of the device.
SU4866926 1990-09-14 1990-09-14 Device for generation of uniform distribution of random integers RU2042187C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU4866926 RU2042187C1 (en) 1990-09-14 1990-09-14 Device for generation of uniform distribution of random integers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU4866926 RU2042187C1 (en) 1990-09-14 1990-09-14 Device for generation of uniform distribution of random integers

Publications (1)

Publication Number Publication Date
RU2042187C1 true RU2042187C1 (en) 1995-08-20

Family

ID=21536428

Family Applications (1)

Application Number Title Priority Date Filing Date
SU4866926 RU2042187C1 (en) 1990-09-14 1990-09-14 Device for generation of uniform distribution of random integers

Country Status (1)

Country Link
RU (1) RU2042187C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2549524C1 (en) * 2014-06-26 2015-04-27 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Казанский национальный исследовательский технический университет им. А.Н. Туполева-КАИ" (КНИТУ-КАИ) Generator of nonlinear pseudorandom sequences

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР N 1185326, кл. G 06F 7/06, 1984. *
Авторское свидетельство СССР N 1202038, кл. H 03K 3/84, 1984. *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2549524C1 (en) * 2014-06-26 2015-04-27 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Казанский национальный исследовательский технический университет им. А.Н. Туполева-КАИ" (КНИТУ-КАИ) Generator of nonlinear pseudorandom sequences

Similar Documents

Publication Publication Date Title
KR900702473A (en) Neuro computer
US4430722A (en) Method and arrangement for the correlation of two signals
RU2042187C1 (en) Device for generation of uniform distribution of random integers
SU903873A1 (en) Generator of random numbers for simulating general population by objects of a sample
SU888130A1 (en) Index device of quick fourier transform processor
SU1585795A1 (en) Device for determining value of belonging function
SU826346A1 (en) Random pulse generator
SU830377A1 (en) Device for determining maximum number code
SU1716507A1 (en) Generator of random numbers
RU2022353C1 (en) Device for determining complement of a set
SU696442A1 (en) Local extremum determining device
RU2034401C1 (en) Threshold element
SU840887A1 (en) Extremum number determining device
SU378826A1 (en) RANDOM NUMBER GENERATOR
SU1543401A1 (en) Digital function generator
SU417782A1 (en)
SU924672A1 (en) Technical object simulator
SU836633A1 (en) Random number sensor
RU2050585C1 (en) Random process generator
SU1642479A1 (en) Device of determination of random-process characteristics
SU1425631A1 (en) Digital function generator
RU1817106C (en) Device for determining difference of sets
SU807219A1 (en) Device for programme-control of objects
SU1509924A1 (en) Device for modeling queuing systems
RU2084955C1 (en) Device which controls multiple-channel measuring system