I have an undirected acyclic simple graph with N
nodes and N-1
edges (all nodes are connected to each others).
Removing the edge E_i
splits the graph into exactly two sub-graphs having M_i
and N-M_i
nodes respectively.
I'm looking for an algorithm that searches the edges E_i
to find the most equal partition of nodes: I want to find min(max(M_i, N-M_i))
.
What is an undirected acyclic connected graph? That's right, a tree .
I'll assume that the graph is represented by an edge list; from this we can create the corresponding list of nodes with their associated edges.
Rationale:
Initialize:
Repeat steps 3 & 4 until there are only two nodes remaining; these form the desired partition.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.