Path detection device and program

The path detection device uses a QUBO solver to optimize cycle detection in large-scale directed graphs by reducing edges or nodes, addressing the inefficiencies of conventional methods and enhancing detection speed and efficiency.

JP7614934B2Active Publication Date: 2025-01-16KK TOSHIBA +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021077691
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-04-30
Publication Date
2025-01-16
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

Conventional simple cycle detection algorithms for large-scale directed graphs require excessive calculation time and space, making them impractical for real-world applications.

Method used

A path detection device utilizing a QUBO solver to generate and solve optimization problems for strongly connected components in directed graphs, probabilistically excluding edges or nodes to reduce the number of cycles, thereby minimizing calculation time and space.

Benefits of technology

The device efficiently detects simple cycles in large-scale directed graphs with a reduced computational burden, achieving faster and more efficient cycle detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007614934000011
    Figure 0007614934000011
  • Figure 0007614934000012
    Figure 0007614934000012
  • Figure 0007614934000013
    Figure 0007614934000013
Patent Text Reader

Abstract

To detect a specific type of simple cycles included in a digraph.SOLUTION: A path detection device comprises a strongly connected component detection unit, a problem generation unit, a solution acquisition unit, and a simple cycle detection unit. The strongly connected component detection unit detects strongly connected components included in a digraph. The problem generation unit generates a QUBO problem with respect to the strongly connected components. The solution acquisition unit acquires a solution of the QUBO problem with respect to the strongly connected components. The simple cycle detection unit detects a simple cycle included in a subgraph with respect to the strongly connected components. A plurality of decision variables included in an objective function in the QUBO problem correspond to a plurality of nodes or a plurality of edges included in the strongly connected components. The subgraph is a part including two or more nodes or two or more edges selected on the basis of the solution, in the strongly connected components. A QUBO matrix included in the objective function is set so as to minimize the objective function if the subgraph satisfies a preset condition.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] An embodiment of the present invention relates to a path detection device and a program. [Background technology]

[0002] There is a known technology for detecting closed loops contained in a directed graph. The technology for detecting closed loops contained in a directed graph can be used, for example, to detect circular transactions that are subject to auditing in transactions between companies. For example, circular transactions between companies can be detected by generating a directed graph in which companies are nodes and payment relationships are edges, and detecting simple closed loops contained in the generated directed graph.

[0003] A simple cycle detection algorithm is known as a conventional technique for detecting cycles in a directed graph. Conventional simple cycle detection algorithms detect strongly connected components in a directed graph and perform a depth-first search on the detected strongly connected components to detect simple cycles.

[0004] However, conventional simple cycle detection algorithms required O1×((N+E)×(C+1)) calculation time and O2×(N+E) calculation space when the number of nodes in a directed graph is N, the number of edges is E, and the number of simple cycles is C. Therefore, conventional simple cycle detection algorithms were not practical for detecting simple cycles from large-scale directed graphs. [Prior art documents] [Non-patent literature]

[0005] [Non-Patent Document 1] Junko Suzuka, “Detecting circular transactions using graph theory”, Information Sensor Vol. 160 December 2020, P8-11, [Retrieved April 26, 2021], Internet<URL,https: / / www.eyjapan.jp / library / issue / info-sensor / 2020-12-02.html> [Non-Patent Document 2] Johnson, DB, “Finding all the elementary circuits of a directed graph”, SIAM Journal on Computing, 4(1), P77-84, 1975 [Non-Patent Document 3] Tarjan, R., “Depth-first search and linear graph algorithms”, SIAM journal on computing, 1(2), P146-160, 1972 Summary of the Invention [Problem to be solved by the invention]

[0006] An object of the present invention is to provide a path detection device and program capable of detecting a specific type of simple cycle contained in a directed graph with a small calculation time and a small calculation space. [Means for solving the problem]

[0007] A path detection device according to an embodiment detects a simple cycle included in a directed graph. The path detection device includes a strongly connected component detection unit, a problem generation unit, a solution acquisition unit, a simple cycle detection unit, and an output unit. The strongly connected component detection unit detects one or more strongly connected components included in the directed graph. The problem generation unit generates a QUBO problem for each of the one or more strongly connected components. The solution acquisition unit acquires a solution to the QUBO problem for each of the one or more strongly connected components. The simple cycle detection unit detects the simple cycle included in a subgraph for each of the one or more strongly connected components. The output unit outputs information identifying the detected simple cycle. A plurality of decision variables included in an objective function in the QUBO problem correspond to a plurality of nodes or a plurality of edges included in a target strongly connected component of the one or more strongly connected components. The subgraph can be a portion including two or more nodes or two or more edges selected based on the solution in the target strongly connected component. The QUBO matrix included in the objective function is set so that the objective function is minimized when the subgraph satisfies a preset condition. [Brief description of the drawings]

[0008] [Figure 1] 1 is a diagram illustrating a functional configuration of a path detection device according to a first embodiment. [Diagram 2] FIG. 1 is a diagram illustrating an example of a directed graph. [Diagram 3] FIG. 13 is a diagram illustrating an example of a strongly connected component. [Figure 4] FIG. 1 is a diagram showing a first example of a simple cycle. [Diagram 5] FIG. 13 is a diagram showing a second example of a simple cycle. [Figure 6] 4 is a flowchart showing a process of the path detection device according to the first embodiment. [Figure 7] 10 is a flowchart showing a process of a path detection device according to a second embodiment. [Figure 8] FIG. 2 is a diagram illustrating a hardware configuration of a path detection device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] A path detection device 10 according to an embodiment will be described below with reference to the drawings.

[0010] (First embodiment) FIG. 1 is a diagram showing the functional configuration of a path detection device 10 according to the first embodiment.

[0011] The path detection device 10 detects a specific type of simple cycle included in a directed graph with a small calculation time and a small calculation space. In the first embodiment, the path detection device 10 stochastically excludes the number of simple cycles with a small number of edges from among all the simple cycles included in the directed graph, and detects simple cycles with a large number of edges. The path detection device 10 is realized by a processor, a computer, a server, or the like executing a program.

[0012] The path detection device 10 includes a QUBO solver 22, a graph acquisition unit 24, a strongly connected component detection unit 26, a problem generation unit 28, a solution acquisition unit 30, a subgraph generation unit 32, a simple cycle detection unit 34, a repetition control unit 36, and an output unit 38.

[0013] The QUBO solver 22 calculates a solution to a QUBO (Quadratic unconstrained binary optimization) problem. The QUBO solver 22 receives a QUBO problem and outputs a solution to the received QUBO problem. The QUBO solver 22 may output an optimal solution or an approximate solution. The QUBO solver 22 may be a solver that calculates a solution to an Ising problem. The QUBO solver 22 is realized, for example, by a processor or computer that realizes the path detection device 10 executing a solution program for the QUBO problem. The QUBO solver 22 may be provided by a server or the like. In this case, the QUBO solver 22 may be realized outside the path detection device 10. When the QUBO solver 22 is realized outside the path detection device 10, the path detection device 10 gives the QUBO problem to the QUBO solver 22 via a network and obtains the solution from the QUBO solver 22 via the network.

[0014] The graph acquisition unit 24 acquires a directed graph for which a simple cycle is to be detected. The directed graph will be described in further detail below with reference to FIG.

[0015] The strongly connected component detection unit 26 detects one or more strongly connected components included in the obtained directed graph. Strongly connected components will be described in further detail below with reference to FIG.

[0016] The problem generator 28 generates a QUBO problem for each of the one or more strongly connected components detected. A plurality of decision variables included in the objective function of the QUBO problem correspond to a plurality of nodes or a plurality of edges included in a target strongly connected component among one or more strongly connected components. In the first embodiment, a plurality of decision variables in the QUBO problem correspond one-to-one to a plurality of edges included in the target strongly connected component.

[0017] The QUBO matrix included in the objective function in the QUBO problem is set so that the objective function is minimized when the subgraph satisfies a preset condition. The subgraph is a part of the target strongly connected component that includes two or more nodes or two or more edges selected based on the solution of the QUBO problem. In the first embodiment, the QUBO matrix is ​​set so that the objective function is minimized when the sum of the in-degree and out-degree of each of the two or more nodes included in the subgraph is a first set value.

[0018] The solution acquisition unit 30 requests the QUBO problem to be solved by providing the generated QUBO problem for each of one or more strongly connected components to the QUBO solver 22. Then, the solution acquisition unit 30 acquires the solution of the generated QUBO problem for each of one or more strongly connected components from the QUBO solver 22.

[0019] The subgraph generation unit 32 generates a subgraph selected based on the solution of the QUBO problem for each of one or more strongly connected components. More specifically, the subgraph generation unit 32 detects, as a subgraph, a portion of the target strongly connected component that includes two or more nodes or two or more edges corresponding to decision variables whose solution to the QUBO problem is 1. In this embodiment, the subgraph generation unit 32 detects, as a subgraph, a portion of the target strongly connected component that includes two or more edges corresponding to decision variables whose solution to the QUBO problem is 1.

[0020] The simple cycle detection unit 34 detects a simple cycle included in a subgraph for each of one or more strongly connected components. The simple cycle will be described in further detail below with reference to FIGS.

[0021] The repetition control unit 36 ​​repeats the generation of a QUBO problem by the problem generation unit 28, the acquisition of a solution to the QUBO problem by the solution acquisition unit 30, and the generation of a subgraph by the subgraph generation unit 32 for each of one or more strongly connected components, until the number of edges included in the subgraph becomes equal to or less than a predetermined threshold.

[0022] In the second and subsequent QUBO problem generation processes, the iteration control unit 36 ​​generates a new QUBO problem using a new QUBO matrix obtained by modifying the QUBO matrix used in the immediately preceding process. If the number of edges included in the subgraph is equal to or less than a threshold, the iteration control unit 36 ​​ends the iteration process and causes the simple cycle detection unit 34 to detect a simple cycle included in the subgraph. Therefore, the iteration control unit 36 ​​can detect a simple cycle included in a subgraph whose number of edges is equal to or less than a threshold for each of one or more strongly connected components. This allows the iteration control unit 36 ​​to reduce the calculation time and calculation space required to detect a simple path.

[0023] The output unit 38 outputs the detected simple cycles for one or all of the strongly connected components as simple cycles included in the directed graph. The output unit 38 may present the detected simple cycles to a user by displaying them on a display means. The output unit 38 may also transmit the detected simple cycles to an external device via a network.

[0024] 2 is a diagram showing an example of a directed graph. A directed graph is a graph that expresses the connection relationships between multiple nodes using edges with directions. The node on the input side of the edge is called the source node, and the node on the output side of the edge is called the destination node.

[0025] The illustrated directed graph includes five nodes, A, B, C, D, and E. The illustrated directed graph also includes six edges, including an edge from A to B (A→B), an edge from B to C (B→C), an edge from C to A (C→A), an edge from B to D (B→D), an edge from D to A (D→A), and an edge from D to E (D→E).

[0026] 3 is a diagram showing an example of a strongly connected component. A strongly connected component is a graph that is a part of a directed graph, and is a maximal graph that includes a path that allows bidirectional travel between any two nodes.

[0027] As shown in FIG. 3, a strongly connected component included in the illustrated directed graph is a graph including A, B, C, and D. In the graph including A, B, C, and D, when any two nodes among A, B, C, and D are selected, a path that allows bidirectional travel exists. Furthermore, the graph including A, B, C, and D does not become a strongly connected component even if any other node is added. Therefore, the graph including A, B, C, and D is a part of the illustrated directed graph, and is a maximal graph that includes a path that allows bidirectional travel between any two nodes.

[0028] Figure 4 is a diagram showing a first example of a simple cycle. Figure 5 is a diagram showing a second example of a simple cycle. A cycle is a path that starts at any node and returns to the starting node. A simple cycle is a cycle that does not contain duplicate nodes, that is, a path that does not contain two or more identical nodes.

[0029] As shown in Figure 4, one of the simple cycles included in the illustrated directed graph is a path from A to B to C to A. Also, as shown in Figure 5, one of the simple cycles included in the illustrated directed graph is a path from A to B to D to A.

[0030] 6 is a flowchart showing the flow of processing by the path detection device 10 according to the first embodiment. The path detection device 10 executes processing according to the flow shown in FIG.

[0031] First, in S11, the graph acquisition unit 24 acquires a directed graph in which a simple cycle is to be detected.

[0032] For example, the graph acquisition unit 24 acquires information describing a source node and a destination node for each of a plurality of edges included in a directed graph, as shown in Table 1. Note that the graph acquisition unit 24 may acquire a directed graph described in a manner other than the above.

[0033] [Table 1]

[0034] Next, in S12, the strongly connected component detection unit 26 analyzes the obtained directed graph to detect one or more strongly connected components included in the obtained directed graph. As an example, the strongly connected component detection unit 26 can detect strongly connected components from the directed graph using the Tarjan's algorithm shown in Non-Patent Document 3.

[0035] Next, the path detection device 10 executes the processes from S14 to S20 for each of one or more strongly connected components (loop process between S13 and S21).

[0036] In S14, the problem generator 28 generates a QUBO problem for the strongly connected component to which the processes from S14 to S20 are to be executed. In the first embodiment, a plurality of decision variables included in the objective function of the QUBO problem correspond one-to-one to a plurality of edges included in the strongly connected component to which the processes from S14 to S20 are to be executed.

[0037] Next, in S15, the solution acquisition unit 30 provides the generated QUBO problem for the target strongly connected component to the QUBO solver 22 and requests a solution of the QUBO problem. Then, the solution acquisition unit 30 acquires the solution of the generated QUBO problem for the target strongly connected component from the QUBO solver 22.

[0038] Next, in S16, the subgraph generation unit 32 generates a subgraph selected based on the solution of the QUBO problem for the target strongly connected component. More specifically, the subgraph generation unit 32 detects, as a subgraph, a portion of the target strongly connected component that includes two or more nodes or two or more edges corresponding to decision variables whose solution to the QUBO problem is 1. In the first embodiment, the subgraph generation unit 32 detects, as a subgraph, a portion of the target strongly connected component that includes two or more edges corresponding to decision variables whose solution to the QUBO problem is 1 and does not include edges corresponding to decision variables whose solution is 0.

[0039] Here, in the first embodiment, the problem generator 28 generates a function shown in formula (1) as an objective function in the QUBO problem.

number

[0040] E is the number of edges in the target strongly connected component. i and j are integers between 1 and E, and represent the indexes of the edges. i is the decision variable corresponding to the i-th edge of the E edges. j is the decision variable corresponding to the j-th edge among the E edges.

[0041] Q i,j is a coefficient multiplied by the pair of decision variables corresponding to the i-th edge and the j-th edge included in the QUBO matrix.

[0042] In the first embodiment, the QUBO matrix is ​​an E×E square matrix. In the first embodiment, the QUBO matrix is ​​set so that the objective function is minimized when the sum of the input degree and the output degree in each of two or more nodes included in the subgraph is a first set value. The input degree is the number of edges entering a node. The output degree is the number of edges leaving a node.

[0043] In the first embodiment, the coefficient Q i,j is expressed by equation (2).

number

[0044] Q α i,j Q is the first term of the coefficient multiplied by the pair of the decision variable corresponding to the i-th edge and the decision variable corresponding to the j-th edge. source i,j Q is the second term of the coefficient multiplied by the pair of the decision variable corresponding to the i-th edge and the decision variable corresponding to the j-th edge. destination i,j is the third term of the coefficient multiplied to the pair of the decision variable corresponding to the i-th edge and the decision variable corresponding to the j-th edge.

[0045] source i represents the source node of the i-th edge. j represents the source node of the j-th edge. i represents the destination node of the i-th edge. j represents the destination node of the j-th edge.

[0046] In addition, α is a positive real number. For example, the initial value of α is set by a user or the like.

[0047] The first term of the coefficient, Q α i,j represents adding -4α to the diagonal coefficients of the QUBO matrix and adding 0 to the coefficients other than the diagonal coefficients. source i,j represents adding +1 to the coefficient corresponding to the pair of two edges that share the same original edge, and adding 0 to the coefficient corresponding to the pair of two edges that do not share the same original edge. The third term of the coefficient, Q destination i,jrepresents adding +1 to the coefficient corresponding to a pair of two edges that have a common destination edge, and adding 0 to the coefficient corresponding to a pair of two edges that do not have a common destination edge.

[0048] For example, when the question generator 28 executes the formula (2) for the strongly connected components included in the directed graph shown in Table 1, it can generate the QUBO matrix shown in Table 2 below. [Table 2]

[0049] The objective function including the QUBO matrix calculated according to formula (2) is minimized when the values ​​of N decision variables are selected so that the sum of the input degree and the output degree in each of two or more nodes included in the subgraph is 2×α. In other words, the QUBO problem using the objective function including the QUBO matrix calculated according to formula (2) returns a global minimum value in the vicinity where the sum of the input degree and the output degree in each of two or more nodes included in the subgraph is 2×α. Note that 2×α is a value corresponding to the first setting value.

[0050] Therefore, a QUBO problem using an objective function including a QUBO matrix calculated according to formula (2) can return a solution that removes edges from nodes in which the sum of the input degree and the output degree is greater than 2 × α, and leaves edges of nodes in which the sum of the input degree and the output degree is 2 × α or less, among the strongly connected components of interest. Therefore, a QUBO problem using an objective function including a QUBO matrix calculated according to formula (2) can return a solution that selects a subgraph that removes multiple edges and multiple paths with a high probability.

[0051] In addition, the QUBO matrix is ​​not limited to the matrix shown in formula (2) and may be another matrix. For example, the QUBO matrix may be a matrix obtained by multiplying the matrix shown in formula (2) by a coefficient. In addition, the first term of the coefficient in the QUBO matrix, Q α i,jInstead of adding -4α to the coefficients of the diagonal elements of the QUBO matrix, you can add -1×A×α, where A is a positive integer.

[0052] Following S16, in S17, the iteration control unit 36 ​​detects the number of edges in the generated subgraph. Then, in S18, the iteration control unit 36 ​​determines whether the number of edges included in the generated subgraph for the target strongly connected component is equal to or less than a preset threshold. If the number of edges included in the generated subgraph is greater than the threshold (No in S18), the iteration control unit 36 ​​advances the process to S19.

[0053] In S19, the iteration control unit 36 ​​decreases α used in calculating the QUBO matrix by a predetermined amount. After completing S19, the iteration control unit 36 ​​returns the process to S14. Then, the question generator 28 repeats the process from S14.

[0054] The number of edges included in a subgraph is proportional to the total of the sum of the input degree and output degree of a node in the subgraph. Therefore, the number of edges included in a subgraph increases monotonically as α increases. Therefore, the iterative control unit 36 ​​can control the number of edges included in a subgraph to a target value by changing α and repeating the generation of QUBO problems and subgraphs. For example, the iterative control unit 36 ​​can control the number of edges included in a subgraph to a target value by binary search.

[0055] If the number of edges included in the subgraph is equal to or less than the threshold value (Yes in S18), the iteration control unit 36 ​​advances the process to S20.

[0056] In S20, the simple cycle detection unit 34 detects a simple cycle included in a subgraph for each of the target strongly connected components. For example, the simple cycle detection unit 34 detects a simple cycle from the subgraph by a depth-first search process. For example, the simple cycle detection unit 34 can detect a simple cycle included in the subgraph by using Johnson's algorithm described in Non-Patent Document 2.

[0057] In S21, the path detection device 10 judges whether the process from S14 to S20 has been executed for all of one or more strongly connected components. If the process has not been completed for all of one or more strongly connected components, the path detection device 10 executes the process from S14 to S20 for the unexecuted strongly connected components. If the process from S14 to S20 has been completed for all of one or more strongly connected components, the path detection device 10 advances the process to S22.

[0058] In S22, the output unit 38 outputs the simple cycles detected for all of the one or more strongly connected components. Upon completing S22, the path detection device 10 ends this flow.

[0059] The path detection device 10 according to the first embodiment detects partial nodes for one or more strongly connected components included in a directed graph, excluding edges from nodes with a large sum of input degree and output degree, and not excluding edges from nodes with a small sum of input degree and output degree. This allows the path detection device 10 to detect a partial graph from which multiple edges and multiple paths have been removed with a high probability from the directed graph.

[0060] Then, the path detection device 10 detects a simple cycle from such a subgraph. Therefore, the path detection device 10 can detect a simple cycle having a large number of edges included in a directed graph with a short calculation time and a small calculation space.

[0061] Second embodiment Next, a path detection device 10 according to a second embodiment will be described. The path detection device 10 according to the second embodiment detects a specific type of simple cycle included in a directed graph with a small calculation time and a small calculation space. In this embodiment, the path detection device 10 stochastically excludes the number of simple cycles with a large number of edges from among all the multiple simple cycles included in the directed graph, and detects simple cycles with a small number of edges.

[0062] The path detection device 10 according to the second embodiment has the same block configuration as the first embodiment, and each block has approximately the same function. In the second embodiment, coefficients, variables, functional blocks, and steps that are the same as or correspond to those in the first embodiment are given the same symbols or signs, and the description is omitted as appropriate, and the differences are mainly described.

[0063] 7 is a flowchart showing the flow of processing by the route detection device 10 according to the second embodiment. The route detection device 10 according to the second embodiment executes processing according to the flow shown in FIG.

[0064] The processing of the path detection device 10 according to the second embodiment differs from the processing of the first embodiment shown in FIG. 6 in that S31 is used instead of S14, S32 is used instead of S16, and S33 is used instead of S19.

[0065] First, in S11, the graph acquisition unit 24 acquires a directed graph. Then, in S12, the strongly connected component detection unit 26 detects one or more strongly connected components included in the acquired directed graph.

[0066] Next, the path detection device 10 executes the processes from S31 to S20 for each of one or more strongly connected components (loop process between S13 and S21).

[0067] In S31, the problem generator 28 generates a QUBO problem for the target strongly connected component. In the second embodiment, a plurality of decision variables included in the objective function of the QUBO problem correspond one-to-one to a plurality of nodes included in the target strongly connected component.

[0068] Next, in S15, the solution acquisition unit 30 provides the generated QUBO problem for the target strongly connected component to the QUBO solver 22 and requests a solution of the QUBO problem. Then, the solution acquisition unit 30 acquires the solution of the generated QUBO problem for the target strongly connected component from the QUBO solver 22.

[0069] Next, in S32, the subgraph generation unit 32 generates a subgraph selected based on the solution of the QUBO problem for the target strongly connected component. In the second embodiment, the subgraph generation unit 32 detects, as a subgraph, a part of the target strongly connected component that includes two or more nodes corresponding to decision variables whose solution to the QUBO problem is 1 and does not include a node corresponding to a decision variable whose solution is 0.

[0070] Here, in the second embodiment, the problem generator 28 generates a function shown in equation (3) as an objective function in the QUBO problem.

number

[0071] N is the number of nodes included in the target strongly connected component. i and j are integers between 1 and N, and represent the indexes of the nodes.

[0072] x i is the decision variable corresponding to the i-th node among N nodes. x j is the decision variable corresponding to the jth node among the N nodes.

[0073] Q i,j is a coefficient multiplied by the pair of decision variables corresponding to the i-th node and the j-th node included in the QUBO matrix.

[0074] In the second embodiment, the QUBO matrix is ​​a square matrix of N × N. In the second embodiment, the QUBO matrix is ​​set so that the objective function becomes a minimum value when the number of unconnected nodes in each of two or more nodes included in the subgraph becomes a second set value.

[0075] In the second embodiment, the coefficient Q i,j is expressed by equation (4).

number

[0076] Q i,j is a coefficient multiplied by a pair of decision variables corresponding to the i-th node and the j-th node. Edges represents a set of multiple edges contained in the target strongly connected component. (i,j) represents an edge exiting the i-th node and entering the j-th node.

[0077] Therefore, Q represented by equation (4) i,j In the above formula, the coefficients corresponding to pairs of identical nodes are set to -1. The coefficients corresponding to pairs of different nodes are set to 0 if they are connected by an edge, and are set to 1 / (1+β) if they are not connected by an edge. β is a positive real number and corresponds to a second setting value. For example, the initial value of β is set by a user or the like.

[0078] The objective function including the QUBO matrix calculated according to formula (4) is minimized when the values ​​of N decision variables are selected so that the number of unconnected nodes in each of two or more nodes included in the subgraph is β. In other words, the QUBO problem using the objective function including the QUBO matrix calculated according to formula (4) returns a global minimum in the vicinity where the number of unconnected nodes in each of two or more nodes included in the subgraph is β.

[0079] Therefore, the QUBO problem using the objective function including the QUBO matrix calculated according to formula (4) can return a solution that excludes nodes with more than β of the unconnected nodes in the target strongly connected components and leaves nodes with the number of unconnected nodes equal to or less than β. Therefore, the QUBO problem using the objective function including the QUBO matrix calculated according to formula (4) can return a solution that selects a subgraph including two or more nodes that are densely connected to each other, excluding simple cycles with a large number of edges and leaving simple cycles with a small number of edges.

[0080] In addition, the QUBO matrix is ​​not limited to the matrix shown in formula (4), and may be another matrix. For example, the QUBO matrix may be a matrix obtained by multiplying the matrix shown in formula (4) by a coefficient. In addition, the coefficient corresponding to a pair of different nodes connected by an edge in the QUBO matrix may be 1 / (B+β). In addition, B is a positive integer.

[0081] Following S32, in S17, the iteration control unit 36 ​​detects the number of edges in the subgraph. Then, in S18, the iteration control unit 36 ​​determines whether the number of edges included in the generated subgraph for the target strongly connected component is equal to or less than a preset threshold. If the number of edges included in the generated subgraph is greater than the threshold (No in S18), the iteration control unit 36 ​​advances the process to S33.

[0082] In S33, the iteration control unit 36 ​​decreases β used in calculating the QUBO matrix by a predetermined amount. After completing S33, the iteration control unit 36 ​​returns the process to S31. Then, the question generator 28 repeats the process from S31.

[0083] The number of edges included in the subgraph increases as the total number of unconnected nodes in the node increases. Therefore, the number of edges included in the subgraph is proportional to β. Therefore, the iterative control unit 36 ​​can control the number of edges included in the subgraph to a target value by changing β and repeating the generation of the QUBO problem and the generation of the subgraph. For example, the iterative control unit 36 ​​can control the number of edges included in the subgraph to a target value by binary search.

[0084] If the number of edges included in the subgraph is equal to or less than the threshold value (Yes in S18), the iteration control unit 36 ​​advances the process to S20.

[0085] In S20, the simple cycle detection unit 34 detects a simple cycle included in a subgraph for each of the target strongly connected components.

[0086] In S21, the path detection device 10 judges whether the process from S31 to S20 has been executed for all of one or more strongly connected components. If the process has not been completed for all of one or more strongly connected components, the path detection device 10 executes the process from S31 to S20 for the unexecuted strongly connected components. If the process from S31 to S20 has been completed for all of one or more strongly connected components, the path detection device 10 advances the process to S22.

[0087] In S22, the output unit 38 outputs the simple cycles detected for all of the one or more strongly connected components. Upon completing S22, the path detection device 10 ends this flow.

[0088] The path detection device 10 according to the second embodiment detects partial nodes for each of one or more strongly connected components included in a directed graph, excluding nodes with a large number of unconnected nodes, but not excluding nodes with a small number of unconnected nodes. This allows the path detection device 10 to detect a partial graph from the directed graph excluding simple cycles with a large number of edges with a high probability.

[0089] Then, the path detection device 10 detects a simple cycle from such a subgraph. Therefore, the path detection device 10 can detect a simple cycle that includes a directed graph and has a small number of edges, with a short calculation time and a small calculation space.

[0090] (Hardware configuration) Fig. 8 is a hardware block diagram of the path detection device 10. As an example, the path detection device 10 is realized by a hardware configuration similar to that of a general computer (information processing device) as shown in Fig. 8. The path detection device 10 may be realized by one computer or server as shown in Fig. 8, or may be realized by multiple computers or servers operating in cooperation. Furthermore, the path detection device 10 may be configured to include a dedicated hardware circuit in part.

[0091] The path detection device 10 includes a memory 204, one or more hardware processors 206, a storage device 208, an operation device 210, a display device 212, and a communication device 214. Each unit is connected via a bus.

[0092] The memory 204 includes, for example, a ROM 222 and a RAM 224. The ROM 222 stores programs used to control the path detection device 10, various setting information, and the like in a non-rewritable manner. The RAM 224 is a volatile storage medium such as a Synchronous Dynamic Random Access Memory (SDRAM). The RAM 224 functions as a working area for one or more hardware processors 206.

[0093] The one or more hardware processors 206 are connected to the memory 204 (the ROM 222 and the RAM 224) via a bus. Each of the one or more hardware processors 206 may be, for example, a CPU (Central Processing Unit) or a hardware circuit for calculation.

[0094] The one or more hardware processors 206 execute various processes in cooperation with various programs stored in advance in the ROM 222 or the storage device 208, using a predetermined area of ​​the RAM 224 as a working area, and comprehensively control the operation of each unit constituting the path detection device 10. Furthermore, the one or more hardware processors 206 control the operation device 210, the display device 212, the communication device 214, etc. in cooperation with the programs stored in advance in the ROM 222 or the storage device 208.

[0095] The storage device 208 is a rewritable storage device such as a semiconductor storage medium such as a flash memory, a magnetically or optically recordable storage medium, etc. The storage device 208 stores programs used for controlling the path detection device 10, various setting information, etc.

[0096] The operation device 210 is an input device such as a mouse, a keyboard, etc. The operation device 210 receives information input by a user, and outputs the received information to one or more hardware processors 206.

[0097] The display device 212 displays information to a user. The display device 212 receives information, etc. from one or more hardware processors 206 and displays the received information. Note that, when information is output to the communication device 214 or the storage device 208, etc., the path detection device 10 does not need to include the display device 212. The communication device 214 communicates with an external device and transmits and receives information via a network, etc.

[0098] The program executed by the path detection device 10 of this embodiment is provided as a file in an installable or executable format recorded on a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, or a DVD (Digital Versatile Disk).

[0099] The program executed by the route detection device 10 of the present embodiment may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. The program executed by the route detection device 10 of the present embodiment may be provided or distributed via a network such as the Internet. The program executed by the route detection device 10 of the present embodiment may be provided by being pre-installed in a ROM or the like.

[0100] The program for making the information processing device function as the path detection device 10 has a module configuration including, for example, a graph acquisition module, a strongly connected component detection module, a problem generation module, a solution acquisition module, a subgraph generation module, a simple cycle detection module, a repetition control module, and an output module. Furthermore, the program may include a QUBO solver module. This program is executed by one or more hardware processors 206, and each module is loaded into the RAM 224 of the memory 204, and the one or more hardware processors 206 function as the graph acquisition unit 24, the strongly connected component detection unit 26, the problem generation unit 28, the solution acquisition unit 30, the subgraph generation unit 32, the simple cycle detection unit 34, the repetition control unit 36, and the output unit 38. Furthermore, this program may make one or more hardware processors 206 function as the QUBO solver 22. Note that these configurations may be partially or entirely configured by hardware.

[0101] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]

[0102] 10 Path detection device 22 QUBO Solver 24 Graph Acquisition Unit 26 Strongly connected component detection unit 28 Problem generation part 30 Solution acquisition part 32 Subgraph Generation 34 Simple cycle detection unit 36 Repeat control section 38 Output section

Claims

1. A path detection device for detecting a simple cycle included in a directed graph, comprising: a strongly connected component detection unit for detecting one or more strongly connected components included in the directed graph; A problem generator that generates a QUBO problem for each of the one or more strongly connected components; A solution acquisition unit that acquires a solution to the QUBO problem for each of the one or more strongly connected components; a simple cycle detection unit that detects the simple cycle included in a subgraph for each of the one or more strongly connected components; an output unit that outputs information that identifies the detected simple cycle; Equipped with A plurality of decision variables included in an objective function in the QUBO problem correspond to a plurality of nodes or a plurality of edges included in a target strongly connected component among the one or more strongly connected components; the subgraph is a portion of the strongly connected component of the target that includes two or more nodes or two or more edges that are selected based on the solution; The QUBO matrix included in the objective function is set so that the objective function is minimized when the subgraph satisfies a preset condition. Path finding device.

2. the plurality of decision variables correspond to the plurality of edges included in the strongly connected component of the target; The QUBO matrix is ​​set so that the objective function is minimized when a sum of an input degree and an output degree at each of two or more nodes included in the subgraph becomes a first setting value. The path detection device according to claim 1 .

3. The problem generator generates the objective function shown in the following formula (1), [0010] i and j are integers from 1 to E, E is the number of edges included in the strongly connected component of the object, x i is the decision variable corresponding to the i-th edge, x j is the decision variable corresponding to the jth edge, Q i,j is a coefficient multiplied by a pair of a decision variable corresponding to the i-th edge and a decision variable corresponding to the j-th edge included in the QUBO matrix. The path detection device according to claim 2 .

4. Q i,j is represented by the following formula (2): [0025] Q α i,j is the first term of the coefficient multiplied to a pair of the decision variable corresponding to the i-th edge and the decision variable corresponding to the j-th edge, Q source i,j is the second term of the coefficient multiplied to the pair of the decision variable corresponding to the i-th edge and the decision variable corresponding to the j-th edge, Q destination i,j is the third term of the coefficient multiplied to the pair of the decision variable corresponding to the i-th edge and the decision variable corresponding to the j-th edge, α is a positive real number, source i represents the source node of the i-th edge, source j represents the destination node of the j-th edge, destination i represents the source node of the i-th edge, destination j represents the output node of the j-th edge The path detection device according to claim 3 .

5. A repetition control unit is further provided for repeating the generation of the QUBO problem and the acquisition of a solution to the QUBO problem for each of the one or more strongly connected components; The repeat control unit is In the second or subsequent QUBO problem generation process, a new α is generated by decreasing the α used in the immediately preceding process by a predetermined amount, If the number of edges included in the subgraph is equal to or less than a threshold, the iterative process is terminated and the simple cycle included in the subgraph is detected. The path detection device according to claim 4.

6. the plurality of decision variables correspond to the plurality of nodes included in the strongly connected component of the target; The QUBO matrix is ​​set so that the objective function is minimized when the number of unconnected nodes in each of the two or more nodes included in the subgraph is a second set value. The path detection device according to claim 1 .

7. The objective function is expressed by the following formula (3): [0030] i and j are integers from 1 to N, N is the number of the plurality of nodes included in the target strongly connected component, x i is the decision variable corresponding to the i-th node, x j is the decision variable corresponding to the jth node, Q i,j is a coefficient multiplied by a pair of a decision variable corresponding to the i-th node and a decision variable corresponding to the j-th node included in the QUBO matrix. The path detection device according to claim 6.

8. Q i,j is expressed by the following formula (4): [0045] β is a positive real number, Edges is a set of edges included in the strongly connected components of the object, (i, j) is the edge from the i-th node to the j-th node The path detection device according to claim 7.

9. A repetition control unit is further provided for repeating the generation of the QUBO problem and the acquisition of a solution to the QUBO problem for each of the one or more strongly connected components; The repeat control unit is In the second or subsequent QUBO problem generation process, a new QUBO problem is generated using a new β that is a predetermined amount less than the β used in the immediately preceding process; If the number of edges included in the subgraph is equal to or less than a threshold, the iterative process is terminated and the simple cycle included in the subgraph is detected. The path detection device according to claim 8.

10. A program for causing an information processing device to function as a path detection device that detects a simple cycle included in a directed graph, comprising: The information processing device, a strongly connected component detection unit for detecting one or more strongly connected components included in the directed graph; A problem generator that generates a QUBO problem for each of the one or more strongly connected components; A solution acquisition unit that acquires a solution to the QUBO problem for each of the one or more strongly connected components; a simple cycle detection unit that detects the simple cycle included in a subgraph for each of the one or more strongly connected components; an output unit that outputs information that identifies the detected simple cycle; and make it work. A plurality of decision variables included in an objective function in the QUBO problem correspond to a plurality of nodes or a plurality of edges included in a target strongly connected component among the one or more strongly connected components; the subgraph is a portion of the strongly connected component of the target that includes two or more nodes or two or more edges that are selected based on the solution; The QUBO matrix included in the objective function is set so that the objective function is minimized when the subgraph satisfies a preset condition. program.

Citation Information

Patent Citations

  • Gene network route searching device, method and program

    JP2004220227A

  • Automation of solving NP problems in annealer system

    JP2021002331A

  • Search apparatus, search method, program, search system, and arbitrage system

    JP2021060864A

  • Circular Transaction Path Detection

    US20140143110A1