In the city there is a subway. You can get from any station to any other one. How can I prove that if we close one of the stations ( it can be picked),you won't be able to drive through it), we will be able to get from any station to any other one.
Subway & Graphs
-
1It isn't generally true. If the stations were, say, arranged in a line, then removing one in the middle disconnects the graph. – 2017-02-09
-
0We can choose the bottom one. – 2017-02-09
-
0Oh, you get to pick which one to close? That's very different. I suggest editing the post to make that clear. – 2017-02-09
1 Answers
We want to show that there is some stop that can be removed without disconnecting the graph. to do it, choose a stop, $s_0$ at random. Then, for a stop $s$, define $d(s)$ to be the length of the shortest path (in terms of the number of stops) from $s_0$ to $s$. Now let $s^*$ be a stop such that $d(s^*)$ is maximal. We claim that you can always remove $s^*$ without disconnecting the graph.
To see this, note that, for $s\neq s^*$ the shortest path from $s_0$ to $s$ can not go through $s^*$ or it would have length greater than the max. Thus, after deleting $s^*$, there is still a path from $s_0$ to $s$. As any stop can reach $s_0$, any stop can reach any other and we are done.
Remark: this shows that there are at least two stops which can be deleted without disconnecting the graph (well, assuming there are at least two stops on the map, anyway). To see that, run through the method once to yield $s^*$, now do it again starting with $s^*$. Considering the case where the stops are arranged in a line we see that this result can not, in general, be improved.
-
0I thought the remark showed that this procedure can be applied repeatedly, without compromising the connectedness of the graph obtained by removing the maximum distance nodes selected at each iteration. So, I'm not sure I understand in which sense the result cannot be improved. (Of course, one cannot remove a node from an empty graph, but you covered that.) – 2017-02-11
-
0@FabioSomenzi Right. It's clear you can iterate this till the graph is empty, or a point. – 2017-02-11
-
0@FabioSomenzi The remark was intended to demonstrate that in any connected graph with at least two nodes there are at least two points which can be deleted without disconnecting the graph. That is optimal, as in a straight line graph there are exactly two. I was not speaking about iterating the process on smaller and smaller graphs. – 2017-02-11
-
0@lulu Thanks for the detailed response. Here's how I see it. The theorem can equivalently be stated as follows: Every connected graph with $n$ nodes contains connected subgraphs with $m$ nodes for all $m$ such that $0 < m \leq n$. In the case of five nodes in a straight line from left to right, I can remove the two leftmost and the two rightmost nodes and be left with a connected graph. The *proof* relies on nodes at maximum distance from $s_0$, of which there may be just one. For the line graph no more than two, but for some other graphs, up to $n-1$. – 2017-02-12
-
0@FabioSomenzi Yes. The argument can, I think, be tightened slightly to show that the two guaranteed points can be removed simultaneously. – 2017-02-12
-
0@lulu Which two points would you pick in a simple even cycle? No matter how you pick $s_0$, there's exactly one node at maximum distance. On the other hand, this small variation on your proof works for all $m$ from $1$ to $n$ included: sort all nodes according to their distances from $s_0$, breaking ties arbitrarily. Then keep the first $m$ nodes in the sorted list. The induced subgraph is connected precisely because of your argument. – 2017-02-12
-
0@FabioSomenzi No...there can be multiple nodes at maximal distance, no problem there. Suppose, for example, you had a star shaped graph with hundreds of nodes a distance one from some fixed node and no other paths. Then every node is maximal distance from the fixed one. As I say, I haven't tried to sort through the details, but I'd be surprised if there's any problem with deleting the two points my algorithm is sure to produce. – 2017-02-12
-
0@lulu I have the impression we are miscommunicating here. If the graph is an even cycle with four nodes $n_0, n_1, n_2, n_3$ and $s_0$ is $n_0$, which are the two nodes according to you? – 2017-02-12
-
0@FabioSomenzi you just mean the circle $n_0 - n_1-n_2-n_3-n_0$? If so, then starting with $n_0$ the furthest point is unique, it is $n_2$, Then, starting with $n_2$ you get back to $n_0$. So, there we are. In this case you can't delete both simultaneously. So much for my too hasty guess! – 2017-02-12
-
0@FabioSomenzi Note: I revised my prior comment to correct a blunder. As this example shows, you can't use my simple algorithm to delete two points simultaneously. Of course, the prior result still stands. – 2017-02-12
-
0@lulu I think we are in perfect agreement now. Thanks! – 2017-02-12