RU2515211C1 - Special-purpose processor for searching for hamiltonian cycles in graphs - Google Patents

Special-purpose processor for searching for hamiltonian cycles in graphs Download PDF

Info

Publication number
RU2515211C1
RU2515211C1 RU2012155957/08A RU2012155957A RU2515211C1 RU 2515211 C1 RU2515211 C1 RU 2515211C1 RU 2012155957/08 A RU2012155957/08 A RU 2012155957/08A RU 2012155957 A RU2012155957 A RU 2012155957A RU 2515211 C1 RU2515211 C1 RU 2515211C1
Authority
RU
Russia
Prior art keywords
input
output
processor
elements
inputs
Prior art date
Application number
RU2012155957/08A
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 RU2012155957/08A priority Critical patent/RU2515211C1/en
Application granted granted Critical
Publication of RU2515211C1 publication Critical patent/RU2515211C1/en

Links

Images

Abstract

FIELD: information technology.
SUBSTANCE: special-purpose processor for searching for Hamiltonian cycles in graphs comprises N identical processor elements, each consisting of a register, 3 multiplexers, a down counter, 9 OR elements, 8 AND elements, 2 groups of AND elements, an RS flip-flop and a D flip-flop, 6 OR elements, 2 groups of OR elements, 5 AND elements, an RS flip-flop and 2 D flip-flops.
EFFECT: faster search for a Hamiltonian cycle in a graph owing to concurrent operation of processor elements and reducing the amount of memory used to a value required to store the vertex-adjacency matrix of the processed graph by querying the memory only for adjacency information of the processed pair of vertices of the graph.
5 dwg

Description

Изобретение относится к вычислительной технике и направлено на построение эффективного спецпроцессора, осуществляющего поиск Гамильтонова цикла в графе, заданном матрицей смежностей, хранящейся в памяти. Для кодирования номеров N вершин графа используется к разрядов, 2k≥N.The invention relates to computer technology and is aimed at constructing an effective special processor that searches for the Hamiltonian cycle in a graph defined by an adjacency matrix stored in memory. To encode the numbers of N vertices of the graph, k bits are used, 2 k ≥N.

Известны вычислительная система и методы для решения задачи коммивояжера, основанные на поиске Гамильтоновых циклов в графах (US 6904421 B2, 07.01.2005).Known computing system and methods for solving the traveling salesman problem, based on the search for Hamiltonian cycles in graphs (US 6904421 B2, 01/07/2005).

Вычислительная система содержит процессор, блоки памяти ОЗУ и ПЗУ, блоки ввода и вывода информации, блок сетевого взаимодействия, резидентные и сменяемые блоки долговременной памяти. Для решения задачи предлагаются быстрые «генетические» алгоритмы, позволяющие получать приближенное решение за ограниченное время.The computing system includes a processor, RAM and ROM memory blocks, information input and output blocks, network interaction block, resident and replaceable long-term memory blocks. To solve the problem, fast “genetic” algorithms are proposed that allow obtaining an approximate solution in a limited time.

Недостатком системы является ее ориентация на получение лишь приближенного решения задачи. При этом программная реализация предложенных методов решения задачи поиска Гамильтоновых циклов не позволяет осуществлять решение задачи с максимальной скоростью.The disadvantage of the system is its orientation toward obtaining only an approximate solution to the problem. Moreover, the software implementation of the proposed methods for solving the search problem for Hamiltonian cycles does not allow solving the problem at maximum speed.

Известна вычислительная система, сконфигурированная для решения с большой скоростью вычислительно сложных NP-полных задач, таких как задача поиска Гамильтоновых циклов в графах, наиболее близкая по своей технической сущности к предлагаемому изобретению и выбранная в качестве прототипа (US 6636840 B1, 21.10.2003).A well-known computing system is configured to solve computationally complex NP-complete problems at high speed, such as the task of finding Hamiltonian cycles in graphs, which is closest in technical essence to the proposed invention and selected as a prototype (US 6636840 B1, 10.21.2003).

Вычислительная система состоит из процессора и памяти. В вычислительной системе исходный граф представлен матрицей смежностей, хранимой в памяти, и эквивалентным представлением исходного графа в виде множества подграфов. Вершины анализируемого пути переупорядочиваются согласно набору правил переупорядочения, а веса ребер в множестве подграфов изменяются согласно набору правил изменения весов ребер.The computing system consists of a processor and memory. In a computing system, the original graph is represented by an adjacency matrix stored in memory and the equivalent representation of the original graph as a set of subgraphs. The vertices of the path under analysis are reordered according to the set of reordering rules, and the weights of the edges in the set of subgraphs change according to the set of rules for changing the weights of the edges.

Недостатком системы является программная реализация предложенной модификации метода точного решения задачи поиска Гамильтоновых циклов, что не позволяет осуществлять решение задачи с максимальной скоростью. Недостатком системы является и повышенный объем памяти, необходимый для реализации предложенного метода, связанный с необходимостью хранения, как матрицы смежности исходного графа, так и множества таблиц генерируемых подграфов.The disadvantage of the system is the software implementation of the proposed modification of the method for the exact solution of the search problem for Hamiltonian cycles, which does not allow solving the problem at maximum speed. A disadvantage of the system is the increased amount of memory required to implement the proposed method, associated with the need to store both the adjacency matrix of the original graph and the many tables of generated subgraphs.

Технический результат изобретения - увеличение скорости решения задачи отыскания Гамильтонова цикла в графе и уменьшение используемого объема памяти до величины, необходимой для хранения матрицы смежностей вершин обрабатываемого графа. Технический результат достигается аппаратурной реализацией предлагаемой модификации метода точного решения задачи. При этом скорость решения задачи повышается за счет параллельной работы процессорных элементов предлагаемого спецпроцессора, реализованного в виде автомата с однофазной системой синхронизации. Каждый процессорный элемент содержит регистр номера вершины и счетчик, имеющий разрядность, равную разрядности упомянутого регистра. Уменьшение используемого объема памяти обусловлено тем, что спецпроцессор обращается в память только за информацией о смежности обрабатываемой пары вершин графа.The technical result of the invention is an increase in the speed of solving the problem of finding the Hamiltonian cycle in a graph and a decrease in the used memory capacity to the value necessary to store the adjacency matrix of the vertices of the processed graph. The technical result is achieved by hardware implementation of the proposed modification of the method of exact solution of the problem. At the same time, the speed of solving the problem increases due to the parallel operation of the processor elements of the proposed special processor, implemented as an automaton with a single-phase synchronization system. Each processor element contains a vertex number register and a counter having a capacity equal to the capacity of the register. The decrease in the used memory size is due to the fact that the special processor accesses the memory only for information about the adjacency of the processed pair of graph nodes.

Технический результат достигается тем, что спецпроцессор для поиска Гамильтоновых циклов в графах содержит N идентичных процессорных элементов, каждый из которых в своем составе имеет k-разрядный регистр, информационный вход которого подключен к выходу k-разрядного первого мультиплексора, первый информационный вход которого подключен к выходу второго k-разрядного мультиплексора, первый элемент «ИЛИ», входы которого соединены с k-1 старшими разрядами второго информационного входа первого мультиплексора; второй и третий элементы «ИЛИ», вход и инверсный вход которых соединены с младшим разрядом второго входа первого мультиплексора, кроме того, входы второго и третьего элементов «ИЛИ» подключены в выходу первого элемента «ИЛИ»; k-разрядный вычитающий счетчик, старшие разряды информационного входа которого соединены с k-1 старшими разрядами второго информационного входа первого мультиплексора, а младший разряд упомянутого входа подключен к выходу третьего элемента «ИЛИ»; четвертый элемент «ИЛИ», выходы которого подключены к разрядам выхода счетчика, а выход соединен с установочным входом первого RS триггера, входом первого элемента «И» и входом пятого элемента «ИЛИ», инверсный выход которого соединен с входом сброса первого RS триггера и входом второго элемента «И» другой вход которого подключен к выходу первого RS триггера, а выход соединен с первыми входами шестого и седьмого элементов «ИЛИ», в свою очередь выход первого элемента «И» соединен с вторым входом шестого элемента «ИЛИ», входом разрешения счетчика и первым информационным входом третьего мультиплексора, выход которого соединен с вторым входом седьмого элемента «ИЛИ», выход которого соединен с входом третьего элемента «И», другой вход которого подключен к выходу второго элемента «ИЛИ», а выход которого соединен с управляющим входом второго мультиплексора и первым входом восьмого элемента «ИЛИ», выход которого соединен с первым входом четвертого элемента «И», выход которого соединен с входом разрешения синхронной записи регистра, при этом управляющий вход асинхронной записи регистра и управляющий вход первого мультиплексора соединены с входом асинхронного сброса счетчика; пятый элемент «И», вход которого соединен с вторым информационным входом третьего мультиплексора, инверсный вход соединен с управляющим входом упомянутого мультиплексора, а выход соединен с информационным входом первого D триггера, входом синхронной загрузки счетчика и первым входом девятого элемента «ИЛИ», второй вход которого соединен с входом синхронного сброса счетчика; шестой элемент «И», входы которого соединены с управляющим входом третьего мультиплексора и выходом первого D триггера, а инверсный выход соединен с входом седьмого элемента «И», другой вход которого соединен с входом пятого элемента «ИЛИ» и третьим входом шестого элемента «ИЛИ», а инверсный выход соединен с входом первого элемента «И»; восьмой элемент «И», входы которого подключены к выходам второго и шестого элементов «ИЛИ»; первую и вторую группы элементов «И», первые входы которых одновременно подключены к соответствующим разрядами выхода регистра, при этом все вторые входы элементов «И» первой группы подключены к выходу первого элемента «И»; при этом на вторые информационные входы первых мультиплексоров каждого процессорного элемента заведены k-разрядные индивидуальные константные значения от «0» до «N-1», задающие нумерацию процессорных элементов от «0» до «N-1»; на первый информационный вход второго мультиплексора процессорного элемента с номером «N-1» заведено нулевое значение, а каждый первый информационный вход соответствующего мультиплексора других процессорных элементов подключен к выходу регистра процессорного элемента, имеющего следующий (больший) номер; на вторые информационные входы вторых мультиплексоров процессорных элементов, имеющих минимальный и максимальный номер, заведено нулевое значение, а второй информационный вход второго мультиплексора других процессорных элементов подключен к выходу регистра процессорного элемента, имеющего минимальный номер; вторые входы восьмого и девятого элементов «ИЛИ» процессорного элемента, имеющего максимальный номер, подключены к потенциалу логического нуля, а каждые вторые входы упомянутых элементов «ИЛИ» остальных процессорных элементов подключены к выходам восьмого и девятого элементов «ИЛИ» процессорного элемента, имеющего следующий номер; все вторые входы элементов «И» второй группы процессорного элемента, имеющего максимальный номер, подключены к выходу первого элемента «И» процессорного элемента, имеющего минимальный номер, а все вторые входы упомянутой группы элементов «И», как и вторые входы третьего мультиплексора каждого из остальных процессорных элементов, подключены к выходу первого элемента «И» процессорного элемента, имеющего следующий номер; третий вход шестого элемента «ИЛИ» процессорного элемента, имеющего минимальный номер, обнулен, а каждый третий вход упомянутого элемента «ИЛИ» остальных процессорных элементов подключен к выходу восьмого элемента «И» процессорного элемента, имеющего предыдущий номер; выходы регистров всех процессорных элементов вместе составляют первый Nk-разрядный выход спецпроцессора; кроме того, спецпроцессор содержит десятый элемент «ИЛИ», вторые D и RS триггеры, первый вход, информационный вход и вход синхронного сброса которых соединены и являются управляющим входом спецпроцессора, второй вход десятого элемента «ИЛИ» подключен выходу второго RS триггера, а выход соединен с входами асинхронного сброса счетчиков всех процессорных элементов, выход второго триггера соединен с вторым информационным входом третьего мультиплексора процессорного элемента, имеющего максимальный номер, и с инверсным входом девятого элемента «И», вход которого является информационным входом спецпроцессора, а выход соединен с управляющим входом третьего мультиплексора всех процессорных элементов и первыми входами десятого элемента «И», одиннадцатого и двенадцатого элементов «ИЛИ»; третий D триггер, информационный вход которого подключен к выходу десятого элемента «И», а выход соединен с вторым входом одиннадцатого элемента «ИЛИ», инверсный выход которого соединен с первым входом одиннадцатого элемента «И», выход которого соединен с входом синхронной установки второго RS триггера и является вторым выходом спецпроцессора, а второй вход, как и второй вход двенадцатого элемента «ИЛИ», подключен к выходу первого элемента «И» процессорного элемента с номером «0», в свою очередь второй вход десятого элемента «И» подключен к выходу первого элемента «И» процессорного элемента с номером «1»; тринадцатый элемент «ИЛИ», инверсный выход которого соединен с третьим входом двенадцатого элемента «ИЛИ», а входы подключены к выходам первых элементов «И» всех процессорных элементов, кроме процессорного элемента с номером «0»; двенадцатый элемент «И», входы которого подключены к инверсным выходам четырнадцатого и пятнадцатого элементов «ИЛИ», причем инверсный выход пятнадцатого элемента «ИЛИ», одновременно, является третьим выходом спецпроцессора, а входы упомянутого элемента подключены к выходам четвертых элементов «ИЛИ» каждого из процессорных элементов, в свою очередь входы четырнадцатого элемента «ИЛИ» подключены к выходам вторых элементов «И» всех процессорных элементов, за исключением процессорных элементов, имеющих максимальный и минимальный номер; тринадцатый элемент «И», входы которого подключены к выходу и инверсному выходу двенадцатых элементов «ИЛИ» и «И» соответственно, а выход соединен с вторыми входами четвертых элементов «И» каждого из процессорных элементов, кроме процессорного элемента, имеющего максимальный номер; первую и вторую группы элементов «ИЛИ», входы каждого из которых подключены к выходу соответствующего элемента «И» первой или второй, соответственно, группы в каждом процессорном элементе, а выходы являются k-разрядными четвертым и пятым выходами спецпроцессора; причем входы синхронизации всех триггеров, регистров и счетчиков спецпроцессора подключены к входу опорной частоты.The technical result is achieved by the fact that the special processor for searching Hamiltonian cycles in graphs contains N identical processor elements, each of which has a k-bit register in its composition, the information input of which is connected to the output of the k-bit first multiplexer, the first information input of which is connected to the output the second k-bit multiplexer, the first OR element, the inputs of which are connected to the k-1 high-order bits of the second information input of the first multiplexer; the second and third elements "OR", the input and inverse input of which are connected to the least significant bit of the second input of the first multiplexer, in addition, the inputs of the second and third elements "OR" are connected to the output of the first element "OR"; a k-bit subtracting counter, the upper bits of the information input of which are connected to the k-1 high bits of the second information input of the first multiplexer, and the least significant bit of the input is connected to the output of the third OR element; the fourth OR element, the outputs of which are connected to the bits of the counter output, and the output is connected to the installation input of the first RS trigger, the input of the first AND element and the input of the fifth OR element, the inverse output of which is connected to the reset input of the first RS trigger and the input of the second AND element, another input of which is connected to the output of the first RS trigger, and the output is connected to the first inputs of the sixth and seventh OR elements, in turn, the output of the first AND element is connected to the second input of the sixth OR element, permission input counter and the first information input of the third multiplexer, the output of which is connected to the second input of the seventh OR element, the output of which is connected to the input of the third AND element, the other input of which is connected to the output of the second OR element, and the output of which is connected to the control input the second multiplexer and the first input of the eighth element "OR", the output of which is connected to the first input of the fourth element "AND", the output of which is connected to the enable input of the synchronous write register, while the control input of the asynchronous write p Giustra and the control input of the first multiplexer connected to the asynchronous reset input of the counter; the fifth element "AND", the input of which is connected to the second information input of the third multiplexer, the inverse input is connected to the control input of the said multiplexer, and the output is connected to the information input of the first D trigger, the input of the counter synchronous download and the first input of the ninth element "OR", the second input which is connected to the input of the synchronous counter reset; the sixth element "AND", the inputs of which are connected to the control input of the third multiplexer and the output of the first D trigger, and the inverse output is connected to the input of the seventh element "AND", the other input of which is connected to the input of the fifth element "OR" and the third input of the sixth element "OR" ", And the inverse output is connected to the input of the first element" AND "; the eighth AND element, the inputs of which are connected to the outputs of the second and sixth OR elements; the first and second groups of “And” elements, the first inputs of which are simultaneously connected to the corresponding bits of the register output, while all the second inputs of the “And” elements of the first group are connected to the output of the first “And” element; at the same time, k-bit individual constant values from “0” to “N-1” are entered into the second information inputs of the first multiplexers of each processor element, specifying the numbering of processor elements from “0” to “N-1”; a zero value is set to the first information input of the second multiplexer of the processor element with the number "N-1", and each first information input of the corresponding multiplexer of other processor elements is connected to the output of the processor element register having the next (larger) number; the second information inputs of the second multiplexers of the processor elements having the minimum and maximum number are set to zero, and the second information input of the second multiplexer of the other processor elements is connected to the output of the register of the processor element having the minimum number; the second inputs of the eighth and ninth OR elements of the processor element having the maximum number are connected to a potential of logical zero, and every second inputs of the said OR elements of the remaining processor elements are connected to the outputs of the eighth and ninth OR elements of the processor element having the next number ; all the second inputs of the “And” elements of the second group of the processor element having the maximum number are connected to the output of the first “And” element of the processor element having the minimum number, and all the second inputs of the said group of “And” elements, as well as the second inputs of the third multiplexer of each the remaining processor elements are connected to the output of the first AND element of the processor element having the next number; the third input of the sixth OR element of the processor element having the minimum number is reset, and every third input of the said OR element of the remaining processor elements is connected to the output of the eighth AND element of the processor element having the previous number; the outputs of the registers of all processor elements together make up the first Nk-bit output of the special processor; in addition, the special processor contains the tenth element “OR”, the second D and RS triggers, the first input, the information input and the synchronous reset input of which are connected and are the control input of the special processor, the second input of the tenth element “OR” is connected to the output of the second RS trigger, and the output is connected with the inputs of the asynchronous reset of the counters of all the processor elements, the output of the second trigger is connected to the second information input of the third multiplexer of the processor element having the maximum number, and with the inverse input of the ninth element that “I”, whose input is the information input of the special processor, and the output is connected to the control input of the third multiplexer of all processor elements and the first inputs of the tenth element “AND”, the eleventh and twelfth elements “OR”; the third D trigger, the information input of which is connected to the output of the tenth element “AND”, and the output is connected to the second input of the eleventh element “OR”, the inverse output of which is connected to the first input of the eleventh element “AND”, the output of which is connected to the synchronous input of the second RS the trigger is the second output of the special processor, and the second input, like the second input of the twelfth element “OR”, is connected to the output of the first element “AND” of the processor element with the number “0”, in turn, the second input of the tenth element “AND” is connected to the output of the first element "AND" processing element with a number "1"; the thirteenth element "OR", the inverse output of which is connected to the third input of the twelfth element "OR", and the inputs are connected to the outputs of the first elements "AND" of all processor elements, except for the processor element with the number "0"; the twelfth element "AND", the inputs of which are connected to the inverse outputs of the fourteenth and fifteenth elements "OR", the inverse output of the fifteenth element "OR", at the same time, is the third output of the special processor, and the inputs of the said element are connected to the outputs of the fourth elements "OR" of each processor elements, in turn, the inputs of the fourteenth OR element are connected to the outputs of the second AND elements of all processor elements, with the exception of processor elements having the maximum and minimum p; the thirteenth element “AND”, the inputs of which are connected to the output and inverse output of the twelfth elements “OR” and “AND”, respectively, and the output is connected to the second inputs of the fourth elements “AND” of each of the processor elements, except for the processor element having the maximum number; the first and second groups of OR elements, the inputs of each of which are connected to the output of the corresponding AND element of the first or second, respectively, groups in each processor element, and the outputs are k-bit fourth and fifth outputs of the special processor; moreover, the synchronization inputs of all the triggers, registers and counters of the special processor are connected to the input of the reference frequency.

На фиг.1 приведена схема процессорного элемента спецпроцессора.Figure 1 shows a diagram of a processor element of a special processor.

На фиг.2 представлена общая схема спецпроцессора для поиска Гамильтоновых циклов в графах.Figure 2 presents the General scheme of a special processor for finding Hamiltonian cycles in graphs.

На фиг.3 представлена схема соединения спецпроцессора с памятью, содержащей матрицу смежностей графа и другими блоками.Figure 3 presents the connection diagram of the special processor with a memory containing a matrix of adjacencies of the graph and other blocks.

На фиг.4 представлены примеры графов, для каждого из которых приведено количество тактов, затраченных спецпроцессором на обработку.Figure 4 presents examples of graphs, for each of which the number of clock cycles spent by a special processor on processing is given.

На фиг.5 приведена временная диаграмма, иллюстрирующая работу спецпроцессора.Figure 5 shows a timing diagram illustrating the operation of the special processor.

Предлагаемый спецпроцессор для поиска Гамильтоновых циклов в графах содержит N идентичных процессорных элементов, каждый из которых в своем составе имеет k-разрядный регистр 1, информационный вход которого подключен к выходу k-разрядного первого мультиплексора 2, первый информационный вход которого подключен к выходу второго k-разрядного мультиплексора 3, первый элемент «ИЛИ» 4, входы которого соединены с k-1 старшими разрядами второго информационного входа первого мультиплексора 2; второй 5 и третий 6 элементы «ИЛИ», вход и инверсный вход которых соединены с младшим разрядом второго входа первого мультиплексора 2, кроме того, входы второго 5 и третьего 6 элементов «ИЛИ» подключены в выходу первого элемента «ИЛИ» 4; k-разрядный вычитающий счетчик 7, старшие разряды информационного входа которого соединены с k-1 старшими разрядами второго информационного входа первого мультиплексора 2, а младший разряд упомянутого входа подключен к выходу третьего элемента «ИЛИ» 6; четвертый элемент «ИЛИ» 8, выходы которого подключены к разрядам выхода счетчика 7, а выход соединен с установочным входом первого RS триггера 9, входом первого элемента «И» 10 и входом пятого элемента «ИЛИ» 11, инверсный выход которого соединен с входом сброса первого RS триггера 9 и входом второго элемента «И» 12, другой вход которого подключен к выходу первого RS триггера 9, а выход соединен с первыми входами шестого 13 и седьмого 14 элементов «ИЛИ», в свою очередь выход первого элемента «И» 10 соединен с вторым входом шестого элемента «ИЛИ» 13, входом разрешения счетчика 7 и первым информационным входом третьего мультиплексора 15, выход которого соединен с вторым входом седьмого элемента «ИЛИ» 14, выход которого соединен с входом третьего элемента «И» 16, другой вход которого подключен к выходу второго элемента «ИЛИ» 5, а выход которого соединен с управляющим входом второго мультиплексора 3 и первым входом восьмого элемента «ИЛИ» 17, выход которого соединен с первым входом четвертого элемента «И» 18, выход которого соединен с входом разрешения синхронной записи регистра 1, при этом управляющий вход асинхронной записи регистра 1 и управляющий вход первого мультиплексора 2 соединены с входом асинхронного сброса счетчика 7; пятый элемент «И» 19, вход которого соединен с вторым информационным входом третьего мультиплексора 15, инверсный вход соединен с управляющим входом упомянутого мультиплексора 15, а выход соединен с информационным входом первого D триггера 20, входом синхронной загрузки счетчика 7 и первым входом девятого элемента «ИЛИ» 21, второй вход которого соединен с входом синхронного сброса счетчика 7; шестой элемент «И» 22, входы которого соединены с управляющим входом третьего мультиплексора 15 и выходом первого D триггера 20, а инверсный выход соединен с входом седьмого элемента «И» 23, другой вход которого соединен с входом пятого элемента «ИЛИ» 11 и третьим входом шестого элемента «ИЛИ» 13, а инверсный выход соединен с входом первого элемента «И» 10; восьмой элемент «И» 24, входы которого подключены к выходам второго 5 и шестого 13 элементов «ИЛИ»; первую 25 и вторую 26 группы элементов «И», первые входы которых одновременно подключены к соответствующим разрядами выхода регистра 1, при этом все вторые входы элементов «И» первой 25 группы подключены к выходу первого элемента «И» 10; при этом на вторые информационные входы первых мультиплексоров 2 каждого процессорного элемента заведены k-разрядные индивидуальные константные значения от «0» до «N-1», задающие нумерацию процессорных элементов от «0» до «N-1»; на первый информационный вход второго мультиплексора 3 процессорного элемента с номером «N-1» заведено нулевое значение, а каждый первый информационный вход соответствующего мультиплексора других процессорных элементов подключен к выходу регистра 1 процессорного элемента, имеющего следующий (больший) номер; на вторые информационные входы вторых мультиплексоров 3 процессорных элементов, имеющих минимальный и максимальный номер, заведено нулевое значение, а второй информационный вход второго мультиплексора 3 других процессорных элементов подключен к выходу регистра 1 процессорного элемента, имеющего минимальный номер; вторые входы восьмого 17 и девятого 21 элементов «ИЛИ» процессорного элемента, имеющего максимальный номер подключены к потенциалу логического нуля, а каждые вторые входы упомянутых элементов «ИЛИ» остальных процессорных элементов подключены к выходам восьмого 17 и девятого 21 элементов «ИЛИ» процессорного элемента, имеющего следующий номер; все вторые входы элементов «И» второй группы 26 процессорного элемента, имеющего максимальный номер, подключены к выходу первого элемента «И» 10 процессорного элемента, имеющего минимальный номер, а все вторые входы упомянутой группы элементов «И», как и вторые входы третьего мультиплексора 15 каждого из остальных процессорных элементов, подключены к выходу первого элемента «И» 10 процессорного элемента, имеющего следующий номер; третий вход шестого элемента «ИЛИ» 13 процессорного элемента, имеющего минимальный номер, обнулен, а каждый третий вход упомянутого элемента «ИЛИ» остальных процессорных элементов подключен к выходу восьмого элемента «И» 24 процессорного элемента, имеющего предыдущий номер; выходы регистров 1 всех процессорных элементов вместе составляют первый Nk-разрядный выход 27 спецпроцессора; кроме того, спецпроцессор содержит десятый элемент «ИЛИ» 28, вторые D 29 и RS 30 триггеры, первый вход, информационный вход и вход синхронного сброса которых соединены и являются управляющим входом 31 спецпроцессора, второй вход десятого элемента «ИЛИ» 28 подключен выходу второго RS триггера 30, а выход соединен с входами асинхронного сброса счетчиков 7 всех процессорных элементов, выход второго D триггера 29 соединен с вторым информационным входом третьего мультиплексора 15 процессорного элемента, имеющего максимальный номер, и с инверсным входом девятого элемента «И» 32, вход которого является информационным входом 33 спецпроцессора, а выход соединен с управляющим входом третьего мультиплексора 15 всех процессорных элементов и первыми входами десятого элемента «И» 34, одиннадцатого 35 и двенадцатого 36 элементов «ИЛИ»; третий D триггер 37, информационный вход которого подключен к выходу десятого элемента «И» 34, а выход соединен с вторым входом одиннадцатого элемента «ИЛИ» 35, инверсный выход которого соединен с первым входом одиннадцатого элемента «И» 38, выход которого соединен с входом синхронной установки второго RS триггера 30 и является вторым выходом 39 спецпроцессора, а второй вход, как и второй вход двенадцатого элемента «ИЛИ» 36, подключен к выходу первого элемента «И» 10 процессорного элемента с номером «0», в свою очередь второй вход десятого элемента «И» 34 подключен к выходу первого элемента «И» 10 процессорного элемента с номером «1»; тринадцатый элемент «ИЛИ» 40, инверсный выход которого соединен с третьим входом двенадцатого элемента «ИЛИ» 36, а входы подключены к выходам первых элементов «И» 10 всех процессорных элементов, кроме процессорного элемента с номером «0»; двенадцатый элемент «И» 41, входы которого подключены к инверсным выходам четырнадцатого 42 и пятнадцатого 43 элементов «ИЛИ», причем инверсный выход пятнадцатого элемента «ИЛИ» 43, одновременно является третьим выходом 44 спецпроцессора, а входы упомянутого элемента 43 подключены к выходам четвертых элементов «ИЛИ» 8 каждого из процессорных элементов, в свою очередь входы четырнадцатого элемента «ИЛИ» 42 подключены к выходам вторых элементов «И» 12 всех процессорных элементов, за исключением процессорных элементов имеющих максимальный и минимальный номер; тринадцатый элемент «И» 45, входы которого подключены к выходу и инверсному выходу двенадцатых элементов «ИЛИ» 36 и «И» 41 соответственно, а выход соединен с вторыми входами четвертых элементов «И» 18 каждого из процессорных элементов, кроме процессорного элемента, имеющего максимальный номер; первую 46 и вторую 47 группы элементов «ИЛИ», входы каждого из которых подключены к выходу соответствующего элемента «И» первой 25 или второй 26, соответственно, группы в каждом процессорном элементе, а выходы являются k-разрядными четвертым 48 и пятым 49 выходами спецпроцессора; причем входы синхронизации всех триггеров, регистров и счетчиков спецпроцессора подключены к входу 50 опорной частоты.The proposed special processor for searching Hamiltonian cycles in graphs contains N identical processor elements, each of which has a k-bit register 1, the information input of which is connected to the output of the k-bit first multiplexer 2, the first information input of which is connected to the output of the second k- bit multiplexer 3, the first element "OR" 4, the inputs of which are connected to k-1 senior bits of the second information input of the first multiplexer 2; the second 5 and third 6 “OR” elements, the input and inverse input of which are connected to the least significant bit of the second input of the first multiplexer 2, in addition, the inputs of the second 5 and third 6 “OR” elements are connected to the output of the first “OR” 4; k-bit subtracting counter 7, the highest bits of the information input of which are connected to k-1 high bits of the second information input of the first multiplexer 2, and the least significant bit of the input is connected to the output of the third element "OR" 6; the fourth element "OR" 8, the outputs of which are connected to the bits of the output of the counter 7, and the output is connected to the installation input of the first RS trigger 9, the input of the first element "10" and the input of the fifth element "OR" 11, the inverse output of which is connected to the reset input the first RS of the trigger 9 and the input of the second element "AND" 12, the other input of which is connected to the output of the first RS of the trigger 9, and the output is connected to the first inputs of the sixth 13 and seventh 14 of the elements "OR", in turn, the output of the first element "AND" 10 connected to the second input of the sixth element "OR" 13, the input the resolution of the counter 7 and the first information input of the third multiplexer 15, the output of which is connected to the second input of the seventh OR element 14, the output of which is connected to the input of the third AND element 16, the other input of which is connected to the output of the second OR element 5, and the output of which is connected to the control input of the second multiplexer 3 and the first input of the eighth element "OR" 17, the output of which is connected to the first input of the fourth element "AND" 18, the output of which is connected to the enable input of synchronous recording of register 1, while controlling the input asynchronous write register 1 and the control input of the first multiplexer 2 are connected to the input of the asynchronous reset counter 7; the fifth element "And" 19, the input of which is connected to the second information input of the third multiplexer 15, the inverse input is connected to the control input of the aforementioned multiplexer 15, and the output is connected to the information input of the first D trigger 20, the input of the counter synchronous download 7 and the first input of the ninth element " OR ”21, the second input of which is connected to the input of the synchronous reset of the counter 7; the sixth element "And" 22, the inputs of which are connected to the control input of the third multiplexer 15 and the output of the first D trigger 20, and the inverse output is connected to the input of the seventh element "And" 23, the other input of which is connected to the input of the fifth element "OR" 11 and the third the input of the sixth element "OR" 13, and the inverse output is connected to the input of the first element "AND" 10; the eighth element "AND" 24, the inputs of which are connected to the outputs of the second 5 and sixth 13 elements "OR"; the first 25 and second 26 groups of “And” elements, the first inputs of which are simultaneously connected to the corresponding bits of the output of register 1, while all the second inputs of the “And” elements of the first 25 group are connected to the output of the first “And” 10; at the same time, k-bit individual constant values from “0” to “N-1” are entered into the second information inputs of the first multiplexers 2 of each processor element, setting the numbering of processor elements from “0” to “N-1”; at the first information input of the second multiplexer 3 of the processor element with the number "N-1" a zero value is set, and each first information input of the corresponding multiplexer of other processor elements is connected to the output of the register 1 of the processor element having the next (larger) number; the second information inputs of the second multiplexers 3 of the processor elements having the minimum and maximum number are set to zero, and the second information input of the second multiplexer 3 of the other processor elements is connected to the output of the register 1 of the processor element having the minimum number; the second inputs of the eighth 17 and ninth 21 elements of the OR element of the processor element having the maximum number are connected to the potential of logical zero, and every second inputs of the mentioned elements of the OR of the remaining processor elements are connected to the outputs of the eighth 17 and ninth 21 elements of the OR element of the processor element, having the following number; all the second inputs of the “And” elements of the second group 26 of the processor element having the maximum number are connected to the output of the first element “And” 10 of the processor element having the minimum number, and all the second inputs of the said group of elements “And”, as well as the second inputs of the third multiplexer 15 of each of the remaining processor elements are connected to the output of the first AND element 10 of the processor element having the next number; the third input of the sixth OR element 13 of the processor element having the minimum number is zeroed, and every third input of the said OR element of the remaining processor elements is connected to the output of the eighth AND element 24 of the processor element having the previous number; the outputs of registers 1 of all processor elements together make up the first Nk-bit output 27 of the special processor; in addition, the special processor contains the tenth element “OR” 28, the second D 29 and RS 30 triggers, the first input, the information input and the synchronous reset input of which are connected and are the control input 31 of the special processor, the second input of the tenth element “OR” 28 is connected to the output of the second RS of the trigger 30, and the output is connected to the inputs of the asynchronous reset of the counters 7 of all processor elements, the output of the second D of the trigger 29 is connected to the second information input of the third multiplexer 15 of the processor element having the maximum number, and with an inverse input evyatogo element "I" 32, the input of which is a special processor data input 33 and an output connected to a control input of the third multiplexer 15 of processing elements and the first input element of the tenth "AND" 34, 35 of the eleventh and twelfth element 36 "OR"; the third D trigger 37, the information input of which is connected to the output of the tenth element "AND" 34, and the output is connected to the second input of the eleventh element "OR" 35, the inverse output of which is connected to the first input of the eleventh element "AND" 38, the output of which is connected to the input synchronous installation of the second RS trigger 30 and is the second output 39 of the special processor, and the second input, like the second input of the twelfth element "OR" 36, is connected to the output of the first element "And" 10 of the processor element with the number "0", in turn, the second input tenth element "And" 34 is connected to the output of the first element "And" 10 of the processor element with the number "1"; the thirteenth element "OR" 40, the inverse output of which is connected to the third input of the twelfth element "OR" 36, and the inputs are connected to the outputs of the first elements "And" 10 of all processor elements except the processor element with the number "0"; the twelfth element “AND” 41, the inputs of which are connected to the inverse outputs of the fourteenth 42 and the fifteenth 43 elements “OR”, the inverse output of the fifteenth element “OR” 43, is at the same time the third output 44 of the special processor, and the inputs of the said element 43 are connected to the outputs of the fourth elements "OR" 8 of each of the processor elements, in turn, the inputs of the fourteenth element "OR" 42 are connected to the outputs of the second elements "AND" 12 of all processor elements, except for processor elements having a maximum and min personal number; the thirteenth element "AND" 45, the inputs of which are connected to the output and inverse output of the twelfth elements "OR" 36 and "AND" 41, respectively, and the output is connected to the second inputs of the fourth elements "AND" 18 of each of the processor elements, except for the processor element having maximum number; the first 46 and second 47 groups of OR elements, the inputs of each of which are connected to the output of the corresponding AND element of the first 25 or second 26, respectively, of the group in each processor element, and the outputs are k-bit fourth 48 and fifth 49 outputs of the special processor ; moreover, the synchronization inputs of all triggers, registers and counters of the special processor are connected to the input 50 of the reference frequency.

Начало работы инициируется подачей сигнала START (фиг.5) на управляющий вход 31 спецпроцессора. Этот сигнал вызывает запись в регистры 1 физических номеров, константно заведенных на вторые входы первых мультиплексоров 2 процессорных элементов. После окончания сигнала START происходит запись физического номера в счетчик 7 процессорного элемента, имеющего максимальный номер, этот процессорный элемент становится ведущим. Содержимое регистра 1 ведущего процессорного элемента является номером (ROW) строки считываемого из памяти элемента матрицы смежностей графа. Содержимое регистра 1 процессорного элемента, физический номер которого по модулю N меньше на единицу, является номером (COL) столбца считываемого из памяти элемента матрицы смежностей графа. На следующем такте содержимое счетчика 7 ведущего процессорного элемента уменьшается на единицу.The start of operation is initiated by applying the START signal (Fig. 5) to the control input 31 of the special processor. This signal causes a record in registers 1 of physical numbers that are constantly wound up on the second inputs of the first multiplexers 2 of the processor elements. After the end of the START signal, the physical number is recorded in the counter 7 of the processor element having the maximum number, this processor element becomes the leading one. The contents of register 1 of the host processor element is the row number (ROW) of a row of the graph adjacency matrix element read from the memory. The contents of register 1 of the processor element, the physical number of which modulo N is less by one, is the number (COL) of the column of the graph read from the memory element of the adjacency matrix. At the next step, the contents of the counter 7 of the leading processor element is reduced by one.

Первая группа 46 элементов «ИЛИ» вместе с первыми группами 25 элементов «И» процессорных элементов являются информационной частью k-разрядного мультиплексора, посредством которого из номеров вершин записанных в регистрах 1 процессорных элементов на четвертом выходе 48 спецпроцессора, формируется номер (ROW) строки для обращения к матрице смежностей хранимой в памяти. В свою очередь вторая группа 47 элементов «ИЛИ» вместе со вторыми группами 26 элементов «И» процессорных элементов являются информационной частью k-разрядного мультиплексора, посредством которого на пятом выходе 49 спецпроцессора формируется номер (COL) столбца матрицы смежностей.The first group of 46 “OR” elements together with the first groups of 25 “AND” elements of the processor elements are the information part of the k-bit multiplexer, through which from the numbers of the vertices recorded in the registers 1 of the processor elements on the fourth output 48 of the special processor, the row number (ROW) is formed for accessing the adjacency matrix stored in memory. In turn, the second group of 47 “OR” elements together with the second group of 26 “AND” elements of the processor elements are the information part of the k-bit multiplexer, through which the adjacency matrix number (COL) is formed on the fifth output 49 of the special processor.

Если код выбранного элемента матрицы смежности соответствует отсутствию связи между вершинами графа, декодер подает сигнал логической единицы на информационный вход 33 спецпроцессора. Это приводит к тому, что на выходе девятого элемента «И» 32 вырабатывается сигнал BREAK=1, что приводит к циклическому сдвигу содержимого регистров 1 по процессорным элементам, номера которых меньше номера ведущего процессорного элемента. При этом ведущий процессорный элемент сохраняет свой статус. Циклический сдвиг по выбранному подмножеству процессорных элементов организуется при соответствующем управлении вторыми мультиплексорами 3 процессорных элементов.If the code of the selected element of the adjacency matrix corresponds to the absence of communication between the vertices of the graph, the decoder supplies a signal of a logical unit to the information input 33 of the special processor. This leads to the fact that the output of the ninth element "And" 32 produces a signal BREAK = 1, which leads to a cyclic shift of the contents of registers 1 by processor elements, the numbers of which are less than the number of the leading processor element. In this case, the leading processor element retains its status. A cyclic shift along a selected subset of processor elements is organized with appropriate control of the second multiplexers 3 of the processor elements.

Если выбранный элемент матрицы содержит код смежности вершин графа, то осуществляется запись физического номера в счетчик 7 ведомого процессорного элемента, в результате чего он становится ведущим. Исключение составляет процессорный элемент с физическим номером «0» - в его счетчик 7 всегда записывается единица, что достигается посредством первого 4 и третьего 6 элементов «ИЛИ».If the selected matrix element contains an adjacency code for the vertices of the graph, then the physical number is recorded in the counter 7 of the slave processor element, as a result of which it becomes the master. An exception is a processor element with a physical number “0” - a unit is always written in its counter 7, which is achieved by means of the first 4 and third 6 “OR” elements.

В графе DC временной диаграммы, на фиг.5, проиллюстрированы состояния счетчиков 7 процессорных элементов по тактам работы спецпроцессора.In the DC graph of the time diagram, in FIG. 5, the states of the counters 7 of the processor elements according to the clock cycles of the special processor are illustrated.

При однобитной кодировке элементов матрицы смежностей графа, представленной на фиг.3, декодер отсутствия связности вершин является инвертором. В матрице, представленной на фиг.4, отсутствие связности вершин кодируется нулем, а связность единицей.In a single-bit coding of elements of the adjacency matrix of the graph shown in FIG. 3, the decoder for the lack of vertex connectivity is an inverter. In the matrix shown in FIG. 4, the lack of connectivity of the vertices is encoded by zero, and the connectivity by unity.

Выработка единичного уровня сигнала (NEW_H) на втором выходе 39 спецпроцессора свидетельствует об обнаружении Гамильтонова цикла в обрабатываемом графе. Искомый цикл, заданный последовательностью номеров вершин графа, в регистрах 1 процессорных элементов и присутствующих на первом Nk-разрядном выходе 27 спецпроцессора фиксируется в регистре, фиг.3. С Nk-разрядного выхода (HC) этого регистра найденный цикл может быть считан.The development of a single signal level (NEW_H) at the second output 39 of the special processor indicates the detection of the Hamiltonian cycle in the processed graph. The desired cycle specified by the sequence of numbers of the vertices of the graph in the registers 1 of the processor elements and present on the first Nk-bit output 27 of the special processor is fixed in the register, Fig.3. From the Nk-bit output (HC) of this register, the loop found can be read.

Для обеспечения корректности заложенного в спецпроцессор алгоритма перебора вариантов в такте, на котором обнулены выходы первых элементов «И» 10 всех процессорных элементов, выполняется компенсирующий сдвиг по регистрам 1. Этот сдвиг выполняется по процессорным элементам, номера которых меньше номера процессорного элемента, на выходе второго элемента «И» 12 которого в данном такте установлена единица. Состояние выхода упомянутого элемента определяется состояниям первого RS триггера 9 и приоритетной цепочкой, образованной первым 10, седьмым 23, восьмым 24 элементами «И» и шестым элементом «ИЛИ» 13 всех процессорных элементов.To ensure the correctness of the algorithm of enumeration of variants embedded in the special processor in the clock cycle, on which the outputs of the first elements “I” of 10 processor elements are zeroed, a compensating shift by registers 1 is performed. This shift is performed by processor elements, whose numbers are less than the number of the processor element, at the output of the second element "And" 12 which in this measure is set to unit. The output state of the said element is determined by the states of the first RS of trigger 9 and the priority chain formed by the first 10, seventh 23, eighth 24 AND elements and the sixth OR element 13 of all processor elements.

После выполнения корректирующих сдвигов ведущим оказывается младший из процессорных элементов, счетчик 7 которого имеет не нулевое значение.After performing the corrective shifts, the leading one is the youngest of the processor elements, the counter 7 of which has a non-zero value.

Процесс выполнения корректирующих сдвигов на диаграмме (фиг.5) не отражен, поскольку отыскание Гамильтонова цикла произошло раньше, чем такие сдвиги потребуются.The process of performing corrective shifts in the diagram (Fig. 5) is not reflected, since the search for the Hamiltonian cycle occurred earlier than such shifts are required.

Сигналом NEW_H о нахождении Гамильтонова цикла в графе является единичный уровень сигнала на выходе одиннадцатого элемента «И» 38 (являющегося вторым выходом спецпроцессора 39).The signal NEW_H about finding the Hamiltonian cycle in the graph is a single signal level at the output of the eleventh element "And" 38 (which is the second output of the special processor 39).

Исчерпание всех возможных вариантов обхода вершин графа устанавливается обнулением вычитающих счетчиков 7 всех процессорных элементов. При этом на инверсном выходе пятнадцатого элемента «ИЛИ» 43 (являющегося третьим выходом спецпроцессора 44) формируется сигнал END единичного уровня.The exhaustion of all possible options for traversing the vertices of the graph is set by zeroing the subtracting counters 7 of all processor elements. At the same time, at the inverse output of the fifteenth element “OR” 43 (which is the third output of the special processor 44), a unit level signal END is generated.

Состояние выхода упомянутого элемента определяется состояниям первого RS триггера 9 и приоритетной цепочкой, образованной первым 10, седьмым 23, восьмым 24 элементами «И» и шестым элементом «ИЛИ» 13 всех процессорных элементов.The output state of the said element is determined by the states of the first RS of trigger 9 and the priority chain formed by the first 10, seventh 23, eighth 24 AND elements and the sixth OR element 13 of all processor elements.

После выполнения корректирующих сдвигов ведущим оказывается младший из процессорных элементов, счетчик 7 которого имеет не нулевое значение.After performing the corrective shifts, the leading one is the youngest of the processor elements, the counter 7 of which has a non-zero value.

Состояние выхода (СТ) счетчика числа тактов (фиг.3) на момент установления единичного уровня сигнала (END) на третьем выходе 44 спецпроцессора позволяет оценить, как время нахождения Гамильтонова цикла, так и время, за которое спецпроцессор определяет отсутствие искомого цикла в заданном графе.The state of the output (ST) of the counter of the number of ticks (Fig. 3) at the time of establishing the unit signal level (END) at the third output 44 of the special processor allows us to evaluate both the time spent by the Hamiltonian cycle and the time during which the special processor determines the absence of the desired cycle in the given column .

Каждый из представленных на фиг.4 графов A, B, C, D, E, F, G, H отличается от предшествующего добавлением одного ребра. При этом число тактов необходимых для того, чтобы убедиться в отсутствии Гамильтонова цикла, возрастает. Для варианта A имеющего 9 ребер число циклов равно 94 (Time=94), а для варианта G с пятнадцатью ребрами (Time=677).Each of the graphs A, B, C, D, E, F, G, H shown in Fig. 4 differs from the previous one by adding one edge. In this case, the number of clock cycles necessary to verify the absence of the Hamiltonian cycle increases. For variant A having 9 edges, the number of cycles is 94 (Time = 94), and for variant G with fifteen edges (Time = 677).

Вариант H графа, содержащий 16 ребер имеет Гамильтоновы циклы, первым из которых найден цикл HC=76054321, ребра которого выделены. Для отыскания упомянутого цикла потребовалось 10 тактов работы спецпроцессора. Для варианта H приведена таблица смежностей графа.Variant H of a graph containing 16 edges has Hamiltonian cycles, the first of which is the cycle HC = 76054321, whose edges are selected. To find the mentioned cycle, it took 10 clock cycles of the special processor. For option H, a graph adjacency table is provided.

Claims (1)

Спецпроцессор для поиска Гамильтоновых циклов в графах, характеризующийся тем, что содержит N идентичных процессорных элементов, каждый из которых в своем составе имеет k-разрядный регистр 1, информационный вход которого подключен к выходу k-разрядного первого мультиплексора 2, первый информационный вход которого подключен к выходу второго k-разрядного мультиплексора 3, первый элемент «ИЛИ» 4, входы которого соединены с k-1 старшими разрядами второго информационного входа первого мультиплексора 2; второй 5 и третий 6 элементы «ИЛИ», вход и инверсный вход которых соединены с младшим разрядом второго входа первого мультиплексора 2, кроме того, входы второго 5 и третьего 6 элементов «ИЛИ» подключены в выходу первого элемента «ИЛИ» 4; k-разрядный вычитающий счетчик 7, старшие разряды информационного входа которого соединены с k-1 старшими разрядами второго информационного входа первого мультиплексора 2, а младший разряд упомянутого входа подключен к выходу третьего элемента «ИЛИ» 6; четвертый элемент «ИЛИ» 8, выходы которого подключены к разрядам выхода счетчика 7, а выход соединен с установочным входом первого RS триггера 9, входом первого элемента «И» 10 и входом пятого элемента «ИЛИ» 11, инверсный выход которого соединен с входом сброса первого RS триггера 9 и входом второго элемента «И» 12, другой вход которого подключен к выходу первого RS триггера 9, а выход соединен с первыми входами шестого 13 и седьмого 14 элементов «ИЛИ», в свою очередь, выход первого элемента «И» 10 соединен с вторым входом шестого элемента «ИЛИ» 13, входом разрешения счетчика 7 и первым информационным входом третьего мультиплексора 15, выход которого соединен с вторым входом седьмого элемента «ИЛИ» 14, выход которого соединен с входом третьего элемента «И» 16, другой вход которого подключен к выходу второго элемента «ИЛИ» 5, а выход которого соединен с управляющим входом второго мультиплексора 3 и первым входом восьмого элемента «ИЛИ» 17, выход которого соединен с первым входом четвертого элемента «И» 18, выход которого соединен с входом разрешения синхронной записи регистра 1, при этом управляющий вход асинхронной записи регистра 1 и управляющий вход первого мультиплексора 2 соединены с входом асинхронного сброса счетчика 7; пятый элемент «И» 19, вход которого соединен с вторым информационным входом третьего мультиплексора 15, инверсный вход соединен с управляющим входом упомянутого мультиплексора 15, а выход соединен с информационным входом первого D триггера 20, входом синхронной загрузки счетчика 7 и первым входом девятого элемента «ИЛИ» 21, второй вход которого соединен с входом синхронного сброса счетчика 7; шестой элемент «И» 22, входы которого соединены с управляющим входом третьего мультиплексора 15 и выходом первого D триггера 20, а инверсный выход соединен с входом седьмого элемента «И» 23, другой вход которого соединен с входом пятого элемента «ИЛИ» 11 и третьим входом шестого элемента «ИЛИ» 13, а инверсный выход соединен с входом первого элемента «И» 10; восьмой элемент «И» 24, входы которого подключены к выходам второго 5 и шестого 13 элементов «ИЛИ»; первую 25 и вторую 26 группы элементов «И», первые входы которых одновременно подключены к соответствующим разрядам выхода регистра 1, при этом все вторые входы элементов «И» первой 25 группы подключены к выходу первого элемента «И» 10; при этом на вторые информационные входы первых мультиплексоров 2 каждого процессорного элемента заведены k-разрядные индивидуальные константные значения от «0» до «N-1», задающие нумерацию процессорных элементов от «0» до «N-1»; на первый информационный вход второго мультиплексора 3 процессорного элемента с номером «N-1» заведено нулевое значение, а каждый первый информационный вход соответствующего мультиплексора других процессорных элементов подключен к выходу регистра 1 процессорного элемента, имеющего следующий (больший) номер; на вторые информационные входы вторых мультиплексоров 3 процессорных элементов, имеющих минимальный и максимальный номер, заведено нулевое значение, а второй информационный вход второго мультиплексора 3 других процессорных элементов подключен к выходу регистра 1 процессорного элемента, имеющего минимальный номер; вторые входы восьмого 17 и девятого 21 элементов «ИЛИ» процессорного элемента, имеющего максимальный номер, подключены к потенциалу логического нуля, а каждые вторые входы упомянутых элементов «ИЛИ» остальных процессорных элементов подключены к выходам восьмого 17 и девятого 21 элементов «ИЛИ» процессорного элемента, имеющего следующий номер; все вторые входы элементов «И» второй группы 26 процессорного элемента, имеющего максимальный номер, подключены к выходу первого элемента «И» 10 процессорного элемента, имеющего минимальный номер, а все вторые входы упомянутой группы элементов «И», как и вторые входы третьего мультиплексора 15 каждого из остальных процессорных элементов, подключены к выходу первого элемента «И» 10 процессорного элемента, имеющего следующий номер; третий вход шестого элемента «ИЛИ» 13 процессорного элемента, имеющего минимальный номер, обнулен, а каждый третий вход упомянутого элемента «ИЛИ» остальных процессорных элементов подключен к выходу восьмого элемента «И» 24 процессорного элемента, имеющего предыдущий номер; выходы регистров 1 всех процессорных элементов вместе составляют первый Nk-разрядный выход 27 спецпроцессора; кроме того, спецпроцессор содержит десятый элемент «ИЛИ» 28, вторые D 29 и RS 30 триггеры, первый вход, информационный вход и вход синхронного сброса которых соединены и являются управляющим входом 31 спецпроцессора, второй вход десятого элемента «ИЛИ» 28 подключен выходу второго RS триггера 30, а выход соединен с входами асинхронного сброса счетчиков 7 всех процессорных элементов, выход второго D триггера 29 соединен с вторым информационным входом третьего мультиплексора 15 процессорного элемента, имеющего максимальный номер, и с инверсным входом девятого элемента «И» 32, вход которого является информационным входом 33 спецпроцессора, а выход соединен с управляющим входом третьего мультиплексора 15 всех процессорных элементов и первыми входами десятого элемента «И» 34, одиннадцатого 35 и двенадцатого 36 элементов «ИЛИ»; третий D триггер 37, информационный вход которого подключен к выходу десятого элемента «И» 34, а выход соединен с вторым входом одиннадцатого элемента «ИЛИ» 35, инверсный выход которого соединен с первым входом одиннадцатого элемента «И» 38, выход которого соединен с входом синхронной установки второго RS триггера 30 и является вторым выходом 39 спецпроцессора, а второй вход, как и второй вход двенадцатого элемента «ИЛИ» 36, подключен к выходу первого элемента «И» 10 процессорного элемента с номером «0», в свою очередь, второй вход десятого элемента «И» 34 подключен к выходу первого элемента «И» 10 процессорного элемента с номером «1»; тринадцатый элемент «ИЛИ» 40, инверсный выход которого соединен с третьим входом двенадцатого элемента «ИЛИ» 36, а входы подключены к выходам первых элементов «И» 10 всех процессорных элементов, кроме процессорного элемента с номером «0»; двенадцатый элемент «И» 41, входы которого подключены к инверсным выходам четырнадцатого 42 и пятнадцатого 43 элементов «ИЛИ», причем инверсный выход пятнадцатого элемента «ИЛИ» 43 одновременно является третьим выходом 44 спецпроцессора, а входы упомянутого элемента 43 подключены к выходам четвертых элементов «ИЛИ» 8 каждого из процессорных элементов, в свою очередь, входы четырнадцатого элемента «ИЛИ» 42 подключены к выходам вторых элементов «И» 12 всех процессорных элементов за исключением процессорных элементов, имеющих максимальный и минимальный номер; тринадцатый элемент «И» 45, входы которого подключены к выходу и инверсному выходу двенадцатых элементов «ИЛИ» 36 и «И» 41 соответственно, а выход соединен с вторыми входами четвертых элементов «И» 18 каждого из процессорных элементов, кроме процессорного элемента, имеющего максимальный номер; первую 46 и вторую 47 группы элементов «ИЛИ», входы каждого из которых подключены к выходу соответствующего элемента «И» первой 25 или второй 26, соответственно, группы в каждом процессорном элементе, а выходы являются k-разрядными четвертым 48 и пятым 49 выходами спецпроцессора; причем входы синхронизации всех триггеров, регистров и счетчиков спецпроцессора подключены к входу 50 опорной частоты. A special processor for searching Hamiltonian cycles in graphs, characterized in that it contains N identical processor elements, each of which has a k-bit register 1, the information input of which is connected to the output of the k-bit first multiplexer 2, the first information input of which is connected to the output of the second k-bit multiplexer 3, the first element "OR" 4, the inputs of which are connected to k-1 senior bits of the second information input of the first multiplexer 2; the second 5 and third 6 “OR” elements, the input and inverse input of which are connected to the least significant bit of the second input of the first multiplexer 2, in addition, the inputs of the second 5 and third 6 “OR” elements are connected to the output of the first “OR” 4; k-bit subtracting counter 7, the highest bits of the information input of which are connected to k-1 high bits of the second information input of the first multiplexer 2, and the least significant bit of the input is connected to the output of the third element "OR" 6; the fourth element "OR" 8, the outputs of which are connected to the bits of the output of the counter 7, and the output is connected to the installation input of the first RS trigger 9, the input of the first element "10" and the input of the fifth element "OR" 11, the inverse output of which is connected to the reset input the first RS of the trigger 9 and the input of the second element "AND" 12, the other input of which is connected to the output of the first RS of the trigger 9, and the output is connected to the first inputs of the sixth 13 and seventh 14 elements "OR", in turn, the output of the first element "AND" 10 is connected to the second input of the sixth element "OR" 13, the input the resolution of the counter 7 and the first information input of the third multiplexer 15, the output of which is connected to the second input of the seventh OR element 14, the output of which is connected to the input of the third AND element 16, the other input of which is connected to the output of the second OR element 5, and the output of which is connected to the control input of the second multiplexer 3 and the first input of the eighth element "OR" 17, the output of which is connected to the first input of the fourth element "AND" 18, the output of which is connected to the enable input of the synchronous recording of register 1, while controlling conductive asynchronous write input register 1 and the control input of the first multiplexer 2 are connected to the asynchronous reset input of the counter 7; the fifth element "And" 19, the input of which is connected to the second information input of the third multiplexer 15, the inverse input is connected to the control input of the aforementioned multiplexer 15, and the output is connected to the information input of the first D trigger 20, the input of the counter synchronous download 7 and the first input of the ninth element " OR ”21, the second input of which is connected to the input of the synchronous reset of the counter 7; the sixth element "And" 22, the inputs of which are connected to the control input of the third multiplexer 15 and the output of the first D trigger 20, and the inverse output is connected to the input of the seventh element "And" 23, the other input of which is connected to the input of the fifth element "OR" 11 and the third the input of the sixth element "OR" 13, and the inverse output is connected to the input of the first element "AND" 10; the eighth element "AND" 24, the inputs of which are connected to the outputs of the second 5 and sixth 13 elements "OR"; the first 25 and second 26 groups of “And” elements, the first inputs of which are simultaneously connected to the corresponding bits of the output of register 1, while all the second inputs of the “And” elements of the first 25 group are connected to the output of the first “And” 10; at the same time, k-bit individual constant values from “0” to “N-1” are entered into the second information inputs of the first multiplexers 2 of each processor element, setting the numbering of processor elements from “0” to “N-1”; at the first information input of the second multiplexer 3 of the processor element with the number "N-1" a zero value is set, and each first information input of the corresponding multiplexer of other processor elements is connected to the output of the register 1 of the processor element having the next (larger) number; the second information inputs of the second multiplexers 3 of the processor elements having the minimum and maximum number are set to zero, and the second information input of the second multiplexer 3 of the other processor elements is connected to the output of the register 1 of the processor element having the minimum number; the second inputs of the eighth 17 and ninth 21 OR elements of the processor element having the maximum number are connected to the potential of logic zero, and every second inputs of the said OR elements of the remaining processor elements are connected to the outputs of the eighth 17 and ninth 21 OR elements of the processor element having the following number; all the second inputs of the “And” elements of the second group 26 of the processor element having the maximum number are connected to the output of the first element “And” 10 of the processor element having the minimum number, and all the second inputs of the said group of elements “And”, as well as the second inputs of the third multiplexer 15 of each of the remaining processor elements are connected to the output of the first AND element 10 of the processor element having the next number; the third input of the sixth OR element 13 of the processor element having the minimum number is zeroed, and every third input of the said OR element of the remaining processor elements is connected to the output of the eighth AND element 24 of the processor element having the previous number; the outputs of registers 1 of all processor elements together make up the first Nk-bit output 27 of the special processor; in addition, the special processor contains the tenth element “OR” 28, the second D 29 and RS 30 triggers, the first input, the information input and the synchronous reset input of which are connected and are the control input 31 of the special processor, the second input of the tenth element “OR” 28 is connected to the output of the second RS of the trigger 30, and the output is connected to the inputs of the asynchronous reset of the counters 7 of all processor elements, the output of the second D of the trigger 29 is connected to the second information input of the third multiplexer 15 of the processor element having the maximum number, and with an inverse input evyatogo element "I" 32, the input of which is a special processor data input 33 and an output connected to a control input of the third multiplexer 15 of processing elements and the first input element of the tenth "AND" 34, 35 of the eleventh and twelfth element 36 "OR"; the third D trigger 37, the information input of which is connected to the output of the tenth element "AND" 34, and the output is connected to the second input of the eleventh element "OR" 35, the inverse output of which is connected to the first input of the eleventh element "AND" 38, the output of which is connected to the input synchronous installation of the second RS of the trigger 30 and is the second output 39 of the special processor, and the second input, like the second input of the twelfth element "OR" 36, is connected to the output of the first element "AND" 10 of the processor element with the number "0", in turn, the second tenth element input "And" 34 is connected to the output of the first element "And" 10 of the processor element with the number "1"; the thirteenth element "OR" 40, the inverse output of which is connected to the third input of the twelfth element "OR" 36, and the inputs are connected to the outputs of the first elements "And" 10 of all processor elements except the processor element with the number "0"; the twelfth element "AND" 41, the inputs of which are connected to the inverse outputs of the fourteenth 42 and the fifteenth 43 elements "OR", the inverse output of the fifteenth element "OR" 43 is simultaneously the third output 44 of the special processor, and the inputs of the said element 43 are connected to the outputs of the fourth elements " OR ”8 of each of the processor elements, in turn, the inputs of the fourteenth element“ OR ”42 are connected to the outputs of the second elements“ AND ”12 of all processor elements except for processor elements having a maximum and min personal number; the thirteenth element "AND" 45, the inputs of which are connected to the output and inverse output of the twelfth elements "OR" 36 and "AND" 41, respectively, and the output is connected to the second inputs of the fourth elements "AND" 18 of each of the processor elements, except for the processor element having maximum number; the first 46 and second 47 groups of OR elements, the inputs of each of which are connected to the output of the corresponding AND element of the first 25 or second 26, respectively, of the group in each processor element, and the outputs are k-bit fourth 48 and fifth 49 outputs of the special processor ; moreover, the synchronization inputs of all triggers, registers and counters of the special processor are connected to the input 50 of the reference frequency.
RU2012155957/08A 2012-12-24 2012-12-24 Special-purpose processor for searching for hamiltonian cycles in graphs RU2515211C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2012155957/08A RU2515211C1 (en) 2012-12-24 2012-12-24 Special-purpose processor for searching for hamiltonian cycles in graphs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2012155957/08A RU2515211C1 (en) 2012-12-24 2012-12-24 Special-purpose processor for searching for hamiltonian cycles in graphs

Publications (1)

Publication Number Publication Date
RU2515211C1 true RU2515211C1 (en) 2014-05-10

Family

ID=50629740

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2012155957/08A RU2515211C1 (en) 2012-12-24 2012-12-24 Special-purpose processor for searching for hamiltonian cycles in graphs

Country Status (1)

Country Link
RU (1) RU2515211C1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SU304605A1 (en) * А. Г. Тимошенко , Э. Трайнин Институт кибернетики Украинской ССР MODELING DEVICE FOR DETERMINATION ON THE HAMILTON CYCLE COUNT
SU1705841A1 (en) * 1990-03-05 1992-01-15 Харьковское Высшее Военное Командно-Инженерное Училище Ракетных Войск Им.Маршала Советского Союза Крылова Н.И. Graph-based problems solver
US6636840B1 (en) * 1998-01-13 2003-10-21 International Intellectual Group, Inc. Computer system configured in support of solving NP-complete problems at high speed
US6904421B2 (en) * 2001-04-26 2005-06-07 Honeywell International Inc. Methods for solving the traveling salesman problem

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SU304605A1 (en) * А. Г. Тимошенко , Э. Трайнин Институт кибернетики Украинской ССР MODELING DEVICE FOR DETERMINATION ON THE HAMILTON CYCLE COUNT
SU1705841A1 (en) * 1990-03-05 1992-01-15 Харьковское Высшее Военное Командно-Инженерное Училище Ракетных Войск Им.Маршала Советского Союза Крылова Н.И. Graph-based problems solver
US6636840B1 (en) * 1998-01-13 2003-10-21 International Intellectual Group, Inc. Computer system configured in support of solving NP-complete problems at high speed
US6904421B2 (en) * 2001-04-26 2005-06-07 Honeywell International Inc. Methods for solving the traveling salesman problem

Similar Documents

Publication Publication Date Title
US8094157B1 (en) Performing an occurence count of radices
Yao et al. An efficient graph accelerator with parallel data conflict management
Ediger et al. Massive streaming data analytics: A case study with clustering coefficients
US9009447B2 (en) Acceleration of string comparisons using vector instructions
US7689541B1 (en) Reordering data using a series of offsets
Dhulipala et al. Sage: Parallel semi-asymmetric graph algorithms for NVRAMs
Kaplan et al. RASSA: resistive prealignment accelerator for approximate DNA long read mapping
US20200090051A1 (en) Optimization problem operation method and apparatus
Zhang et al. cuBLASTP: Fine-grained parallelization of protein sequence search on a GPU
Zhang et al. cublastp: Fine-grained parallelization of protein sequence search on cpu+ gpu
US11107187B2 (en) Graph upscaling method for preserving graph properties
BR112021010345A2 (en) Language and compiler that generate synchronous digital circuits that maintain a chain execution order
JP2019536146A (en) Programmable clock monitor
Ekim et al. A randomized parallel algorithm for efficiently finding near-optimal universal hitting sets
US7624107B1 (en) Radix sort algorithm for graphics processing units
Liu et al. GPU-accelerated BWT construction for large collection of short reads
Guo et al. GPU-accelerated critical path generation with path constraints
Johnston et al. In situ data analytics and indexing of protein trajectories
Nagasaka et al. Cache-aware sparse matrix formats for Kepler GPU
Saavedra et al. Mining discriminative k-mers in DNA sequences using sketches and hardware acceleration
CN107632779B (en) Data processing method and device and server
Zhang et al. muBLASTP: database-indexed protein sequence search on multicore CPUs
RU2515211C1 (en) Special-purpose processor for searching for hamiltonian cycles in graphs
CN112435157A (en) Graphics processing system including different types of memory devices and method of operating the same
Satish et al. Mapreduce based parallel suffix tree construction for human genome

Legal Events

Date Code Title Description
MM4A The patent is invalid due to non-payment of fees

Effective date: 20181225