Reputation: 1
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))
.
Upvotes: 0
Views: 375
Reputation: 77860
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.
Upvotes: 1
Reputation: 571
What is an undirected acyclic connected graph? That's right, a tree.
Upvotes: 2