Find the minimum cut 1
Connectivity tells us the minimum number of cuts needed to split the graph into two different subgraphs. igraph
has two functions that we can use to tell us which vertices are actually cut into those two different subgraphs and how many cuts are required. The first is min_cut()
, which returns all the cuts made, the number of cuts, and the two different subgraphs created. The number of cuts differs between directed and undirected graphs. In directed graphs, the minimum number of cuts only counts inbound edges, whereas in an undirected graph, it is how many cuts for all edges.
This exercise is part of the course
Case Studies: Network Analysis in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate the minimum number of cuts
ud_cut <- min_cut(___, value.only = ___)
# See the result
ud_cut