Connected Components in Graph Theory

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
Can you think of a useful number (or pair of numbers, perhaps) you could associate with each vertex?
 
Ok, so I did the following:

I woluld first use BFS algorithm (it has to be run for each verticle) for computng shortest distances between all pairs of verticles. Then for each verticle 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.
 
My method doesn't beat O(v^2), but it's easy to describe. Remove all vertices degree 1. Repeat until only 1 or 2 vertices left. Pick any of those.
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top