SU1259283A1 - Device for determining number of combinations - Google Patents

Device for determining number of combinations Download PDF

Info

Publication number
SU1259283A1
SU1259283A1 SU853882067A SU3882067A SU1259283A1 SU 1259283 A1 SU1259283 A1 SU 1259283A1 SU 853882067 A SU853882067 A SU 853882067A SU 3882067 A SU3882067 A SU 3882067A SU 1259283 A1 SU1259283 A1 SU 1259283A1
Authority
SU
USSR - Soviet Union
Prior art keywords
elements
output
block
input
inputs
Prior art date
Application number
SU853882067A
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 SU853882067A priority Critical patent/SU1259283A1/en
Application granted granted Critical
Publication of SU1259283A1 publication Critical patent/SU1259283A1/en

Links

Landscapes

  • Manipulation Of Pulses (AREA)

Abstract

Изобретение относитс  к вычислительной технике и может быть использовано в устройствах, рев1ающих комбинаторные задачи, св занные с вычислением числа сочетаний. Целью изобретени   вл етс  повьшение быстродействи  устройства. Устройство содержит блок 13 сравнени , блок I8 делени , блок 23 умножени , блок 10 вычитани , четыре регистра 2,5, 20, 27, счетчик 12, генератор тактовых импульсов 4, шесть элементов задержки 3,7,8,15,22,26, дес ть блоков элементов И 6,9,11,14,16,17,19,21, 24,25 дл  передачи информации, вход 1 пуска, входы 29,30 и выход 28 устройства . 2 ил. (Л The invention relates to computing and can be used in devices revolving combinatorial tasks related to the calculation of the number of combinations. The aim of the invention is to increase the speed of the device. The device contains a comparison unit 13, a division I8 unit, a multiplication unit 23, a subtraction unit 10, four registers 2.5, 20, 27, a counter 12, a clock generator 4, six delay elements 3.7, 8, 15, 22, 26 , ten blocks of elements And 6,9,11,14,16,17,19,21, 24,25 for transmitting information, start 1 input, inputs 29.30 and device output 28. 2 Il. (L

Description

Изобретение относитс  к вычисли- тельной технике.The invention relates to computing technology.

Цель изобретени  - повьпиение быстродействи  устройства.The purpose of the invention is to increase the speed of the device.

На фиг.1 приведена схема устройст ва; на фиг.2 - временна  диаграмма его работы.Figure 1 shows the layout of the device; figure 2 - the timing diagram of his work.

Устройство содержит вход 1 пуска, регистр 2, элемент 3 задержки, генератор 4 тактовых импульсов, регистр 5, блок 6 элементов И, элемент 7 задержки , элемент 8 задержки, блок 9 элементов И, блок 10 вычитани , блок 11 элементов И, счетчик 12, блок 13 сравнени , блок 14 элементов И, элемент 15 задержки, блок 6 элементов И, блок 17 элементов И, блок 18 делени , блок 19 элементов И, регистр 20, блок 21 элементов И, элемент 22 задержки, блок 23 умножени , блок 24 элементов И, блок 25 элементов И, элемент 26 задержки, регистр 27, выход 28 и входы 29 и 30. устройства .The device contains input 1 start, register 2, delay element 3, generator 4 clock pulses, register 5, block 6 elements And, element 7 delay, element 8 delay, block 9 elements And, block 10 subtraction, block 11 elements And, counter 12 , comparison unit 13, AND block 14, delay element 15, AND block 6, And block 17, division block 18, AND block 19, register 20, And block 21, delay element 22, multiplication block 23, block 24 And elements, block 25 And elements, delay element 26, register 27, output 28 and inputs 29 and 30. devices.

Дл  вычислени  числа сочетаний С из К по п используетс  итеративный метод, основанный на вычислении на каждой итерации до п включительно произведени To calculate the number of combinations of C from K, an iterative method is used, based on the calculation at each iteration up to n inclusive

(f; - 1) К - (,м- 1)(f; - 1) K - (, m - 1)

,JJ

€f1- ,€ f1-,

текущее состо ние счетчика -и итерации, таким образомj, the current state of the counter, and iteration, thus j,

пP

пP

1 one

K.i.liii)K.i.liii)

ii

где П - знак произведени .where P is the sign of the product.

Перед началом работы устройства производитс  запись в регистр 2 чис , ла К в двоичном коде, причем 3 fog кГ+ Before the device starts operation, a record is made in the register of 2 numbers, la K in binary code, with 3 fog kg +

.+ , а в регистр 5 - числа в ДвоJH4HOM коде (Jfog п + 1 m). +, and in register 5 - the numbers in the Dual HH4HOM code (Jfog n + 1 m)

Работа устройства начинаетс  по команде Пуск, котора  подаетс  на вход I пуска. По этой кома нде производитс  начальна  установка блока 10 вычитани , блока 18 делени , блока 23 умножени , счетчика 12 и регистра 20 в нулевое состо ние, аThe operation of the device starts on the Start command, which is fed to the I start input. Under this command, the initial installation is made of the subtraction unit 10, the division unit 18, the multiplication unit 23, the counter 12 and the register 20 in the zero state, and

.в регистр 27 записываетс  единица в двоичном коде-. Одновременно сигнал Пуск через элемент 3 задержки, который обеспечивает задержку сигна - ла на врем , необходимое на осуществление начальной установки блоков. in register 27, a one is written in binary code. At the same time, the Start signal via delay element 3, which provides a signal delay for the time required for the initial installation of the blocks

устройства, запускает генератор 4 тактовых импульсов.device starts a 4-clock pulse generator.

Очередной импульс с выхода генератора 4 поступает на счетный вход, счетчика 12, увеличива  его содер- жимое на единицу (первый импульс устанавливает его состо ние равным 1, а п -и - в состо ние, равное п), устанавливает в состо ние €), ПотенThe next pulse from the generator 4 output goes to the counting input of counter 12, increasing its content by one (the first pulse sets its state to 1, and n - to the state equal to n), sets it to €) , Potin

циалы двоичного кода состо ни  счетчика подаютс  на входы соответственно блока 16 элементов И, .блока 17 элементов И и блока 19 элементов И.The binary codes of the counter state code are fed to the inputs of a block of 16 elements AND, a block of 17 elements AND, and a block of 19 elements I.

Одновременно тактовый импульс поступает на входы соответственно элементов 7 и 8 задержки . Сигнал с выхода элемента 7, задержанный в основном на врем  срабатывани  счетчика 12, поступает одновременно на входы, соответственно блоков 6, М, 9 и 17 элементов И и вход элемента 15 задержки. По этому сигналу двоичный код числа AV параллельно подаетс  из регистра 5 через блок 9 элементов И на вход блока 13 .-сравнени , на второй вход которого поступает двоичный код текущего состо ни  счетчика 12 через блок 17 элементов И. .Блок 15 производит, срав- нение двух двоичных чисел. Если сравниваемые числа равны, то блок сравнени  формирует сигнал, ..который , поступа  на вход останова генератора 4, запрещает генерирование тактавьгк импульсов. Если числа не равны, то генератор через врем , определ емое периодом следовани  тактовых импульсов, формирует очередной импульс, и работа устройстваAt the same time, the clock pulse arrives at the inputs of the delay elements 7 and 8, respectively. The output signal from the element 7, which is delayed mainly by the response time of the counter 12, is simultaneously fed to the inputs of blocks 6, M, 9, and 17 of the elements AND and the input of the delay element 15, respectively. By this signal, the binary code of the AV number is in parallel fed from register 5 through block 9 of the elements AND to the input of block 13.-comparison, the second input of which receives the binary code of the current state of counter 12 through block 17 of the elements I. Block 15 produces, compare two binary numbers. If the numbers being compared are equal, then the comparison unit generates a signal, which, entering the stop input of generator 4, prohibits the generation of clock pulses. If the numbers are not equal, then the generator through the time determined by the period of the following clock pulses, forms the next pulse, and the operation of the device

продолжаетс .goes on.

. .

Пусть.числа не равны. Тогда кодLet. Numbers are not equal. Then the code

числа из регистра 2 поступает через блок 6 элe шнтoв И на вход блока , 10 вычитани , на второй вход которого подаетс  двоичный код состо ни  счетчика предьщущей итерации, хранивщийс  в регистре 20 на первой итерации хранилс  О, записанный при начальной установке устройства. Таким образом, на выходе блока вычи.т тани  имеют место потенциалы, соответствующие двоичному коду разности К - f-.j (на первой итерации К-0) . По истечении времени, определ емого длительностью задержки i -го такто- вого импульса элементом 8 задержки, разрешаетс  прохождение двоичного кода состо ни  счетчика I2 с его вы- хода через блок 16 элементов И наThe numbers from register 2 are fed through block 6 of the e-pins to the input of the block, 10 subtraction, to the second input of which the binary code of the previous iteration counter stored in register 20 on the first iteration O is stored, recorded during the initial installation of the device. Thus, at the output of the calculator, there are potentials corresponding to the binary code of the difference K - f-.j (at the first iteration of K-0). After the time determined by the delay time of the i-th clock pulse by the delay element 8, the binary status code of the counter I2 from its output through the block of 16 AND elements

вход регистра 20, где он записываетс . На i -и итерации импульс, задержанный на элементе 15, поступа  на соответствующие входы блоков 14 и 19 элементов И, обеспечивает прохождение через них соответственно с выхода блока вычитани  двоичного кода числа п - С;,, (на первой итерации . К-0) и кода текущего состо ни  счетчика (на первой итерации 1) на входы блока 18 делени . Блок делени  осушествл ет вычисление частногоregister entry 20, where it is recorded. At the i -th and iteration, the pulse delayed on element 15, arriving at the corresponding inputs of blocks 14 and 19 of elements I, allows the number n - C ;, binary block code to pass through them, respectively (at the first iteration. K-0) and the code of the current state of the counter (at the first iteration 1) to the inputs of dividing unit 18. The division unit performs the calculation of the quotient

,„П-Оч , „P-Och

(на первой итерации --).(at the first iteration -).

Одновременно импульс с выхода элемента 15 задержки поступает на вход элемента 22 задержки, где задерживаетс  на врем , определ емое в основном временем срабатывани  блока делени . Сигнал с выхода элемента задержки поступает соответственно на входы блоков 21 и 24 элементов И и вход элемента 26 задержки, разреша  тем самым прохождение на входы блока 23 умножени  с выхода блока делени  двоичного кода числаAt the same time, the pulse from the output of the delay element 15 is fed to the input of the delay element 22, where it is delayed by the time determined mainly by the response time of the dividing unit. The signal from the output of the delay element is fed to the inputs of the blocks 21 and 24 of the elements AND and the input of the delay element 26, thereby allowing passage to the inputs of the multiplication unit 23 from the output of the binary code number divider

- о- about

.„. „

на первой итерации), а сon the first iteration), and with

кода числаcode number

выхода регистра 27exit register 27

на первой итерации). Блок on the first iteration). Block

iумножени  осуществл ет операцию ум; ножени  двух двоичных чисел, резуль- multiplying the mind operation; hackles two binary numbers, the result

„ п-1, -г п хП-о .„P-1, -g p hP-o.

тат которой - f( 1 - наtat which - f (1 - on

(-1(-one

:t1: t1

первом шаге) в двоичном коде поступает через блок 25 элементов И, открытый по сигналу от элемента 26 задерж ки, на вход регистра 27, где записы- ваетс   и хранитс  до следующего шага работы устройства.the first step) in binary code enters through the block of 25 elements AND, opened by a signal from the delay element 26, to the input of the register 27, where it is recorded and stored until the next operation step of the device.

На п-и итерации вычислени  на выходе счетчика 12 образуетс  код . jсосто ни , соответствующий числу С п. В результате блок сравнени  при € п формирует сигнал, который , Поступа  в генератор 4, прекращает формирование тактовых импуль- 50 единен с вторым информационным вхосов . Вместе с этим на п-и Ите рации будут выполнены все действи , описанные дл  ( -и итерации. Таким . образом, в регистре 27 будет накоплено в двоичном коде произведениеOn the n-th iteration of the calculation, a code is formed at the output of the counter 12. The j state corresponding to the C p number. As a result, the comparison unit at € n generates a signal which, Incoming generator 4, stops the formation of clock pulses with the second information inlet streams. At the same time, all actions described for (and iteration) will be performed on Iteratio n. In this way, in register 27 there will be accumulated in binary code the product

с п with n

равное числу сочетаний .из К по п, которое можно сн ть на выход 28 в двоичном параллельном коде,equal to the number of combinations. from K to Claim, which can be removed at output 28 in a binary parallel code,

Claims (1)

5 Формула изобретени 5 claims Устройство дл  определени  числа сочетаний, содержащее первьй регистр ., четыре блока элементов И,A device for determining the number of combinations containing the first register, four blocks of AND elements, 0 элементы задержки, отл и. чающий с   тем, что, с целью повышени  быстродействи , в него введены блок вычитани , блок делени , блок умножени , блок сравнени , счетчик,0 delay elements, ex. so that, in order to improve speed, a subtraction unit, a division unit, a multiplication unit, a comparison unit, a counter, are introduced into it, 5 второй, третий и четвертый регистры, генератор тактовых импульсов и шесть элементов И, причем входы первого и второго регистров  вл ютс  соответственно первым и вторым вхоQ дами установки начальных зна чений устройства, вход пуска которого подключен к установочным входам блока вычитани , блока делени , блока умножени , счетчика, третьего и четвертого регистров и первого элемента задержки , выход которого соединен с входом запуска генератора тактовых импульсов, вход останова которого подключен к выходу блока сравнени , а выход соединен с входами второго и третьего элементов задержки и с счетным входом счетчика, первые входы первого и второго блоков элементов И соединены соответсвенно с выходами разр дов первого и второго регистров, выходы первого и третьего блоков элементов И соединены соответсвенно с первым и вторым информационными входами блока вычита- . ни , выход которого подключен к первым входам четвертого блока элементов И, выход которого подключен к первому информационному входу блока делени , выход п того блока элементов И соединен с информационным входом третьего регистра, выходы второго и шестого блоков элементов И соединены соответственно с первым и вторым В1содами блока сравнени , выход седьмого -блока элементов И со55, the second, third and fourth registers, a clock generator and six AND elements, the inputs of the first and second registers being the first and second inputs of setting the initial values of the device, the start input of which is connected to the installation inputs of the subtractor, dividing unit, block multiplying, the counter, the third and fourth registers and the first delay element, the output of which is connected to the trigger input of the clock generator, the stop input of which is connected to the output of the comparison unit, and the output n with the inputs of the second and third delay elements and with the counting input of the counter, the first inputs of the first and second blocks of elements And are connected respectively to the outputs of the bits of the first and second registers, the outputs of the first and third blocks of elements And are connected respectively to the first and second information inputs of the subtraction unit -. nor, the output of which is connected to the first inputs of the fourth block of elements And, the output of which is connected to the first information input of the division block, the output of the fifth block of elements And is connected to the information input of the third register, the outputs of the second and sixth blocks of elements And are connected respectively to the first and second B1 soda block comparison, the output of the seventh block of elements And so5 00 5five дом блока делени , выход которого подключен к первому входу восьмого блока элементов И, выход которого и выход дев того блока элементов И соединены соответственно с первьш и вторым информационными входами блока умножени , выход которого подключен и первому входу дес тогоthe house of the division block whose output is connected to the first input of the eighth block of elements AND, whose output and output of the ninth block of elements AND are connected respectively to the first and second information inputs of the multiplication unit whose output is connected to the first input of the tenth блока элементов И, выход которого соединен с -информационным входом четвертого регистра, выход которого подключен к выходу устройства и к первому входу дев того блока элемен тов И, выход третьего регистра подключен к первому входу третьего бло ка элементов И, выход счетчика подключен к первому входу п того, шее того и седьмого блоков элементов И, выход второго элемента задержки со единен с вторыми входами первого, второго, третьего и шестого блоковthe block of elements And whose output is connected to the information input of the fourth register, the output of which is connected to the output of the device and to the first input of the ninth block of elements And, the output of the third register is connected to the first input of the third block of elements And, the output of the counter is connected to the first input In addition, the neck of this and the seventh block of elements is And, the output of the second delay element is connected with the second inputs of the first, second, third and sixth blocks 1 -I1 -I CSCS JJ 26 26 Редактор Н.ЛуолаEditor N.Luola Составитель А.Жер.еновCompiled by A. Zher.enov Техред И.Ходанич Корректор А.ЗимокосовTehred I. Khodanich Proofreader A.Zimokosov Заказ 5124/48Тираж 671ПодписноеOrder 5124/48 Circulation 671 Subscription ВНИИПИ Государственного комитета СССРVNIIPI USSR State Committee по делам изобретений и открытий 113035,- Москва, Ж-35, Раушска  наб, , д.4/5for inventions and discoveries 113035, - Moscow, Zh-35, Raushsk nab, 4/5 Производственно-полиграфическое предпри тие, г.Ужгород, ул.Проектна ,4Production and printing company, Uzhgorod, Projecto st., 4 5928359283 элементов И и с входом четвертого элемента задержки, выход которого подключен к вторым входам четвертого и седьмого блоков элементов И и к входу п того элемента задержки, выход которого подключен к вторым вхо дам восьмого и дев того блоков элементов И и к выходу шестого элемента задержки, выход которого подклю- 10 чен к второму входу дес того блока элементов И, выход третьего элемента задержки соединен с вторым входом п того блока элементов И.And elements and with the input of the fourth delay element, the output of which is connected to the second inputs of the fourth and seventh blocks of the And elements and to the input of the fifth delay element, the output of which is connected to the second inputs of the eighth and ninth blocks of And elements and to the output of the sixth delay element the output of which is connected to the second input of the tenth block of elements And, the output of the third delay element is connected to the second input of the fifth block of elements I. Фиг. 2FIG. 2
SU853882067A 1985-04-08 1985-04-08 Device for determining number of combinations SU1259283A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU853882067A SU1259283A1 (en) 1985-04-08 1985-04-08 Device for determining number of combinations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU853882067A SU1259283A1 (en) 1985-04-08 1985-04-08 Device for determining number of combinations

Publications (1)

Publication Number Publication Date
SU1259283A1 true SU1259283A1 (en) 1986-09-23

Family

ID=21172342

Family Applications (1)

Application Number Title Priority Date Filing Date
SU853882067A SU1259283A1 (en) 1985-04-08 1985-04-08 Device for determining number of combinations

Country Status (1)

Country Link
SU (1) SU1259283A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР № 903891, кл. G 06 F 15/31, 1980. Авторское свидетельство СССР № 1140127, кл.С 06 F 15/31, .1983. *

Similar Documents

Publication Publication Date Title
SU1259283A1 (en) Device for determining number of combinations
SU888115A1 (en) Random number sensor
SU1254479A1 (en) Pulse number multiplier
SU448592A1 (en) Device for generating constant weight code
SU1290490A1 (en) Digital variable delay line
SU1116426A1 (en) Device for searching numbers in given range
SU1117645A1 (en) Device for studying transport system model
SU1136149A1 (en) Device for determining difference of two numbers
SU1103226A1 (en) Device for computing square root
SU1633390A1 (en) Device for comparing binary numbers
SU1241232A2 (en) Device for counting number of zeroes in binary code
SU1325471A1 (en) Evenly distributed random number generator
SU1651293A1 (en) Digital data link simulator
SU1324021A1 (en) Device for feeding information in calculator
SU1030797A1 (en) Device for sorting mn-digit numbers
SU385283A1 (en) ANALOG-DIGITAL CORRELATOR
SU1034034A1 (en) Random equaly probable time interval generator
SU970358A1 (en) Device for squaring
SU1315972A1 (en) Dividing device
SU1300459A1 (en) Device for sorting numbers
SU1037258A1 (en) Device for determination of number of ones in binary code
SU1234837A1 (en) Variable priority device with coding address
SU1298906A1 (en) Pulse counter
SU1322262A1 (en) Device for summing n numbers arriving in sequential order
SU1562928A1 (en) Device for determining agrument of periodic functions family