szhorvat / IGraphM

IGraph/M is the igraph interface for Mathematica
http://szhorvat.net/mathematica/IGraphM
Other
91 stars 17 forks source link

IGMinimumSeparators misbehaves with directed graphs #48

Open szhorvat opened 7 years ago

szhorvat commented 7 years ago

According to the documentation, edge directions should be ignored.

In reality, empty results are returned for directed graphs.

In[385]:= IGMinimumSeparators@CycleGraph[4, DirectedEdges -> True]
Out[385]= {}

In[386]:= IGMinimumSeparators@CycleGraph[4, DirectedEdges -> False]
Out[386]= {{2, 4}, {1, 3}}

Upstream bug: https://github.com/igraph/igraph/issues/992

Juddd commented 7 years ago

I also don't think it works normally with undircted graph,see this

edges = {TX -> R1, R1 -> R3, R3 -> R5, R5 -> RX, TX -> R2, R2 -> R4, 
   R4 -> R6, R6 -> RX, R1 -> R2, R2 -> R3, R3 -> R4, R4 -> R5, 
   R5 -> R6, TX -> R7, TX -> R8, R7 -> R9, R9 -> R6, R9 -> RX, 
   R8 -> R6};
g = UndirectedGraph[edges, VertexLabels -> "Name"]
IGMinimumSeparators[g]

Mathematica graphics

szhorvat commented 7 years ago

I think this result is correct. Can you explain more why you think it is not?

Deleting these vertex sets disconnects the graph. They are indeed the smallest possible sets that will disconnect it.

Juddd commented 7 years ago

I'm soory,I make a mistake.There is a isolated vertex(R8) when we drop the vertice R6 and TX..The result is right indeed.

szhorvat commented 6 years ago

Milestone removed as there is a workaround for this in Mma code. Will keep the bug open until the issue is fixed in the C code upstream.