2

I'm trying to use Mathematica to compute the minimal vertex cut for graphs. From what I understood, VertexConnectivity of a graph should correspond to the number of vertices in the minimal vertex cut.

However, when I use Mathematica 9.0 on a graph, I get a VertexConnectivity of 1, but the minimal cut computed by Mathematica has 33.

This seems strange! Is this a bug, or am I missing something? Any help would be appreciated!

Here's a link to the text used to generate the graph which I am testing: http://pastebin.com/WWk0Gk8G VertexConnectivity and FindVertexCut are the functions I'm using.

Regards, Dave

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
Dave
  • 21
  • 1
  • Welcome to Mathematica.SE! I suggest the following:
    1. As you receive help, try to give it too, by answering questions in your area of expertise.
    2. Read the [faq]!
    3. When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge.

    Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!

    –  Dec 07 '14 at 16:36
  • 1
    VertexConnectivity is buggy in v9, unfortunately. The correct answer is 33, not 1. I marked as a duplicate of the thread discussing this. You can either upgrade to v10 (which has this fixed) or use igraph as a workaround (as described in the link). – Szabolcs Dec 07 '14 at 16:42
  • Thanks for the help! Strange that such a bug managed to get through. – Dave Dec 09 '14 at 12:29

1 Answers1

0

You may see that removing a single vertex doesn't disconnects your graph. It's a bug,as noted in the comments:

And @@ Thread[ Length /@  ConnectedComponents /@ (VertexDelete[g, #] & /@ VertexList@g) == 1]

(*  True *)
Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453