SU1259283A1 - Device for determining number of combinations - Google Patents
Device for determining number of combinations Download PDFInfo
- 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
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)
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) |
-
1985
- 1985-04-08 SU SU853882067A patent/SU1259283A1/en active
Non-Patent Citations (1)
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 |