So I have a graph with vertices that are connected by edges. The min cut is a function that calculates the minimum number of edges which allows the graph to be separated into two connected subgraphs. So the problem I have is that the min cut function does not give me a balanced cut, i.e. the graph is divided into two: a subgraph and a vertex, and the worst case of my problem is when the vertex appears in the decomposition of the graph. Any solution?
for the code in python:
import networkx as nx
A=nx.Graph()
A.add_edges_from([(1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4 ,5)])
A.remove_edges_from(nx.minimum_edge_cut(A))
nx.draw_networkx(A)
Before decomposition:
After decomposition: