A problem on Graph theory and algorithms

The problem is as follows:

---------------------------------------------------------------------------------------------------------------------------------

Let G be a connected graph.

For a vertex x of G we denote by G−x the graph formed by removing x and all edges incident on x from G. G is said to be good if there are at

least two distinct vertices x,y in G such that both G − x and G − y are connected.

(i) Show that for any subgraph H of G, H is good if and only if G is good.

(ii) Given a good graph, devise a linear time algorithm to find two such vertices.

(iii) Show that there exists a graph G such that we cannot find three distinct vertices

u1,u2,u3such that each of G − u1,G − u2, and G − u3 is connected.

---------------------------------------------------------------------------------------------------------------------------------

I have approached to some extent. Here is what I've done:

If G is a connected graph then we can easily find its spanning tree and then removing any two leaves x and y from the tree one at a time gives us 2 another graphs G − x and G − y such that they are both connected.

"**Hence any connected graph G is a good graph.**"

1. I'm stuck on how to solve part (i).

2. I have designed the algorithm for the part(ii) which extracts the spanning tree from G and then finds two such leaves x and y. Clearly

it is linear in terms of #vertices(=n) & #edges(=m) i.e. O(n+m)

3. I have also solved the third part with a graph as follows:

O------------------O-----------------O

In the above graph G we denote three vertices as u1, u2, u3. The edges are (u1,u2) and (u2,u3). Clearly G − u2 is not connected.

Please help me in solving part(i).

Please help guys...

Thanks in advance!!

Re: A problem on Graph theory and algorithms

Show that for any subgraph H of G, H is good if and only if G is good.

As written this claim is false. (Unless you define subgraph differently than what I am assuming)

Counter: Let G be $\displaystyle P_5$ (a path on 5 vertices). Then clearly G is good. Let H be a subgraph created by removing a single vertex of degree 2 in G. Then H is disconnected and cannot be good. Hence the claim fails.

This is true if you say: for any connected subgraph H of G, H is good if and only if G is good. But you already proved a stronger statement than this, that all connected graphs are good.

Re: A problem on Graph theory and algorithms

Yes you are right...anyways thanks for pointing the counter eg ...

Re: A problem on Graph theory and algorithms

How to prove that Hamming graph H(d,3) has a diameter d?