Enumeration of all minimally controllable forward graph cycles

I have a directed graph, and my problem is listing all the minimal (cycles that cannot be constructed as a union of other cycles) directed cycles of this graph. This is different from what the Tarjan algorithm produces. For example, for the directed graph in this wikipedia page, I would like to get c ↔ d and d ↔ h as two divided directional loops.

Not if this problem is polynomial or not. I stumbled upon the article "Enumeration of minimal Dicuts and strongly related subgraphs", which seems to conclude that this problem is an incremental polynomial (I do not know what this means), but I cannot extract the algorithm for this article. I am also not sure that the minimum tightly coupled component is equivalent to the minimum cycle when I define it.

Does anyone know the answer to this problem?

Thanks in advance!

+3
source share
4 answers

If we are looking for the shortest path cycle, this seems simple enough.

  • Just make the width of the first search on all nodes looking for the shortest path from node to itself.
  • , node,
  • , ( , , ).
    • node .
  • , node.

  • (), , ... .

, , " ". " " ( ), ( 2 node 1, ). , ( ), . , node, . , .

O (V. (E + V)), V - , E - . O (E + V) , BFS V . , . , , , O (log (V). (E + V)) , ( ).

+2

, . ( - , , ).

, :
. node : , , . node, , , , , , . . , O (EV ^ 2).

EDIT:
, , , , O (EV), node. , node, . , .

0

, INDEPENDENT ?

.

  • -, , , . O (V ^ 3).
  • .
  • ( , , )
  • - " ".

4,1. v (G) 2 (v1 v2), (G2).

4,2. e (v, u) G 1- G2 2- (v1, u2).

4,3. G2. G2.

5 () G.

0

, , ... : , (di).

n/2 2 : A_1, ..., A_{n/2} A_{n/2+1}=A_1. , ( A_{n/2} A_1, ). , , , , , A_{n/2} A_1, A_{n/2} A_1.

It is clear that n/2there are minimal cycles in this length graph 2^{n/2}, since all subsets of size n/2that contain exactly one vertex in each A_iare such a cycle. If you want to list all the algorithms, this algorithm must complete at least 2^{n/2}steps.

0
source

Source: https://habr.com/ru/post/1722368/


All Articles