Edge Disjoint Spanning Trees in an Undirected Graphs Abhinav Garg, Nayan Deshmukh, Sunil Pandey August 2016 1 1 Introduction and background Under the RTE program we were mentored by Prof. Ovidiu Daeseu. We addressed the following problem :Given an undirected, unweighted graph G with n vertices and 2n-2 edges, one of which is a double edge, check if G admits two edge disjoint spanning trees, and if yes output them Algorithm for finding 2 edge-disjoint spanning trees in a directed graph was first proposed by Prof. R. Tarjan Edge-disjoint spanning trees and depth-first search with running time of O(n). This algorithm used dfs as the primary tool. However, the case of undirected graphs was left open. Recently, an algorithm with running time O(n1.5 ) was proposed for a general undirected graph. The algorithm was presented for a general undirected graph. Also, the algorithm was very complex and it’s application in real life was hard. We had an intuition that it should be possible to give an O(n) algorithm even for the case of undirected graph along the same lines as for directed graph. As of today, we don’t have an O(n) time algorithm for undirected graph neither a proof for it’s absence. Our setting however are much more restrictive( n vertex 2n-2 edges) making the intution for existance of O(n) time algorithm much more stronger. So our aim was primarily to propose an O(n) time algorithm for finding two edge disjoint spanning trees. 2 Approaches Explored We have tried a lot of approaches to progress towards our aim. Following are the discriptions of the same. 2.1 On the lines of Tarjan’s algorithm We worked on extending the Tarjan’s algorithm for directed graph to undirected graphs. 2.1.1 Implementation For a better insight of Tarjan’s algorithm of directed graph on undirected graph, We implemented the algorithm in C++ initially using LEDA and then N graphs support libraries. The implementation can be found at implementation of tarjan’s Algorithm. This implemetation however is still not ready for use as the important conclusions from the implementation were infered before it’s completition. 2.1.2 Inferences on Tarjan’s algorithm To develop an algorithm based on Tarjan’s these were te possible directions that we opted :2 • Convert Undirected To directed:- We thought to put 2 edges ont in forward direction and other in backward direction and then run tarjan’s algorithm on it. Shortcomings:- Tarjan’s algorithm returned 2 dfs trees. One in forward direction, Another in backward direction. • Mapping between Tarjan’s trees:- We tried to see if making tree directed by putting two edges for each one can produce four trees from tarjan’s algorithm and then map these 4 tress to two trees for undirected graph. Difficulties :- It was quite difficult to think of such mapping and no significant prgress was made in this field. 3 Lemmas Proved Given an undirected,unweighted graph G with n vertices and 2n-2 edges, one of which is a double edge and no bridges, decide if G admits two edge-disjoint spanning trees and if so produce the trees. We will try to construct two edge disjoint spanning trees namely T1 and T2. Since the number of edges < 2n, we will have a vertex with degree 2 or 3. Lemma 3.1. Given the original graph G, for each of it’s two degree vertex we can always randomly put one of it’s edge in T1 and the other in T2. Proof. As the vertex is having degree 2, We can always say that one of it’s edge should lie in T1 and the other in T2. To show that any of these edge can lie in any of the tree, consider the following vertex numbered 3, having degree two with neighbour’s as 1 and 2. Now, vertex 3 should be the leaf of both T1 and T2. Say it was connected to 1 in T1 and 2 in T2, So we can anytime find 2 in T1 and 1 in T2 and exchange 3. Therefore, we can randomly put edges of a 2 degree vertex in the original graph. 0 Corollary 3.1.1. The above theorem is also valid for the graph G induced by removing the two degree vertex along with it’s edges. Proof. When we remove the 2 degree vertex, The graph left would still have 2 Edge-disjoint spanning trees,So we can still apply lemma 1.1. Lemma 3.2. We can randomly put two edges of a 3 degree vertex in G3 in one of the tree and the other edge in other tree. Now we are left with a graph s.t. it has all vertices with degree ≥ 3. Also degree of these vertices in graph G3 was ≥ 4. Lemma 3.3. We can always put edges of three degree vertices in T1 and T2 0 0 such that E1 ⊂ E1 and E2 ⊂ E2 is ensured. Note:- The above proof is much more stronger than it looks. This not only ensures that we create no cycle while dealing with three degree vertices but also that going along these lines with proper steps in future we can find T1 and T2, more precisely E1 and E2 correctly. 3 0 Lemma 3.4. Given the graph G3 , for each of its vertices having degree 3 in 0 G3 and had degree 4 in G3 we can randomly put one of its edges in the tree in 0 which this vertex is disconnected in G3 . Excepted Progress :-As we know that in G3 we have n vertices and 2n2 edges, Therefore we must have at least 4 three-degree vertex. Processing 0 them the way we mentioned in the previous paper, we would arrive at G3 with maximum n-4 vertex and 2n-14 edges which mean atleast 12 3-degree vertex.We could remove one edge for each 3-degree vertex.Therefore, 2n-26 edges and n-4 vertices. Notice, that while doing the above algorithm we’ll always check for cycles. Also in case removing an edge from a three degree vertex creates a two degree vertex, We again will put one it’s two edges randomly in T2. Algorithm Proposed :The algorithm proposed reduces atleast n edges from the original graph and put them in the trees T1 and T2. Following are the list of steps of the algorithm:STEP 1:- Sort the vertices in ascending order according to their degree. STEP 2:- Start removing two edges corresponding to every vertex starting from the first one in the sorted list and put one of them in tree T1 and other in tree T2. If you encounter a vertex that doesn’t have 2 edges left, ignore it and move ahead to the next vertex. Lemma 3.5. After executing above algorithm we’ll have less than n edges left. 4 Validation of the proposed algorithm 4.1 Creating instances To create the input set to check how the algorithm is responding, we have used Laman graph that has 2n-3 edges with n vertices. Laman graph has the property that if a DFS is constructed and then one of the remaining edge is doubled and the same edge is changed in the parent graph so that it has 2n-2 edges now, then that graph admits two edge disjoint trees. We are currently implementing our algorithm and testing it on the generated test cases. 5 Proofs The authors reserve the copyrights of the proof. For any query, Please contact :• [email protected] • [email protected] • [email protected] • [email protected] 4
© Copyright 2026 Paperzz