Construction method of hamiltonian cycles with two edges not intersecting on complete josephus cube

CN122470557BActive Publication Date: 2026-10-16THE FIRST AFFILIATED HOSPITAL OF SOOCHOW UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610944467.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-10-16
Estimated Expiration
2046-06-29

AI Technical Summary

Technical Problem

[0005]然而,现有技术中尚缺少一种适用于完整约瑟夫立方体的边不相交哈密顿圈构造方法,特别是缺少一种能够随着网络维数增加而递归生成边不相交哈密顿圈的构造机制

Benefits of technology

[0012] The beneficial effects of this invention are as follows: This application constructs two edge-disjoint Hamiltonian paths in a three-dimensional complete Josephus cube, and employs a recursive construction mechanism combining subgraph copying, deletion of edges in the current dimension C, reconnection of edges in the next dimension C and the next dimension H, and path flipping and splicing during the dimensional expansion process. This allows the edge-disjoint Hamiltonian paths in the low-dimensional complete Josephus cube to expand synchronously with the increase of dimension, thereby constructing two edge-disjoint Hamiltonian cycles in a complete Josephus cube of any target dimension. Compared with schemes that solve high-dimensional Hamiltonian cycles through traversal search or combinatorial optimization, this application does not require redesigning the construction process for different dimensions, and can generate high-dimensional Hamiltonian cycles with a unified recursive rule, reducing construction complexity and improving construction efficiency. At the same time, since there are no common edges between the two obtained Hamiltonian cycles, two independent communication paths can be provided for the complete Josephus cube network. Network connectivity can still be maintained when some links fail, and multi-path parallel transmission can be supported, thereby improving network fault tolerance, reliability, and load balancing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122470557B_ABST
    Figure CN122470557B_ABST
Patent Text Reader

Abstract

The application discloses a method for constructing two edge-disjoint Hamiltonian cycles on a complete Josephus cube, and relates to the technical field of interconnection networks. The method comprises the following steps: firstly, constructing a first Hamiltonian path and a second Hamiltonian path in a three-dimensional complete Josephus cube; then, copying the current-dimensional complete Josephus cube to form a first subgraph and a second subgraph, and adding different binary identification bits in front of the labels of the vertices respectively; deleting the current-dimensional C edges, and establishing a cross-subgraph connection relationship by using the next-dimensional C edges and the next-dimensional H edges; reversing and splicing the paths to form new first and second Hamiltonian paths; recursively executing the dimension expansion construction process until the target dimension is reached; and finally, connecting the heads and tails of the two Hamiltonian paths to form two edge-disjoint Hamiltonian cycles. The method realizes the recursive construction of two edge-disjoint Hamiltonian cycles in a target-dimensional complete Josephus cube.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interconnection network technology, and more specifically to a method for constructing a Hamiltonian cycle on a complete Josephus cube where two edges do not intersect. Background Technology

[0002] High-performance computers typically employ interconnected networks consisting of a large number of processor nodes to achieve inter-node communication. As the scale of parallel computing continues to expand, the probability of network link failures and node failures gradually increases. Therefore, the fault tolerance of the interconnected network becomes an important factor affecting system reliability.

[0003] The Complete Josephus Cube (CJC) is an interconnect network topology designed for high-performance computing environments. This topology adds Josephus edges and complement edges to a traditional cube network, thereby improving network connectivity and communication performance. Due to its regular structure, low network diameter, and good scalability, it is suitable for large-scale parallel computing systems.

[0004] A Hamiltonian cycle can traverse all nodes in a network and form a closed communication path. When multiple edge-disjoint Hamiltonian cycles exist in a network, they do not share edge resources, thus providing multiple independent communication channels for the network. When some links fail, communication can still be maintained using other Hamiltonian cycles. Therefore, edge-disjoint Hamiltonian cycles are one of the important indicators for evaluating the fault tolerance performance of interconnected networks.

[0005] However, existing technologies lack a method for constructing edge-disjoint Hamiltonian cycles applicable to complete Josephus cubes, particularly a mechanism that recursively generates edge-disjoint Hamiltonian cycles as the network dimension increases. Therefore, a method is needed to construct two-edge-disjoint Hamiltonian cycles on a complete Josephus cube, enabling the construction of such cycles in complete Josephus cubes of different dimensions. Summary of the Invention

[0006] The purpose of this invention is to provide a method for constructing non-intersecting Hamiltonian cycles on a complete Josephus cube. Compared with existing technologies, this application first constructs non-intersecting Hamiltonian paths in a three-dimensional complete Josephus cube, and then constructs non-intersecting Hamiltonian cycles in a complete Josephus cube of any target dimension through a recursive dimensional expansion method involving copying subgraphs, deleting edges of the current dimension C, using edges of the next dimension C and the next dimension H to connect across subgraphs, and reversing and splicing paths. This method eliminates the need to design separate Hamiltonian cycle construction schemes for different dimensions, and can complete the construction of Hamiltonian cycles in high-dimensional networks using a unified recursive rule, reducing construction difficulty and improving construction efficiency. Furthermore, the non-intersecting edges of the constructed Hamiltonian cycles provide redundant communication paths for the complete Josephus cube network, improving network fault tolerance, communication reliability, and load balancing capabilities.

[0007] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube, wherein the complete Josephus cube includes edges H, J, and C, and the method includes: Construct the first Hamiltonian path and the second Hamiltonian path in a three-dimensional complete Joseph cube; The current dimension complete Joseph cube is copied to form a first subgraph and a second subgraph, and different binary flag bits are added before the vertex labels in the first subgraph and the second subgraph respectively; The first Hamiltonian path is mapped to the first subgraph and the second subgraph respectively to form the first path corresponding to the first subgraph and the first path corresponding to the second subgraph, and the second Hamiltonian path is mapped to the first subgraph and the second subgraph respectively to form the second path corresponding to the first subgraph and the second path corresponding to the second subgraph. Delete the current dimension C edge in the first and second subgraphs; Connect the vertices in the first subgraph to the corresponding vertices in the second subgraph via the next dimension C edge, and connect the vertices in the second subgraph to the corresponding vertices in the first subgraph via the next dimension H edge, so as to obtain the first path corresponding to the updated first subgraph, the first path corresponding to the updated second subgraph, the second path corresponding to the updated first subgraph, and the second path corresponding to the updated second subgraph, respectively. The first path corresponding to the updated second subgraph is flipped and then connected to the first path corresponding to the updated first subgraph to form a new first Hamiltonian path. The second path corresponding to the updated second subgraph is flipped and then connected to the second path corresponding to the updated first subgraph to form a new second Hamiltonian path. The new first Hamiltonian path and the new second Hamiltonian path are updated to the first Hamiltonian path and the second Hamiltonian path respectively, and the current dimension is increased by one before continuing the dimension expansion process until the target dimension is reached. When the target dimension is reached, the first and last vertices of the first Hamiltonian path are connected to form the first Hamiltonian cycle, and the first and last vertices of the second Hamiltonian path are connected to form the second Hamiltonian cycle, so as to obtain a Hamiltonian cycle in which the two edges do not intersect.

[0008] Secondly, the present invention also provides a device for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube, wherein the complete Josephus cube includes H-edge, J-edge, and C-edge, and the device includes: An initial building block is used to construct the first and second Hamiltonian paths within a complete 3D Joseph cube. The identifier addition module is used to copy the current dimension complete Joseph cube to form a first subgraph and a second subgraph, and add different binary identifier bits before the vertex labels in the first subgraph and the second subgraph respectively; The path mapping module is used to map the first Hamiltonian path to the first subgraph and the second subgraph respectively to form the first path corresponding to the first subgraph and the first path corresponding to the second subgraph, and to map the second Hamiltonian path to the first subgraph and the second subgraph respectively to form the second path corresponding to the first subgraph and the second path corresponding to the second subgraph. The graph edge deletion module is used to delete the current dimension C edge in the first subgraph and the second subgraph; The path update module is used to connect the vertices in the first subgraph to the corresponding vertices in the second subgraph through the next-dimensional C edge, and to connect the vertices in the second subgraph to the corresponding vertices in the first subgraph through the next-dimensional H edge, so as to obtain the first path corresponding to the updated first subgraph, the first path corresponding to the updated second subgraph, the second path corresponding to the updated first subgraph, and the second path corresponding to the updated second subgraph, respectively. The first forming module is used to flip the first path corresponding to the updated second subgraph and connect it with the first path corresponding to the updated first subgraph to form a new first Hamiltonian path. The second forming module is used to flip the second path corresponding to the updated second subgraph and connect it with the second path corresponding to the updated first subgraph to form a new second Hamiltonian path. The dimension increase module is used to update the new first Hamiltonian path and the new second Hamiltonian path to the first Hamiltonian path and the second Hamiltonian path respectively, and then increase the current dimension by one and continue to execute the dimension expansion construction process until the target dimension is reached. The final construction module is used to connect the first and last vertices of the first Hamiltonian path to form the first Hamiltonian cycle when the target dimension is reached, and to connect the first and last vertices of the second Hamiltonian path to form the second Hamiltonian cycle, so as to obtain a Hamiltonian cycle in which the two edges do not intersect.

[0009] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Joseph cube provided in the first aspect.

[0010] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for constructing non-intersecting Hamiltonian cycles on two sides of a complete Josephus cube provided in the first aspect.

[0011] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for constructing non-intersecting Hamiltonian cycles on two sides of a complete Josephus cube provided in the first aspect.

[0012] The beneficial effects of this invention are as follows: This application constructs two edge-disjoint Hamiltonian paths in a three-dimensional complete Josephus cube, and employs a recursive construction mechanism combining subgraph copying, deletion of edges in the current dimension C, reconnection of edges in the next dimension C and the next dimension H, and path flipping and splicing during the dimensional expansion process. This allows the edge-disjoint Hamiltonian paths in the low-dimensional complete Josephus cube to expand synchronously with the increase of dimension, thereby constructing two edge-disjoint Hamiltonian cycles in a complete Josephus cube of any target dimension. Compared with schemes that solve high-dimensional Hamiltonian cycles through traversal search or combinatorial optimization, this application does not require redesigning the construction process for different dimensions, and can generate high-dimensional Hamiltonian cycles with a unified recursive rule, reducing construction complexity and improving construction efficiency. At the same time, since there are no common edges between the two obtained Hamiltonian cycles, two independent communication paths can be provided for the complete Josephus cube network. Network connectivity can still be maintained when some links fail, and multi-path parallel transmission can be supported, thereby improving network fault tolerance, reliability, and load balancing capabilities.

[0013] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of a 3D complete Josephus cube and a 4D complete Josephus cube according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube, according to an embodiment of the present invention. Figure 3 This is a schematic diagram of a Hamiltonian cycle on a complete Josephus cube where two sides do not intersect when n=3, as shown in an embodiment of the present invention. Figure 4 This is a schematic diagram of a device for constructing a Hamiltonian loop on two non-intersecting sides of a complete Josephus cube, according to an embodiment of the present invention. Figure 5 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0015] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] It should be noted that references to "an embodiment," "embodiment," "example embodiment," etc., in this specification refer to the described embodiment including specific features, structures, or characteristics; however, not every embodiment must include these specific features, structures, or characteristics. Furthermore, such expressions do not refer to the same embodiment. Moreover, when describing specific features, structures, or characteristics in conjunction with embodiments, whether or not explicitly described, it is indicated that incorporating such features, structures, or characteristics into other embodiments is within the knowledge of those skilled in the art.

[0017] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0018] To make the scheme of this application easier to understand, we will first introduce the complete Josephus cube and Hamiltonian ring: High-performance computers, also known as supercomputers, are used to perform large-scale scientific and engineering computing tasks. These computer systems solve complex problems that traditional computers cannot handle by integrating multiple processor nodes. The interconnect network is the communication backbone of a high-performance computer, and fault tolerance is crucial to its interconnect network. As the scale of parallel computing systems continues to increase, the probability of node or link failures increases significantly.

[0019] An interconnected network is often represented by an undirected graph. A path is represented by an edge. A path is a sequence of distinct vertices, where every two adjacent vertices are connected by an edge. A path can be written as... For each They all have edges The path contains strip and There are vertices, and all vertices are unique. The two endpoints of the path. and These are called the starting endpoint (start point) and the ending endpoint (end point), respectively, denoted as . and Change an existing path The path obtained by completely reversing the vertex order is called the flipped path of the original path, denoted as . .

[0020] A path with the same starting and ending point is called a cycle, denoted as: A cycle has the same starting and ending points, and all intermediate vertices are distinct. If a path exists that visits every vertex in the graph exactly once, this path is called a Hamiltonian path. In a graph, if a closed path (i.e., the starting and ending points are the same) visits every vertex exactly once (without repeating any vertex except the starting / ending point), this path is called a Hamiltonian cycle.

[0021] A cycle is one of the most classic topologies in interconnected networks. It organizes network nodes into a closed circular structure, providing simplicity, regularity, and strong structural symmetry. Cycles not only support reliable data transmission but are also easy to implement in hardware. In a graph, if multiple Hamiltonian cycles exist, and no two Hamiltonian cycles share a common edge, these Hamiltonian cycles are called edge-disjoint Hamiltonian cycles (EDHCs).

[0022] Disjoint Hamiltonian cycles can provide multiple independent full node traversal paths for the network. When some edges fail, communication can continue through other non-shared Hamiltonian cycles, significantly improving the network's fault tolerance. At the same time, multiple disjoint Hamiltonian cycles can support parallel data transmission on different paths, effectively balancing network load and improving communication efficiency and throughput.

[0023] Complete Josephus Cube ( ) is an enhanced interconnection network topology that significantly improves network connectivity, fault tolerance, and communication performance by adding two special types of edges. For integers An n-dimensional complete Josephus cube ( Each vertex of ) Use one It is represented by a bit-based binary string label. ( ).use and Let m be the consecutive m 1s and 0s to represent the string. The vertex set of the n-dimensional complete Josephus cube is: There are a total of One vertex. edge set ,in: (1) ,in yes The two's complement (one of which is 0 and the other is 1).

[0024] (2) ,in and They are complements of each other.

[0025] (3) ,in and They are complements of each other.

[0026] , and The edges in the equation are called H-edges, J-edges, and C-edges, respectively. It is A regular graph, where each vertex is connected by one J-edge, one C-edge, and... A single H-edge. A 3D complete Josephus cube. and the 4-dimensional complete Joseph Cube like Figure 1 As shown, H-side is represented by a solid black line, J-side by a dashed red line, and C-side by a dashed green line.

[0027] Side Called Dimensional H-edge, Called Vitamin C - edge. And will Defined as Vitamin C - edge.

[0028] Example 1 like Figure 2 The diagram illustrates a method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube. The specific method includes: S101, construct the first Hamiltonian path and the second Hamiltonian path in the three-dimensional complete Joseph cube.

[0029] Both the first and second Hamiltonian paths can independently cover all vertices in the complete 3D Josephus cube, and there are no common edges between the two paths. Furthermore, the first Hamiltonian path includes all 3D C-edges of the complete 3D Josephus cube.

[0030] In this embodiment, the following initial construction method can be adopted: First Hamiltonian path P: P = <000, 111, 110, 001, 101, 010, 011, 100>; Second Hamiltonian path Q: Q = <011, 000, 001, 010, 110, 100, 101, 111>.

[0031] Both Hamiltonian paths described above can individually cover all vertices in a complete 3D Josephus cube, and there are no common edges between the two paths. Furthermore, the first Hamiltonian path contains all 3D C edges of the complete 3D Josephus cube. By employing this initial construction method, two seed Hamiltonian paths satisfying the edge non-intersection condition can be obtained in the complete 3D Josephus cube, providing a foundation for subsequent recursive dimensionality expansion. This avoids re-searching for Hamiltonian structures in higher-dimensional space, significantly reducing construction complexity.

[0032] When the target dimension is greater than three, the dimension expansion construction process begins. The essence of dimension expansion is to recursively generate the next-dimensional complete Josephus cube using the current-dimensional complete Josephus cube, while simultaneously expanding two Hamiltonian paths.

[0033] S102, copy the current dimension complete Josephus cube to form a first subgraph and a second subgraph, and add different binary flag bits before the vertex labels in the first subgraph and the second subgraph respectively.

[0034] The first subgraph is obtained by adding a binary '0' before the vertex label of the current-dimensional complete Josephus cube; the second subgraph is obtained by adding a binary '1' before the vertex label of the current-dimensional complete Josephus cube. Taking the four-dimensional construction as an example, vertex 000 expands to correspond to vertices 0000 and 1000 respectively; vertex 111 expands to correspond to vertices 0111 and 1111 respectively.

[0035] S103, the first Hamiltonian path is mapped to the first subgraph and the second subgraph respectively to form the first path corresponding to the first subgraph and the first path corresponding to the second subgraph, and the second Hamiltonian path is mapped to the first subgraph and the second subgraph respectively to form the second path corresponding to the first subgraph and the second path corresponding to the second subgraph.

[0036] Mapping refers to maintaining the original path vertex visit order while adding corresponding binary flag bits before each vertex label. For example, in the first subgraph, the path is: <0000, 0111, 0110, 0001, 0101, 0010, 0011, 0100>; in the second subgraph, the path is: <1000, 1111, 1110, 1001, 1101, 1010, 1011, 1100>.

[0037] The above mapping operation ensures that the path topology remains consistent before and after dimension expansion, thus enabling the Hamiltonian path to expand synchronously as the network dimension increases.

[0038] S104, delete the current dimension C edge in the first and second subgraphs.

[0039] Here, the current dimension C edge refers to the C edge in the corresponding dimension before this round of dimensional expansion. For example, when expanding from three dimensions to four dimensions, the three-dimensional C edge is deleted; when expanding from four dimensions to five dimensions, the four-dimensional C edge is deleted. The purpose of deleting the current dimension C edge is to break the original local closed structure and reserve connection positions for subsequent cross-subgraph reconnection.

[0040] S105, connect the vertices in the first subgraph to the corresponding vertices in the second subgraph through the next dimension C edge, and connect the vertices in the second subgraph to the corresponding vertices in the first subgraph through the next dimension H edge, so as to obtain the first path corresponding to the updated first subgraph, the first path corresponding to the updated second subgraph, the second path corresponding to the updated first subgraph, and the second path corresponding to the updated second subgraph, respectively.

[0041] In this context, the corresponding vertices of edge H refer to two vertices whose values ​​are identical except for the newly added binary identifier bit, while the corresponding vertices of edge C refer to two vertices whose values ​​are all different. For example, vertices 0000 and 1000, and vertices 0111 and 1111 of edge H are corresponding vertices, while vertices 0001 and 1110 of edge C are corresponding vertices. By establishing the above cross-subgraph connection relationships, the first path corresponding to the updated first subgraph, the first path corresponding to the updated second subgraph, the second path corresponding to the updated first subgraph, and the second path corresponding to the updated second subgraph can be obtained respectively.

[0042] This step utilizes the current dimension C edge and the current dimension H edge to jointly construct a cross-subgraph connection bridge, so that the paths originally distributed in the two subgraphs can re-form a traversable structure, thereby ensuring that all vertices can still be covered after dimensional expansion and maintaining the non-intersecting edge property.

[0043] After obtaining the updated path, perform a flip and concatenation operation on the path. Path flipping refers to reversing the order in which vertices in the path are visited. For example, the path <1000, 0111, 0110, 1001, 1101, 0010, 0011, 1100> is flipped to <1100, 0011, 0010, 1101, 1001, 0110, 0111, 1000>.

[0044] S106, the first path corresponding to the updated second subgraph is flipped and then connected to the first path corresponding to the updated first subgraph to form a new first Hamiltonian path.

[0045] For example, the new first Hamiltonian path formed during four-dimensional construction is: <0000, 1111, 1110, 0001, 0101, 1010, 1011, 0100, 1100, 0011, 0010, 1101, 1001, 0110, 0111, 1000>.

[0046] Since the connected path passes through all vertices of the expanded complete Josephus cube without any duplicate vertices, it still retains the Hamiltonian path property.

[0047] S107, after flipping the second path in the second subgraph, connect it with the second path in the first subgraph to form a new second Hamiltonian path.

[0048] For example, the new second Hamiltonian path formed during four-dimensional construction is: <0011,0000,0001,0010,0110,0100,0101,0111,1111,1101,1100,1110,1010,1001,1000,1011>.

[0049] Since the two paths use different connection relationships during construction and always keep their edge sets from overlapping, it can be guaranteed that the two Hamiltonian paths formed in the end still satisfy the condition that the edges do not intersect.

[0050] S108, update the new first Hamiltonian path and the new second Hamiltonian path to the first Hamiltonian path and the second Hamiltonian path respectively, and continue to execute the dimension expansion construction process after increasing the current dimension by one until the target dimension is reached.

[0051] Since the two paths inherit the non-intersecting edge property from before the dimension expansion, and different connecting edges are used to splice them during the dimension expansion process, it is possible to ensure that there are no common edges between the two paths.

[0052] At this point, the current dimension is increased by one, and the dimension expansion and construction process continues.

[0053] For example: when the target dimension is 4, the process can stop after one dimension expansion; when the target dimension is 5, the four-dimensional construction result is used as the new current dimension complete Josephus cube, and the copying, reconnection, flipping and splicing process is repeated; when the target dimension is n, the above steps are recursively executed until the current dimension reaches n.

[0054] Using this recursive mechanism, the three-dimensional seed structure can be progressively expanded to any target dimension.

[0055] Compared to designing separate Hamiltonian cycle construction schemes for different dimensions, this embodiment establishes a unified recursive construction framework, which makes the construction process have good regularity and dimensional expansion capability.

[0056] S109, When the target dimension is reached, connect the first and last vertices of the first Hamiltonian path to form the first Hamiltonian cycle, and connect the first and last vertices of the second Hamiltonian path to form the second Hamiltonian cycle, so as to obtain a Hamiltonian cycle in which the two edges do not intersect.

[0057] Among them, the first-to-last connection refers to forming a closed-loop structure by using the legal connecting edges that exist between the first vertex and the last vertex.

[0058] For example, in a complete three-dimensional Josephus cube: the first Hamiltonian path P, when connected end to end, forms the first Hamiltonian cycle; the second Hamiltonian path Q, when connected end to end, forms the second Hamiltonian cycle.

[0059] In higher dimensions, the same head-to-tail connection method is used to form a closed loop. This ultimately yields a Hamiltonian cycle with two non-intersecting edges.

[0060] Since both Hamiltonian cycles cover all vertices of the target-dimensional complete Josephus cube and have no common edges, they can provide two independent communication paths for the complete Josephus cube interconnection network. When some communication links fail, the other Hamiltonian cycle can still be used to complete inter-node communication, thereby improving the network's fault tolerance and communication reliability. At the same time, the two non-intersecting Hamiltonian cycles can also support parallel data transmission on different paths, improving network throughput and load balancing capabilities.

[0061] Example 2 The method in this invention can be applied to any integer. ,exist Dimensionally complete Joseph Cube Construct two non-intersecting Hamiltonian cycles. Dimensionally complete Joseph Cube The process of constructing a Hamiltonian cycle with two disjoint edges is as follows: (1) Let ,exist Dimensionally complete Joseph Cube China is constructing two Hamilton Roads: =<000,111, 110, 001, 101, 010, 011, 100> and =<011, 000, 001, 010, 110, 100, 101,111> makes Include All C-edges, where , , as well as .if and If they are equal, then the two Hamiltonian paths required are completed, and the process jumps to step (8); otherwise, step (2) is executed.

[0062] (2) Make a copy And by adding a 0 before the label of each vertex, the resulting graph is denoted as . At the same time, two new Hamilton Roads will be obtained. and , making , , as well as ; (3) Make another copy And by adding 1 before the label of each vertex, the resulting graph is denoted as . At the same time, two new Hamilton Roads will be obtained. and , making , , as well as ; (4) Remove and All of them Vitamin C-side, and will Each point in the passage is accessed through a... Vitamin C-edge connected to The corresponding point in the middle, and at the same time Each point in the passage is accessed through a... H-edge connected to The corresponding point in the middle; (5) Path Invert, denoted as ;connect and A new Hamilton Road was obtained , making and ; (6) Path Invert, denoted as ;connect and A new Hamilton Road was obtained , making and ; (7) Order ;if and If they are equal, then the two Hamiltonian paths required are completed, and we jump to step (8); otherwise, we jump to step (2).

[0063] (8) of and Connect them. of and Connecting them together forms a Hamiltonian cycle with two non-intersecting edges. and .

[0064] Example 3 To demonstrate the effectiveness of the method in this application, one can use... Let's take an example to illustrate.

[0065] When n=3, obtain the path =<000, 111, 110, 001, 101, 010, 011, 100> and =<011,000, 001, 010, 110, 100, 101, 111>. This will... of and Connect them. of and Connecting them, two Hamiltonian cycles can be formed, such as Figure 3 As shown: <000, 111, 110, 001, 101, 010, 011, 100> and <011, 000, 001, 010, 110,100, 101, 111>.

[0066] When n=4, (1) let ,exist Dimensionally complete Joseph Cube China is constructing two Hamilton Roads: =<000, 111, 110, 001, 101, 010, 011, 100> and =<011, 000, 001, 010, 110, 100,101, 111>.

[0067] (2) Make a copy And by adding a 0 before the label of each vertex, the resulting graph is denoted as . At the same time, two new Hamilton Roads will be obtained. <0000, 0111, 0110, 0001, 0101,0010,0011, 0100> and <0011, 0000, 0001, 0010, 0110, 0100, 0101, 0111>.

[0068] (3) Make another copy And by adding 1 before the label of each vertex, the resulting graph is denoted as . At the same time, two new Hamilton Roads will be obtained. <1000, 1111, 1110, 1001, 1101, 1010, 1011, 1100> and <1011, 1000, 1001, 1010, 1110, 1100, 1101, 1111>.

[0069] (4) Remove and All of them Vitamin C-side, and will Each point in the passage is accessed through a... Vitamin C-edge connected to The corresponding point in the middle, and at the same time Each point in the passage is accessed through a... H-edge connected to The corresponding point in the middle; at this time, Updated to: <0000, 1111, 1110, 0001, 0101,1010,1011, 0100> and Updated to: <1000, 0111, 0110, 1001, 1101, 0010, 0011, 1100>.

[0070] (5) Path Invert, denoted as <1100,0011,0010,1101,1001,0110,0111,1000>; connection and A new Hamilton Road was obtained <0000, 1111, 1110, 0001, 0101,1010,1011, 0100,1100,0011,0010,1101,1001,0110,0111,1000>, such that and ; (6) Path Invert, denoted as <1111, 1101, 1100, 1110, 1010, 1001, 1000,1011>; connection and A new Hamilton Road was obtained <0011, 0000, 0001, 0010, 0110, 0100, 0101, 0111, 1111, 1101,1100, 1110, 1010, 1001, 1000, 1011>, such that and ; (7) Order =4; then and If they are equal, the two required Hamiltonian paths have been constructed. Proceed to step (8). (8) of and Connect them. of and Connecting them together forms a Hamiltonian cycle with two non-intersecting edges. <0000, 1111, 1110,0001, 0101,1010,1011, 0100,1100,0011,0010, 1101,1001,0110,0111,1000,0000> and <0011, 0000, 0001, 0010, 0110, 0100, 0101, 0111, 1111, 1101, 1100, 1110, 1010, 1001, 1000, 1011, 0011>.

[0071] When n=5, in step (7) above Proceed to step (2).

[0072] (2) Make a copy And by adding a 0 before the label of each vertex, the resulting graph is denoted as . At the same time, two new Hamilton Roads will be obtained. <00000,01111,01110,00001,00101,01010,01011,00100,01100,00011,00010,01101,01001,00110,00111,01000> and <00011,00000,00001,00010,00110,00100,00101,00111,01111,01101,01100, 01110, 01010,01001,01000,01011>, , , as well as ; (3) Make another copy And by adding 1 before the label of each vertex, the resulting graph is denoted as . At the same time, two new Hamilton Roads will be obtained. <10000,11111,11110,10001,10101,11010,11011,10100,11100,10011,10010,11101,11001,10110,10111,11000> and <10011,10000,10001,10010,10110,10100,10101,10111,11111,11101,11100, 11110,11010,11001,11000,11011> , , as well as ; (4) Remove and All of them Vitamin C-side, and will Each point in the passage is accessed through a... Vitamin C-edge connected to The corresponding point in the middle, and at the same time Each point in the passage is accessed through a... H-edge connected to The corresponding point in the middle; at this time, Updated to: <00000,11111,11110,00001,00101,11010,11011,00100,01100,10011,10010,01101,01001,10110,10111,01000> and Updated to: <10000,01111,01110,10001,10101,01010,01011,10100,11100,00011,00010,11101, 11001,00110, 00111,11000>.

[0073] (5) Path Invert, denoted as ;connect and A new Hamilton Road was obtained <00000,11111,11110,00001,00101,11010,11011,00100,01100,10011,10010,01101,01001,10110,10111,01000,11000,00111,00110,11001,11101,00010,00011,11100,10100,01011,01010,10101,10001,01110,01111,10000>, such that and ; (6) Path Invert, denoted as ;connect and A new Hamilton Road was obtained =<00011,00000,00001,00010,00110,00100,00101,00111,01111,01101,01100,01110,01010, 01001, 01000,01011,11011,11000,11001,11010,11110,11100,11101,11111,10111,10101,10100,10110,10010,10001,10000, 10011>, such that and ; (7) Order ;at this time and If they are equal, then the two Hamiltonian paths required are completed, and we jump to step (8); (8) of and Connect them. of and Connecting them together forms a Hamiltonian cycle with two non-intersecting edges. <00000,11111,11110,00001,00101,11010,11011,00100,01100,10011,10010,01101,01001,10110, 10110, 10111,01000,11000,00111,00110,11001,11101,00010,00011,11100,10100,01011,01010,10101,10001,01110,01111,10000,00000> and <00011,00000,00001,00010,00110,00100,00101,00111,01111,01101,01100,01110,01010,01001,01000, 01011,11011,11000,11001,11010,11110,11100,11101,11111,10111,10101,10100,10110,10010,10001,10000, 10011,00011>.

[0074] Based on the same inventive concept, this application also provides an apparatus for constructing non-intersecting Hamiltonian cycles on two sides of a complete Josephus cube, used to implement the above-described method for constructing such cycles. The solution provided by this apparatus is similar to the implementation described in the above-described method. Therefore, the specific limitations of the one or more embodiments of the apparatus for constructing non-intersecting Hamiltonian cycles on two sides of a complete Josephus cube provided below can be found in the limitations of the method for constructing such cycles above, and will not be repeated here.

[0075] In one embodiment, such as Figure 4 As shown, a device for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube is provided, the device comprising: Initial building block 30 is used to construct the first Hamiltonian path and the second Hamiltonian path in a three-dimensional complete Joseph cube; The identifier addition module 31 is used to copy the current dimension complete Joseph cube to form a first subgraph and a second subgraph, and add different binary identifier bits before the vertex labels in the first subgraph and the second subgraph respectively; The path mapping module 32 is used to map the first Hamiltonian path to the first subgraph and the second subgraph respectively to form the first path corresponding to the first subgraph and the first path corresponding to the second subgraph, and to map the second Hamiltonian path to the first subgraph and the second subgraph respectively to form the second path corresponding to the first subgraph and the second path corresponding to the second subgraph. The graph edge deletion module 33 is used to delete the current dimension C edge in the first subgraph and the second subgraph; The path update module 34 is used to connect the vertices in the first subgraph to the corresponding vertices in the second subgraph through the next-dimensional C edge, and to connect the vertices in the second subgraph to the corresponding vertices in the first subgraph through the next-dimensional H edge, so as to obtain the first path corresponding to the updated first subgraph, the first path corresponding to the updated second subgraph, the second path corresponding to the updated first subgraph, and the second path corresponding to the updated second subgraph, respectively. The first forming module 35 is used to flip the first path corresponding to the updated second subgraph and connect it with the first path corresponding to the updated first subgraph to form a new first Hamiltonian path. The second forming module 36 is used to flip the second path corresponding to the updated second subgraph and connect it with the second path corresponding to the updated first subgraph to form a new second Hamiltonian path. The dimension increase module 37 is used to update the new first Hamiltonian path and the new second Hamiltonian path to the first Hamiltonian path and the second Hamiltonian path respectively, and to increase the current dimension by one and continue to execute the dimension expansion construction process until the target dimension is reached. Finally, module 38 is constructed to connect the first and last vertices of the first Hamiltonian path to form a first Hamiltonian cycle when the target dimension is reached, and to connect the first and last vertices of the second Hamiltonian path to form a second Hamiltonian cycle, so as to obtain a Hamiltonian cycle in which the two edges do not intersect.

[0076] This application also provides an electronic device, in some embodiments, referring to... Figure 5 As shown, the electronic device 700 includes an input unit 710, a memory 720, a processor 730, and an output unit 740. The memory 720 stores program instructions that can be executed on the processor 730. The processor 730 can execute the method and / or technical solution for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube based on the foregoing embodiments by calling the program instructions. This electronic device 700 can be a mobile terminal device such as a mobile phone or computer.

[0077] Furthermore, embodiments of this application also provide a computer-readable storage medium for storing a computer program that performs a method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube. For example, computer program instructions, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. The program instructions that invoke the methods of this application may be stored in a fixed or removable storage medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in a storage medium that operates according to the program instructions.

[0078] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0079] The technical features of the above embodiments can be arbitrarily integrated. For the sake of brevity, not all possible integrations of the technical features in the above embodiments are described. However, as long as the integration of these technical features does not contradict each other, they should be considered to be within the scope of this specification.

[0080] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube, characterized in that, The complete Josephus cube is a topology in an interconnected network, and the complete Josephus cube includes H-edges, J-edges, and C-edges. The method includes: Construct the first and second Hamiltonian paths in the three-dimensional complete Josephus cube of the interconnected network; The current dimension complete Joseph cube is copied to form a first subgraph and a second subgraph, and different binary flag bits are added before the vertex labels in the first subgraph and the second subgraph respectively; The first Hamiltonian path is mapped to the first subgraph and the second subgraph respectively to form the first path corresponding to the first subgraph and the first path corresponding to the second subgraph, and the second Hamiltonian path is mapped to the first subgraph and the second subgraph respectively to form the second path corresponding to the first subgraph and the second path corresponding to the second subgraph. Delete the current dimension C edge in the first and second subgraphs; Connect the vertices in the first subgraph to the corresponding vertices in the second subgraph via the next dimension C edge, and connect the vertices in the second subgraph to the corresponding vertices in the first subgraph via the next dimension H edge, so as to obtain the first path corresponding to the updated first subgraph, the first path corresponding to the updated second subgraph, the second path corresponding to the updated first subgraph, and the second path corresponding to the updated second subgraph, respectively. The first path corresponding to the updated second subgraph is flipped and then connected to the first path corresponding to the updated first subgraph to form a new first Hamiltonian path. The second path corresponding to the updated second subgraph is flipped and then connected to the second path corresponding to the updated first subgraph to form a new second Hamiltonian path. The new first Hamiltonian path and the new second Hamiltonian path are updated to the first Hamiltonian path and the second Hamiltonian path respectively, and the current dimension is increased by one before continuing the dimension expansion construction process until the target dimension is reached. When the target dimension is reached, the first and last vertices of the first Hamiltonian path are connected to form the first Hamiltonian cycle, and the first and last vertices of the second Hamiltonian path are connected to form the second Hamiltonian cycle, so as to obtain a Hamiltonian cycle in which the two edges do not intersect.

2. The method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube as described in claim 1, characterized in that, Both the first Hamiltonian path and the second Hamiltonian path can individually cover all vertices in a complete 3D Joseph cube; There is no common edge between the first Hamiltonian path and the second Hamiltonian path.

3. The method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube as described in claim 2, characterized in that, The first Hamiltonian path contains all three-dimensional C edges of the complete three-dimensional Joseph cube.

4. The method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube as described in claim 1, characterized in that, The first subgraph is obtained by adding binary 0 bits before the vertex labels of the current dimension complete Joseph cube; The second subgraph is obtained by adding a binary 1 before the vertex label of the current dimension complete Joseph cube; The first path and the second path corresponding to the first subgraph are obtained by mapping the first Hamiltonian path and the second Hamiltonian path. The first path and the second path corresponding to the second subgraph are obtained by mapping the first Hamiltonian path and the second Hamiltonian path.

5. The method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube as described in claim 4, characterized in that, The corresponding vertex is the vertex in the first subgraph and the second subgraph where all bit values ​​are the same except for the newly added binary identifier bit.

6. The method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Josephus cube as described in claim 5, characterized in that, The path reversal is to reverse the order of vertex visits in the Hamiltonian path. The new first Hamiltonian path is formed by connecting the first path corresponding to the updated first subgraph and the first path corresponding to the flipped and updated second subgraph end to end; The new second Hamiltonian path is formed by connecting the second path corresponding to the updated first subgraph and the second path corresponding to the flipped updated second subgraph end to end.

7. A device for constructing a Hamiltonian loop on two non-intersecting sides of a complete Josephus cube, characterized in that, The complete Josephus cube is a topology in an interconnected network, and the complete Josephus cube includes H-edges, J-edges, and C-edges. The device includes: An initial building block is used to construct the first and second Hamiltonian paths in a three-dimensional complete Josephus cube of an interconnected network. The identifier addition module is used to copy the current dimension complete Joseph cube to form a first subgraph and a second subgraph, and add different binary identifier bits before the vertex labels in the first subgraph and the second subgraph respectively; The path mapping module is used to map the first Hamiltonian path to the first subgraph and the second subgraph respectively to form the first path corresponding to the first subgraph and the first path corresponding to the second subgraph, and to map the second Hamiltonian path to the first subgraph and the second subgraph respectively to form the second path corresponding to the first subgraph and the second path corresponding to the second subgraph. The graph edge deletion module is used to delete the current dimension C edge in the first subgraph and the second subgraph; The path update module is used to connect the vertices in the first subgraph to the corresponding vertices in the second subgraph through the next-dimensional C edge, and to connect the vertices in the second subgraph to the corresponding vertices in the first subgraph through the next-dimensional H edge, so as to obtain the first path corresponding to the updated first subgraph, the first path corresponding to the updated second subgraph, the second path corresponding to the updated first subgraph, and the second path corresponding to the updated second subgraph, respectively. The first forming module is used to flip the first path corresponding to the updated second subgraph and connect it with the first path corresponding to the updated first subgraph to form a new first Hamiltonian path. The second forming module is used to flip the second path corresponding to the updated second subgraph and connect it with the second path corresponding to the updated first subgraph to form a new second Hamiltonian path. The dimension increase module is used to update the new first Hamiltonian path and the new second Hamiltonian path to the first Hamiltonian path and the second Hamiltonian path respectively, and increase the current dimension by one and continue to execute the dimension expansion construction process until the target dimension is reached; The final construction module is used to connect the first and last vertices of the first Hamiltonian path to form a first Hamiltonian cycle and connect the first and last vertices of the second Hamiltonian path to form a second Hamiltonian cycle when the target dimension is reached, so as to obtain a Hamiltonian cycle in which the two edges do not intersect.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method for constructing a Hamiltonian cycle with two non-intersecting sides on a complete Joseph cube as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method for constructing a Hamiltonian cycle with two non-intersecting edges on a complete Joseph cube as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method for constructing a Hamiltonian cycle with two non-intersecting sides on a complete Joseph cube as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Quantum computing method and related device

    CN115545210A

  • Construction method and device of folding hypercube edge-disjoint Hamiltonian ring

    CN122173440A