Vertex Connectivity

Hello Community, I am trying to find a way to calculate Vertex Connectivity, since I did not find a function from Graphs.jl. Unfortunately, I could not find a suitable way to implement it myself, since my background isn’t maths. I am greatful for any help.

Thank you in advance! :slightly_smiling_face:

You can do this with

using Pkg; Pkg.add("SimpleGraphAlgorithms")
using SimpleGraphs, SimpleGraphAlgorithms

G = Cycle(6)
connectivity(G)         # returns κ(G)
min_cut(G)              # returns the cut set itself
min_cut(G, 1, 4)        # s-t separator
julia> G = Cycle(6)
Cycle (n=6, m=6)

julia> connectivity(G)         # returns κ(G)
2

julia> min_cut(G)              # returns the cut set itself
Set{Int64} with 2 elements:
  6
  3

julia> min_cut(G, 1, 4)        # s-t separator
Set{Int64} with 2 elements:
  6
  2

1 Like

Thank you very much :grinning_face_with_smiling_eyes: ! I will try using these functions for my project!