K-Connected Spanning Subgraph

Background

Consider that you are given a transportation network, which is a graph. Now you are asked to find out a sub-graph that the transportation capacity between any two sites in the sub-graph is above some threshold k.

This sub-graph could be viewed as kind of a backbone. Its importance is as follows: even if some lines in the transportation network break down, so long as the lines of this sub-graph operates, we can guarantee that the network is able to transport k capacity cargo between any two sites.

If we examine this problem deeply, we may ask the following questions:

  1. Does such a sub-graph exist?
  2. If such a sub-graph exist, how to find one with the minimum number of edges?
Solution

Existence could be answered right now. If the minimum cut of the graph is no less than k, then we could find such a sub-graph. A trivial case is the graph itself. But the second one is difficult. It is believed that this is a NP hard problem.

Approximation algorithms are proposed. One of them was given by Hiroshi Nagamochi and Toshihide ibaraki [A Linear-Time Algorithm for Finding a Sparse k-Connected Spanning Subgraph of a k-Connected Graph] in 1992.

We firstly formalize the notions. To simplify the problem, we focus on graphs that are undirected and consist of no multiple edges and self loops.

k-Connected Graph: A graph is k-Connected if the minimum cut of the graph is no less than k.

Nagamoci-Ibaraki Algorithm Given a graph G=<V,E>G=<V,E>, if Fi=<V,Ei>F_i = <V, E_i> is the maximal spanning forest of G=<V,E−E1−E2−..−Ei−1>G = <V, E - E_1 - E_2 - .. - E_{i - 1}>, the Gi=<V,E1∪E2∪...∪Ei−1>G_i = <V, E_1 \cup E_2 \cup ... \cup E_{i - 1}> is a k-Connected Sub-graph with k∣V∣−k(k+1)k|V| - k(k + 1) edges if k≤λ(G)k \le \lambda(G), where λ(G)\lambda(G) is the minimum cut of G.

Here only a scratch of proof is given. Consider a particular cut C in G, whose value λ(C)\lambda(C) is no less than λ(G)\lambda(G). For any GiG_i with i<=λ(G)i <= \lambda(G), it must consist of at least one edge of C. Otherwise we could add an arbitrary edge inC−E1−E2−...−Ei−1C-E_1-E_2-...-E_{i - 1} to FiF_i such that FiF_i is still a forest, contradicting FiF_i is maximal.

Finding a maximal forest in G=<V,E>G=<V,E> requires O(∣V∣+∣E∣)O(|V| + |E|) time. So O(k(∣V∣+∣E∣))O(k(|V| + |E|)) is required for k-Connected Graph. Nagamochi and Ibaraki did it in O(∣V∣+∣E∣)O(|V| + |E|) time. They scaned all nodes and edges once and classify edges into different EiE_i, here i∈[1...∣E∣]i \in [1...|E|].

Pseudo Code:
  1. h(v) = 0, ∀v∈V\forall v \in V
  2. $E_i = \emptyset, \forall i \in [1..|E|] $
  3. while ∃u\exists u that has not been scanned
    • find u with maximum h(u)
    • marked u as scanned
    • for all (u,v)∈E(u,v) \in E that has not been scanned
      • marked (u,v) as scanned.
      • if h(u) == h(v) then
        • ++h(u)
      • end if
      • ++h(v)
      • Eh(v)=Eh(v)∪(u,v)E_{h(v)} = E_{h(v)} \cup {(u,v)}
    • end for

end while

Analysis

To see that the algorithm indeed works, we have to check two things:

  1. Fi=<V,Ei>F_i=<V, E_i> is a forest, i.e., FiF_i does not contain a cycle.
  2. Fi=<V,Ei>F_i=<V, E_i> is maximal.

FiF_i doesn't contain a cycle: suppose that when u is being scanned and (u,v) is added to EiE_i, a cycle is created. Then some edge incident to v belongs to FiF_i. Thus h(v) >= i before (u, v) is added to EiE_i. But (u,v) is added to Eh(v)E_{h(v)} after ′++h(v)′'++h(v)'. So (u,v)∉Ei(u,v) \notin E_i. A contradiction.

FiF_i is maximal. If FiF_i is not maximal, there is some edge (u,v)∈Ej(u,v) \in E_j for some j>ij > i such that <V,Ei∪{(u,v)}><V, E_i \cup \{(u,v)\}> is a forest. Denote the tree containing u in FiF_i by TuT_u and the one containing v in FiF_i by TvT_v. Further, denote the order of nodes in TuT_u and TvT_v being scanned by [x1,x2,...,u,...][x_1, x_2,..., u,...] [y1,y2,...v,...][y_1,y_2,...v,...] respectively. Without losing generality, suppose x1x_1 is scanned before y1y_1. When x1x_1 is scanned, we must have h(x1)==i−1h(x_1) == i - 1 and h(y1)≤i−1h(y_1) \le i - 1. After x1x_1 is scanned, h(x1)==h(x2)==ih(x_1) == h(x_2) ==i. For any other node z≠x1z \ne {x_1} such that h(z)==ih(z) == i, we guarantee that h(z)==i−1h(z) == i -1 before x1x_1 is scanned and z∈[x2,x3,...]z \in [x_2, x_3,...], otherwise z is scanned before x1x_1. Now h(x2)=i>h(y1)h(x_2) =i > h(y_1), it's scanned before y1y_1. Following this way, u is scanned before y1y_1. When u is scanned, h(v)≤i−1h(v) \le i - 1. So (u, v) is add to some EjE_j for j≤ij \le i. A contradiction.

The number of edges in GiG_i

Suppose the order of nodes being scanned in V is v1,v2,..v_1, v_2, ... The value of h(vi)h(v_i) could not exceed i, since there are at most one edge (vj,vi)(v_j, v_i) incident to viv_i for some j less than i. So viv_i does not appear in forest FkF_k for k>ik > i. Then FkF_k contains at most |V| - 1 - (k - 1) = |V| - k edges. Thus the number of edges in GiG_i is at most

Σi=1k(∣V∣−i)=k∣V∣−k(k+1)/2 \Sigma_{i = 1}^{k} (|V| - i) = k|V| - k(k + 1) /2