Connected Components in Graph Theory

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
asi123
Messages
254
Reaction score
0

Homework Statement



Hey guys,

I have this question.

Given a tree T = (V , F), find an algorithm which finds u in V, so in the graph T = (V \ {u} , F) the size of each connected component is |V| / 2 at most. What is the complexity?

Homework Equations





The Attempt at a Solution



I need to split this tree down the middle somehow, any idea?

Thanks a lot.

Assaf
 
Physics news on Phys.org
Ok, so I did the following:

I woluld first use BFS algorithm (it has to be run for each vertical) for computng shortest distances between all pairs of verticles. Then for each vertical V find Vm - the largest distance to any other verticles amongs the data retuirned form BFS. Then, the verticles with the smallest Vm are the one in the graph center.

It comes down to O(V^2), any thing better then that?

Thanks a lot.

Assaf.