Arc-disjoint out- and in-branchings in compositions of digraphs

An out-branching $B^+_u$ (in-branching $B^-_u$) in a digraph $D$ is a connected spanning subdigraph of $D$ in which every vertex except the vertex $u$, called the root, has in-degree (out-degree) one. A {\bf good $\mathbf{(u,v)}$-pair} in $D$ is a pair of branchings $B^+_u,B^-_v$ which have no arc in common. Thomassen proved that is NP-complete to decide if a digraph has any good pair. A digraph is {\bf semicomplete} if it has no pair of non adjacent vertices. A {\bf semicomplete composition} is any digraph $D$ which is obtained from a semicomplete digraph $S$ by substituting an arbitrary digraph $H_x$ for each vertex $x$ of $S$. Recently the authors of this paper gave a complete classification of semicomplete digraphs which have a good $(u,v)$-pair, where $u,v$ are prescribed vertices of $D$. They also gave a polynomial algorithm which for a given semicomplete digraph $D$ and vertices $u,v$ of $D$, either produces a good $(u,v)$-pair in $D$ or a certificate that $D$ has such pair. In this paper we show how to use the result for semicomplete digraphs to completely solve the problem of deciding whether a given semicomplete composition $D$, has a good $(u,v)$-pair for given vertices $u,v$ of $D$. Our solution implies that the problem is polynomially solvable for all semicomplete compositions. In particular our result implies that there is a polynomial algorithm for deciding whether a given quasi-transitive digraph $D$ has a good $(u,v)$-pair for given vertices $u,v$ of $D$. This confirms a conjecture of Bang-Jensen and Gutin from 1998.


Introduction
Notation follows [4] so we only repeat a few definitions here (see also Section 2).Let D = (V, A) be a digraph.An out-tree (in-tree) is an oriented tree in which every vertex except one, called the root, has in-degree (out-degree) one.An out-branching (in-branching) of D is a spanning out-tree (in-tree) in D. For a subdigraph H of D and a vertex s of H we denote by B + s,H , (resp., B − s,H ) an arbitrary out-branching (resp., in-branching) rooted at s in H.To simplify the notation, we set B + s = B + s,D and B − s = B − s,D .A digraph D is strong if there exists a path from x to y in D for every ordered pair of distinct vertices x, y of D and D is k-arc-strong if D \ A ′ is strong for every subset A ′ ⊆ A of size at most k − 1.For a subset X of V , we denote by D X the subdigraph of D induced by X.
The following well-known theorem, due to Edmonds, provides a characterization for the existence of k arc-disjoint out-branchings rooted at the same vertex.
Theorem 1.1 [11] (Edmonds' Branching Theorem) A directed multigraph D = (V, A) with a special vertex s has k arc-disjoint out-branchings rooted at s if and only if Note that, by Menger's Theorem, (1) is equivalent to the existence of k arc-disjoint (s, v)-paths for every v ∈ V − s.Furthermore, (1) can be checked in polynomial time via maximum flow calculations, see e.g., [4,Section 5.4].Lovász [13] gave a constructive proof of Theorem 1.1 which implies the existence of a polynomial algorithm for constructing a set of k arc-disjoint branchings from a given root when (1) is satisfied.
A natural related problem is to ask for a characterization of digraphs having an out-branching and an in-branching which are arc-disjoint.Such pair will be called a good pair in this paper and more precisely we call it a good (u, v)-pair if the roots u and v are specified.Thomassen showed (see [1] and [2]) that for general digraphs it is NP-complete to decide if a given digraph has a good pair.This makes it interesting to study classes of digraphs for which we can find a good pair or decide that none exists in polynomial time.Such studies have been made in e.g.[1,2,6,7,8,9,10,12].In particular it was shown in [8] that there is a polynomial algorithm for deciding whether a given semicomplete digraph D has a good (u, v)-pair for specified vertices u, v of D. In fact the following surprisingly simple characterization holds.We use P x,y to denote a path from x to y for two vertices x, y of D. Such a path is also called an (x, y)-path.Figure 1: Small semicomplete digraphs without good (u, v)-pairs.Theorem 1.2 [8] Let D = (V, A) be a semicomplete digraph with u, v ∈ V (possibly u = v).Then D has a good (u, v)-pair if and only if it satisfies (i) and (ii) below.
(i) For every choice of z, w ∈ V there are arc-disjoint paths P u,z , P w,v in D.
(ii) D is not one of the digraphs in Figure 1(b)-(f ).
It is easy to see that (i) must hold if D has a good (u, v)-pair and when D has at least 5 vertices the theorem says that (i) is also sufficient.It was shown in [1] that one can decide the existence of arcdisjoint paths P u,z , P w,v for given (not necessarily distinct) vertices u, v, w, z in a semicomplete digraph in polynomial time.Hence one can check condition (i) above in polynomial time.This combined with the proof of Theorem 1.2 in [8] implies the following.Theorem 1.3 [8] There exists a polynomial algorithm which given a semicomplete digraph D = (V, A) and two (not necessarily distinct) vertices of D such that D is not one of the digraphs in Figure 1(b)-(f ), either outputs a good (u, v)-pair of D or vertices z, w ∈ V such that D has no pair of arc-disjoint paths P u,z , P w,v .
A digraph D = (V, A) is quasi-transitive if the presence of the arcs uv, vw implies that there is an arc between u and w.Bang-Jensen and Huang obtained the following result on (u, u)-pairs in quasi-transitive digraphs.
(2) There exists a polynomial algorithm for deciding whether a given quasi-transitive digraph D = (V, A) has a good (u, u)-pair for a given vertex u ∈ V .
A bit later Bang-Jensen and Gutin conjectured the following.
Conjecture 1.1 [3] There exists a polynomial algorithm for deciding for a given quasi-transitive digraph D = (V, A) and two vertices u, v of V whether D has a good (u, v)-pair.
Let D be a digraph with vertex set {v i : i ∈ [n]}, and let H 1 , . . ., H n be digraphs which are pairwise vertex-disjoint.The composition D[H 1 , . . ., H n ] is the digraph Q with vertex set V (H 1 ) ∪ • • • ∪ V (H n ) and arc set ( n i=1 A(H i )) ∪ {h i h j : h i ∈ V (H i ), h j ∈ V (H j ), v i v j ∈ A(D)}.We say that a composition Q = D[H 1 , . . ., H n ] is a semicomplete composition (resp., a transitive composition) if D is semicomplete (resp., transitive).Bang-Jensen and Huang proved the following recursive characterization of quasi-transitive digraphs.
(i) If Q is strong, then there exists a strong semicomplete digraph S with s vertices and quasi-transitive digraphs Q 1 , Q 2 , . . ., Q s such that each Q i is either a vertex or is non-strong and (ii) If Q is not strong, then there exists a transitive oriented graph T with t vertices and strong quasi-transitive digraphs By this theorem, strong quasi-transitive digraphs form a subclass of the class of semicomplete compositions and non-strong quasi-transitive digraphs form a subclass of the class of transitive compositions.Hence the following result by Gutin and Sun extends Theorem 1.4.
Theorem 1.6 [12] There exists a polynomial algorithm for deciding whether a given semicomplete composition D = (V, A) has a good (u, u)-pair for a given vertex u ∈ V .
In this paper we consider the existence of good (u, v)-pairs in compositions of strong semicomplete digraphs and transitive digraphs and give a complete classification of semicomplete and transitive compositions with no good (u, v)-pair for given vertices u, v.The classification for compositions of strong semicomplete digraphs, which can be found in Theorem 3.2 is too involved to be stated in this introduction.For transitive compositions, which includes all compositions of non-strong semicomplete digraphs (see Remark 1), there is a simple classification which we give in Proposition 6.2.All our proofs are constructive and can be converted to polynomial algorithms.Theorem 1.7 There exists a polynomial algorithm which given a composition D = S[H 1 , . . ., H s ], where S is either transitive or semicomplete, and two vertices u, v, decides whether D has a good (u, v)-pair and outputs such a pair when it exists.
The following corollary of Theorems 1.5 and 1.7 shows that Conjecture 1.1 is true.
Corollary 1 There exists a polynomial algorithm which given a quasi-transitive digraph D and two vertices u, v, decides whether D has a good (u, v)-pair and outputs such a pair when it exists.
The rest of the paper is organized as follows: We start out with Section 2 which contains some extra definitions and results that will be used in the paper, in particular Theorem 2.8 which plays a central role in the proof of Theorem 3.2.In Section 3 we state the main result of the paper, Theorem 3.2 and introduce some semicomplete compositions that do not have a good (u, v)-pair for given vertices u, v.In Section 4 we show that if a semicomplete digraph D on at least 5 vertices does not have a good (u, v)-pair, then one can still produce an out-branching from u and an in-branching at v which share only a well-structured set of arcs.Section 5 is devoted to the proof of Theorem 3.2.This is done by proving a number of structural lemmas which we then apply to obtain the proof.In Section 6 we characterize transitive compositions with good (u, v)-pairs and use this result and Theorem 3.2 to characterize quasi-transitive digraphs without a good (u, v)-pair.Finally in Section 7 we show that the complicated characterization in Theorem 3.2 cannot be simplified to something similar to Theorem 1.2.

Terminology and additional results
Note that to simplify notation we shall sometimes write x ∈ D and xy ∈ D to denote that x is a vertex of D, respectively, that xy is an arc of D.
A strong component X is initial (resp., terminal) if X has no in-coming (resp., out-going) arcs in D. Note that for a semicomplete digraph D, a vertex v belongs to the initial (resp., terminal) component of D if and only if it is the root of some out-branching (resp., in-branching) of D.
Remark 1 It is easy to see that for a non-strong semicomplete digraph D there is a unique ordering D 1 , . . ., D t , t ≥ 2 of its strong components and that D = T T t [D 1 , . . ., D t ], there T T t is the transitive tournament on t vertices.
Let D be a digraph.We use D X to denote the subdigraph induced by a vertex set X. Let D − X = D V \X .We often identify a subdigraph H of D with its vertex set V (H).For example, we write D − H and v ∈ H instead of D − V (H) and v ∈ V (H).A cycle and a path in the paper always means a directed cycle and path.Let C n and P n denote a cycle and a path with n vertices, respectively.
Let Q = D[H 1 , . . ., H r ] be a composition.For a vertex v ∈ V (Q), we use the notation H(v) to denote the digraph H i containing v and use v D to denote the vertex in D which v corresponds to.The following direct consequence of the definition of a composition will be used many times in the paper.
Remark 2 For a given composition Q = D[H 1 , . . ., H n ], if we pick an arbitrary vertex in each H i , then the digraph induced by these vertices is isomorphic to D.
A digraph D = (V, A) has a strong arc decomposition if A can be partitioned into arc-disjoint subsets A 1 and A 2 such that both (V, A 1 ) and (V, A 2 ) are strong.Clearly if a digraph D has a strong arc decomposition, then it has a good (u, v)-pair for every choice of u, v ∈ V .Let S 4 be a digraph which obtained from the complete digraph with four vertices by deleting the arcs of a cycle of length four.Bang-Jensen, Gutin and Yeo gave the following characterization of semicomplete compositions with a strong arc decomposition.
Theorem 2.1 [5] Let S be a strong semicomplete digraph on s ≥ 2 vertices and let H 1 , . . ., H s be arbitrary digraphs.Then Q = S[H 1 , . . ., H s ] has a strong arc decomposition if and only if Q is 2-arcstrong and is not isomorphic to one of the following four digraphs: The following theorem follows immediately from Theorems 1.5 and 2.1.

Theorem 2.2 [5]
A quasi-transitive digraph Q has a strong arc decomposition if and only if Q is 2-arcstrong and is not isomorphic to one of the following four digraphs: Lemma 2.4 Let D be a digraph and let X be a subset of V (D) such that every vertex of X has both an in-neighbor and an out-neighbor in D − X.If D − X has a good (u, v)-pair then D has a good (u, v)-pair.
Proof.Let (O, I) be a good (u, v)-pair in D − X.By assumption, every vertex x ∈ X has an out-neighbor Note that if D has a good (u, v)-pair with u = v then D contains two arc-disjoint (u, v)-paths.Thus the following holds.Lemma 2.5 [8] Let D be a digraph and let u, v be two vertices of D such that there is an out-branching rooted at u in D. Suppose that D has no out-branching B + u,D which is arc-disjoint from some (u, v)-path.Then there exists a partition Next we consider arc-connectivity of compositions of digraphs.
Lemma 2.6 Let D be a digraph of order n ≥ 2 and let H 1 , . . ., H n be arbitrary digraphs.Suppose that Proof.Let v be the vertex we delete from H i .If Q ′ is not k-arc-strong, then there exists a partition X, X such that there are at most k − 1 arcs from X to X.As Q is k-arc-strong, v has an in-neighbor v − in X and out-neighbor v + in X.It follows by the fact that H i is an independent set that none of v − and v + belong to H i .Further, for each w there are at least k such paths and hence there are at least k arcs from X to X, a contradiction.
Lemma 2.7 Let D be a digraph of order n ≥ 2 and let H 1 , . . ., H n be arbitrary digraphs.Suppose that Proof.It suffices to show that for any two vertices u and v of Q, there are k arc-disjoint (u, v)-paths in Q.If u and v belong to different H r s, we may assume that both u and v are vertices of D by Remark 2, that is, ) be k distinct vertices of H(w i ).Then P 1 , . . ., P k , where So assume that u and v belong to the same H r , w.l.o.g.assume that u D = v D = u by Remark 2. Let z ′ be an out-neighbor of u in D and let z ∈ H(z ′ ) be arbitrary.By the above argument, there are The following alternative classification of semicomplete digraphs with good (u, v)-pairs is more complicated than the classification given in Theorem 1.2 but it turns out to be much more useful in classifying semicomplete compositions with good (u, v)-pairs.Theorem 2.8 [8] Let D be a semicomplete digraph and u, v be arbitrary chosen vertices (possibly u = v).Then D has a good (u, v)-pair if and only if (D, u, v) satisfies none of the following conditions.
(i) D is isomorphic to one of the digraphs in Figure 1.
(ii) D is non-strong and either u is not in the initial component of D or v is not in the terminal component of D.
(iii) D is strong and there exists an arc e ∈ A(D) such that u is not in the initial component of D − e and v is not in the terminal component of D − e.
(iv) D is strong and there exists a partition V 1 , . . ., V 2α+3 of V (D) for some α ≥ 1 such that v ∈ V 2 , u ∈ V 2α+2 and all arcs between V i and V j with i < j from V i to V j with the following exceptions.There exists precisely one arc from V i+2 to V i for all i ∈ [2α + 1] and it goes from the terminal component of D V i+2 to the initial component of D V i .

Formulating the main theorem
A tournament is reverse-path transitive if it is obtained from a transitive tournament by reversing the arcs of the unique hamiltonian path.We use RT n to denote a reverse-path transitive tournament with n vertices.Note that RT 3 = C 3 .Let K r denote the digraph on r vertices and no arcs.
Definition 1 Let S be a semicomplete digraph and let a, b be two arbitrary vertices (possibly a = b).The 3-tuple (S, a, b) is said to be of type A, for some α ≥ 1, if there exists a partition V 1 , . . ., V 2α+1 of V (S) such that b ∈ V 2 , a ∈ V 2α and all arcs between V i and V j with i < j from V i to V j with the following exceptions.There exists precisely one arc and all arcs between V i and V j with i < j from V i to V j with the following exceptions.There exists precisely one arc x i y i from V β+2−i to V β+1−i for all i ∈ [β] such that there are two arc-disjoint (y i−1 , x i )-paths in S V β+2−i when i ≥ 2 and y i−1 = x i .Further, x 1 belongs to the terminal component of S V β+1 and y β belongs to the initial component of Table 1: A list of some semicomplete compositions without good (u, v)-pairs.(See Figure 3 for (a)-(e).) has exactly in-degree (resp., out-degree) one; where t ≥ 1, H is an arbitrary digraph and each vertex in H(u) − u has exactly in-degree one; (f) The strong semicomplete composition obtained from RT 5 [H, K 1 , z, H(u), v] by reversing some arcs from H to K 1 or adding some arcs from K 1 to H (or both); (g) The digraph in Figure 1 (e); Figure 3: Semicomplete compositions with no good (u, v)-pair.The bold arcs indicate that all possible arcs are present in the shown direction, in particular, the bold arc in (e) from right to left indicates that all possible arcs between two non consecutive digraphs H i s are from right to left.The red dotted arcs indicate arcs that possibly not exist and the digraph H is an arbitrary digraph (possibly empty).In (d)-(e), each vertex in H(u) − u (resp., H(v) − v) has in-degree (resp., out-degree) one.The integer t in (e) is at least one.
reversing all arcs and interchanging the names of u and v.
Proof.Observe that by symmetry and Theorem 2.8 (i), we only need to consider the case that Q is isomorphic to one of the digraphs shown in Table 1 (a)-(f).Suppose that there is a good (u, v)-pair . Let u + be the successor of u on P 1 and let v − be the predecessor of v on P 2 .Observe that P 1 and P 2 are internally vertex-disjoint and 1 ≤ |A(P i )| ≤ 3 for each i.If u + = v, then the vertex u + needs an out-arc in Q − P 1 to ensure that u + can be collected in B − v .In the same way, if v − = u, then v − needs an in-arc in Q − P 2 to ensure that v − can be collected in B + u .Further, if both of the inand out-arcs exist, then they should be distinct.However, it's impossible as either the only possible arc is u + v − or one of u + and v − has no such arc.
Observe that for the digraphs in (d)-(f) the vertex z is the only in-neighbor of every vertex in H(u) − u.So all arcs from z to H(u) − u must belong to the out-branching B + u .For the case that , as z is also the only out-neighbor of every vertex in H(v) − v, all arcs from H(v) − v to z must belong to B − v and then uvz and zuv should be in the out-and in-branching of Q, respectively.Then we get a contradiction as the arc uv is used twice in (B + u , B − v ).In the case that Q is isomorphic to the digraph in (e) or (f), to collect the vertices of K t to B − v , all arcs from K t to z must belong to the in-branching.Moreover, since all arcs from z to H(u) − u must belong to the out-branching B + u , we have zu, uv ∈ B − v .Then we obtain a contradiction again as either uv or one of the arcs from K t to z is used twice in (B + u , B − v ).Now we can state the main result of the paper.Recall that for any vertex v ∈ V (Q), v S is the vertex in S which v corresponds to.Theorem 3.2 Let S be a strong semicomplete digraph of order s ≥ 2 and let H 1 , . . ., H s be arbitrary digraphs.Suppose that Q = S[H 1 , . . ., H s ] and u, v are two arbitrary vertices of Then Q has a good (u, v)-pair if and only if it satisfies none of the following conditions.
(i) Q or ← − Q is isomorphic to one of the digraphs in Table 1, where ← − Q is obtained from Q be reversing all arcs and interchanging the names of u and v.
(ii) (S, u S , v S ) is of type A and for each backward arc xy, either

Almost good pairs in semicomplete digraphs
In order to use Theorem 2.8 in our proofs, we need the following refinement.Note that if (S, a, b) is of type A (resp., type B), then any pair of branchings B + a and B − b in S must share at least one backward arc (resp., all backward arcs) of S. Proof.Apply Theorem 2.8 to the strong semicomplete digraph S with u = a, v = b.By the assumption that S has no good (a, b)-pair and it is not isomorphic to one of the digraphs in Figure 1 (c)-(f), we may assume that (S, a, b) satisfies one of the statements (iii) and (iv) of Theorem 2.8.Suppose first that statement (iv) of Theorem 2.8 holds.Then (S, a, b) is of type A with α ≥ 2. We claim that for each backward arc x r y r , there exist branchings B + a , B − b in S such that they share only the arc x r y r , which implies (I).Let V 1 , . . ., V 2α+1 be the partition of V (S) and let B be the set of backward arcs of S, that is, B = {x 1 y 1 , x 2 y 2 , . . ., x 2α−1 y 2α−1 }.
Let A = {x 2 y 2 , x 4 y 4 , . . ., x r y r , x r+1 y r+1 , x r+3 y r+3 , . . ., x 2α−1 y 2α−1 } when r is even and A = {x 2 y 2 , x 4 y 4 , . . ., x r−1 y r−1 , x r y r , x r+2 y r+2 , . . ., x 2α−1 y 2α−1 } when r is odd, in particular, A = {x 1 y 1 , x 3 y 3 , . . ., x 2α−1 y 2α−1 } when r = 1 and A = {x 2 y 2 , x 3 y 3 , x 5 y 5 , . . ., x 2α−1 y 2α−1 } when r ∈ {2, 3}.Let P a,y2α−1 be an (a, y 2α−1 )-path containing an (a, x 2 )-path in V 2α and all arcs in A and let P x1,b be an (x 1 , b)-path containing a (y 2α−2 , b)-path in V 2 and all arcs in (B−A)∪{x r y r }.Furthermore, we can construct these two paths (by linking subpaths and arcs in A or (B − A) ∪ {x r y r } with some shortest (y i , x i+2 )-paths or arcs in {y i x i+1 , x i+1 x i , y i+1 y i }) such that they only intersect in the arc x r y r .Now we can get a wanted pair (B + a , B − b ) as follows.Construct B + a from an out-branching rooted at y 2α−1 in S V 1 and the path P a,y2α−1 by adding arcs Hence we may assume that there is no (a, b)-path in S − xy, which means that a x belongs to the terminal component of S W 2 and y belongs to the initial component of S W 1 .It is not difficult to check that (II) holds with partition W 1 and W 2 if there is a pair of arc-disjoint (y, b)-path and out-branching rooted at y in S W 1 and, a pair of arc-disjoint (a, x)-path and in-branching rooted at x in S W 2 .
Suppose that S W 1 has no pair of arc-disjoint (y, b)-path and an out-branching rooted at y in S W 1 .By Lemma 2.5, there is a partition W, W 1 − W of W 1 such that b ∈ W, y ∈ W 1 − W and only one arc from W 1 − W to W .Let y ′ be the head of the arc entering W . Again, if there is no arc-disjoint (y ′ , b)-path and out-branching rooted at y ′ in S W , there is a similar partition of W .By symmetry, we can apply a similar argument on S W 2 .Repeating this, one can obtain a partition V 1 , . . ., V β+1 of V (S) with b ∈ V 1 , a ∈ V β+1 such that there exists precisely one arc x i y i from V β+2−i to V β+1−i for all i ∈ [β] and there is a pair of arc-disjoint P y β ,b and B + y β ,S V1 in S V 1 and a pair of arc-disjoint P a,x1 and It should be noted that we may further assume that there are two arc-disjoint (y i−1 , x i )paths P yi−1,xi and P ′ yi−1,xi in S V β+2−i when y i−1 = x i since otherwise by Menger's theorem one can partition V β+2−i into V and V ′ such that y i−1 ∈ V, x i ∈ V ′ and there is only one arc from V to V ′ .This means we can assume that (S, a, b) is of type B with partition V 1 , . . ., V β+1 .
Then one can obtain a wanted branchings B + a , B − b as follows.Construct B + a from the path P a,x1 , the out-branching B + y β ,S V1 of S V 1 and every path P yi−1,xi with y i−1 = x i by adding all backward arcs x i y i and all arcs from y β to uncovered vertices.In the same way, construct B − b from P y β ,b , the in-branching B + x1,S V β+1 and every path P ′ yi−1,xi with y i−1 = x i by adding all backward arcs and all arcs from uncovered vertices to x 1 , which implies (II).

Good pairs in compositions of strong semicomplete digraphs
Let S be a strong semicomplete digraph of order s ≥ 2 and let H 1 , . . ., H s be arbitrary digraphs.Suppose that Q = S[H 1 , . . ., H s ] and u, v are two arbitrary vertices of Q. Recall that for a vertex x ∈ Q, H(x) is the digraph H i containing the vertex x and, x S is the vertex in S which x corresponds to.By Remark 2, we assume that the following statement holds.

First case: Q is 2-arc-strong
We start by giving a characterization of 2-arc-strong compositions Q with a good (u, v)-pair.Lemma 5.1 Let S be a strong semicomplete digraph on s ≥ 2 vertices and let H 1 , . . ., H s be arbitrary digraphs.Suppose that Proof.The necessity follows by Lemma 3.1.To see the sufficiency, observe that if Q has a strong arc decomposition then Q clearly has a good (u, v)-pair.By Theorems 2.1 and 2.3 and the fact that S 4 is 2-arc-strong, we may assume that , where H ′ is isomorphic to one of the digraphs K 2 , K 3 or P 2 .Let x, y, z be the vertices of C 3 such that C 3 = xyzx and choose {z 1 , z 2 } ⊆ V (H(z)), {x 1 , x 2 } ⊆ V (H(x)) and {y 1 , y 2 } ⊆ V (H(y)).W.l.o.g, assume that u = z 1 by Remark 2.
For the case that u = v or H(u) = H(v), we may assume that , where e is the out-arc of v in C. Lemma 2.4 implies that Q has a good (u, v)-pair.
Hence it suffices to consider the case that H(u) = H(v) and u = v, assume w.l.o.g that   Therefore, we may assume that As Q is not isomorphic to one of the exceptions in Table 1 (a), we may assume that one of the digraphs H(x), H(y) or H(z) has an arc.Further, if there is no arc with both ends in H(x) or H(y), then u dominates v, i.e., z 1 z 2 ∈ A(Q) as we assume that Q is not isomorphic to the exception.Now one can construct a good (u, v)-pair 4 (d)-(f).This completes the proof.

The case when S has a good (u S , v S )-pair
Next we consider the case that there is a good (u S , v S )-pair in S. If uv ∈ A(Q), then (O ∪ {u I v}, I ∪ {uv}) is a good (u, v)-pair in Q.So it suffices to consider the case that u does not dominate v. Then u has out-degree at least 2 and v has in-degree at least 2 in Q − {u, v}.Let u 1 , . . ., u p , p ≥ 2 be out-neighbors of u and let v 1 , . . ., v q , q ≥ 2 be in-neighbors of v in Q − {u, v}, respectively.Since u and v have the same out-and in-neighbors in Q − H(u) and no arc of ∪ t i=1 A(H i ) is used in O ∪ I, we can assume that u 1 , . . ., u p and v 1 , . . ., v q are labeled such that the out-arcs of u in O are {uu i : i ∈ [p ′ ]}, where 1 ≤ p ′ ≤ p and, the arcs in {v i u : i ∈ [q ′ ]} with 1 ≤ q ′ ≤ q belong to I.
Suppose first that the following condition holds possibly after permuting u 1 , . . ., u p ′ .
The arc v 1 u belongs to the (u 2 , u)-path in I and, there exists Then one can obtain a good (u, v)-pair in Q as follows: is the in-branching and construct the out-branching from O ∪ {v r v} by adding the arc vu 2 if uu 2 ∈ A(O).Note that the condition (2) guarantees that no cycle occurs in either branchings after the modification.
Thus it suffices to show that there exists a good pair rooted at u in Q − v which satisfies the condition (2).By relabeling v 1 , . . ., v q if necessary, we may assume that the first statement of (2) holds.If the second part of the condition does not hold, then uu 2 ∈ A(O) and uu 2 is on the (u, v r )-path in O for each r > 1.As O is an out-branching, there is no (u 1 , v r )-path in O for any r > 1.So if v 1 u also belongs to the (u 1 , u)-path in I, then we can exchange the labels of u 1 and u 2 and then (2) holds.Thus we may assume that v 2 u belongs to the (u 1 , u)-path in I, which implies that d − I (u) ≥ 2.Moreover, there is a (u 1 , v 1 )-path in O, otherwise (2) will hold with r = 2 when we exchange the labels of u 1 and u 2 and the labels of v 1 and v 2 .
It should be noted that v 1 = u 2 and v 2 = u 1 as there is a (u i , v i )-path in the out-branching O for each i ∈ [2].Since v 1 and v 2 are dominated by distinct vertices in O, we conclude that v 1 , v 2 / ∈ H(u) and H(v 1 ) = H(v 2 ) by the construction of O. Thus H(v i ) dominates H(v 3−i ) for some i ∈ [2] as S is semicomplete.We may w.l.o.g.assume that i = 1 and then v 1 v 2 ∈ A(Q) (see Figure 5).Then the in-branching I and the out-branching obtained from O by deleting the in-arc of v 2 in O and adding the arc v 1 v 2 form a good pair rooted at u in Q − v satisfying condition (2) with r = 2, which completes the proof.

share only one arc
We start by recalling the characterization of semicomplete digraphs without good (u, u)-pairs.Theorem 5.4 [6] Let S be a strong semicomplete digraph and let u ∈ V (S) be arbitrary vertex.Suppose that S does not contain a good (u, u)-pair.Then the following holds where X, Y, Z form a partition of V (S) − u such that N + S (u) = X ∪ Z and N − S (u) = Y ∪ Z, where Z is the set of vertices that form a 2-cycle with u: There is precisely one arc e leaving the terminal component of S X and precisely one arc e ′ entering the initial component of S Y and e = e ′ .In particular (S, u, u) is of type A with α = 1 and backward arc e.
We first consider the case when u and v correspond to the same vertex of S. Lemma 5.5 Let S be a strong semicomplete digraph on s ≥ 2 vertices and let H 1 , . . ., H s be arbitrary digraphs.Let Q = S[H 1 , . . ., H s ] and let u, v be two vertices of the same H r for some r ∈ [s] with Proof.It follows by Remark 4 that u S = v S = u.Since S has no good (u, u)-pair, by Theorem 5.4, there is a partition X, Y, Z of V (S) − u such that N + S (u) = X ∪ Z and N − S (u) = Y ∪ Z, where Z is the set of vertices that form a 2-cycle with u.Further, (S, u S , v S ) is of type A with α = 1 and backward arc xy, where xy is the only arc leaving the terminal component of S X (resp., entering the initial component of S Y ).As x belongs to the terminal component of S X there is an in-branching B − x,S X rooted at x in S X .Similarly, as y belongs to the initial component of S Y , there is an out-branching B + y,S Y rooted at y in S Y .Using these branchings, one easily obtains a good (u, u)-pair B + u,S , B − u,S in S such that A(B + u,S ) ∩ A(B − u,S ) = {xy}.Suppose that conditions (i) and (ii) do not hold.We may assume w.l.o.g. that |H(x)| ≥ 2 and by Remark 2 we may choose {x, x ′ } ⊆ H(x) such that d + Q (x ′ ) ≥ 2 and, if x ′ has an out-neighbor in H(x), then assume that x is such an neighbor, i.e., x ′ x ∈ A(Q).Let e be an out-arc of x ′ in Q which is distinct from x ′ y.Since xy is the only one arc in S leaving the terminal component of S X and x ′ ∈ H(x), the arc e goes to some vertex in the terminal component of S X .
If u = v, then (B + u,S − xy) ∪ {ux ′ , x ′ y} and B − u,S ∪ {e} form a good (u, u)-pair in Q V (S) ∪ {x ′ } and there is a good (u, u)-pair in Q by Lemma 2.4.So u = v and by our assumption we have First we consider the case that |H(y)| = 1, that is, y = y ′ .Recall that v has in-degree two and e is an out-arc of x ′ in Q which is distinct from x ′ y.Let z be an in-neighbor of v in Q − y.Note that that z belongs to some In both cases, Q has a good (u, v)-pair by Lemma 2.4.So we may assume that Z = ∅, X = {x} and Y = {y}, which implies that S = uxyu.Since each of H(u), H(x) and H(y) has order at least 2 (recall that u and v are two distinct vertices in H(u)), the digraph Q is 2-arc-strong, which contradicts our assumption.
It remains to consider the case when u and v correspond to distinct vertices of S and hence H(u) = H(v).
Proof.It follows by Remark 4 that u S = u and v S = v.So the vertices u, v, x and y all belong to V (S).Analogous to the construction in the proof of Lemma 5.2, for a given pair (B + u,S , B − v,S ) of S with . By the construction of B + u,Q and B − v,Q , the arc x 1 y belongs to A(B + u,Q ), and x 1 y and x 2 y belong to -pair in Q, contradicting our assumption.So x 1 has out-degree zero in H(x) and then there is an out-neighbor y ′ of x 1 in Q − H(x) − y.Note that as the arcs x 1 y, x 2 y belong to the in-branching Moreover, by the way we constructed B + u,Q and the fact that x 1 = x belongs to V (S), we have Q by deleting the in-arcs of y, y ′ in B + u,Q and adding arcs x 1 y ′ , x 2 y and let ) be a pair obtained from (O, I) by exchanging the four edges between {x 1 , x 2 } and {y, y ′ }, that is, O ′ = (O − {x 1 y ′ , x 2 y} ∪ {x 1 y, x 2 y ′ }) and I ′ = (I − {x 1 y, x 2 y ′ } ∪ {x 1 y ′ , x 2 y}) (see Figure 7).Next we show that for each out-neighbor y ′ of x 1 in Q − H(x) − y, the following statements hold.(A) There is no (y ′ , x 2 )-path in B + u,Q .(B) There is a (y ′ , x 1 )-path in B − v,Q .Suppose to the contrary that for some out-neighbor y ′ of x 1 there is a (y ′ , x 2 )-path P y ′ ,x2 in B + u,Q (and consequently also in O and O ′ ).By the construction of B + u,Q , if u / ∈ H(x), then all vertices in H(x) are dominated by the same vertex in B + u,Q and if u ∈ H(x), then u = x 1 by our assumption.In both cases x 1 and y are not on P y ′ ,x2 as the path belongs to the out-branching B + u,Q .Then B + u,Q does not contain a path from y to any vertex in P y ′ ,x2 − y ′ as it is an out-branching.Observe that there is no (y, x 1 )-path in the in-branching B − v,Q as x 1 y is an arc of B − v,Q and by the construction of B − v,Q , the vertex x 2 has in-degree zero in B − v,Q , thus I is an in-branching rooted at v in Q.There is clearly no (y, x 1 )-path in the out-branching B + u,Q as x 1 y ∈ B + u,Q .Combining this and the fact that x 1 is the only in-neighbor of ) is a good (u, v)-pair in Q, which contradicts our assumption.So it suffices to consider the case that there is a (y ′ , x 1 )-path form a good (u, v)-pair in Q, a contradiction again.Therefore, (A) holds.Suppose that there is an out-neighbor y ′ such that there is no (y ′ , x 1 )-path.It follows by (A) that there is no (y ′ , x 2 )-path in B + u,Q and then (O ′ , I ′ ) is a good (u, v)-pair in Q.This contradicts our assumption.So (B) holds.
For a given out-neighbor y ′ of x 1 in Q − H(x) − y, let z be the predecessor of x 1 on the path Here it should be noted that there is no (y, z)-path in ) and z = u I .Further, by the arbitrariness of the in-neighbor u I of u, we may assume that each vertex in H(x), i.e., H(u), has exactly one in-neighbor z in Q − H(u).Then (B) implies that y is the only possible vertex which v can be as every other vertex has out-degree one in B − v,Q .This establishes (a) in the statement of the lemma.If there exists x i ∈ H(u) − u such that x i has in-degree at least two in Q, we can assume w.l.o.g that x i = x 2 and x 3 ∈ H(u) is an in-neighbor of x 2 .By the previously established fact that x 1 has no out-neighbor in H(x) = H(u), we must have Otherwise, there is an internal vertex w in the (y, z)-path and then w has a path to x 2 and u dominates w, which contradicts (A).
Suppose that there exists a vertex v ′ ∈ H(v) − v with out-degree at least two in Q.Then u dominates v ′ and v ′ dominates z.Let z ′ be another out-neighbor of v ′ in Q which is distinct fromz.Choose v ′ as the vertex y ′ , construct an in-branching rooted at v from I by deleting the out-arc of y ′ in I and adding the arc y ′ z ′ .Since x 2 y ′ ∈ A(I) and x 2 has in-degree zero in I, the arc y ′ z ′ does not belong to a cycle in the new resulting in-branching.Again, by the construction of O and the fact x 1 y ∈ A(B + u,Q ), there is no (y, x 1 )-path in O.So the in-branching and (O − vz) ∪ {y ′ z} form a good (u, v)-pair in Q, a contradiction again.Thus each vertex in H(v) − v out-degree exactly one in Q, implying that (b) in the statement of the lemma holds.
Next we show the possible structures of Q. Recall that z is the only in-neighbor of each vertex of H(u) − u, consequently, is the only in-neighbor of u in S as S is strong.Since z is the predecessor of x 1 on the path P y ′ ,x1 in the branching B − v,Q , we get that z = v and then Q is not isomorphic to one of the digraphs in Figure 1 (c)-(f).Further, by the definition of a composition, |H(z)| = 1.Since S has no good (u, v)-pair but it has branchings Otherwise, as z is the only in-neighbor of u in S, we have that there is no arc from Here it should be noted that in both cases S is a 3-cycle, that is, z does not dominate v and u does not dominate z in S. Otherwise, it is not difficult to check that Q has a good (u, v)-pair by the assumption In this case, as z is the only in-neighbor of u in S and A(B + u,S ) ∩ A(B − v,S ) = {uv}, there is an in-branching rooted at z in Q − H(u) − v, say I z .If there is a (u, z)-path P in Q − v which is arc-disjoint with I z , then one can construct a good (u, v)-pair in Q as follows, which contradicts our assumption: Let u O be the successor of u on P and let I z ∪ {zu, uv} ∪ {ru O : r ∈ H(u) − u} be the in-branching and construct the out-branching from the path P by adding arcs {zr : r ∈ H(u) − u} ∪ {vr : r ∈ Q − H(u) − P } and an arc from H(u) − u to v.
So we may assume that there is no such path P , which implies that u does not dominate z and, for any w ∈ Q − H(u)− {z, v} there is no in-branching rooted at z which is arc-disjoint from some (w, z)-path in Q − H(u) − v.In particular, no such branching and path in S − {u, v}.It follows by (the symmetrical form of) Lemma 2.5 that z has exactly one in-neighbor z − in S − {u, v}.Further, if |H(z − )| ≥ 2, then z is the only out-neighbor of H(z − ) as there is no such branching and path in Q − H(u) − v.This implies that Q is isomorphic to one of the digraphs shown in Q is obtained from Q be reversing all arcs and interchanging the names of u and v.

Proof of Theorem 3.2
For convenience we repeat the statement of the theorem.Theorem 3.2 Let S be a strong semicomplete digraph of order s ≥ 2 and let H 1 , . . ., H s be arbitrary digraphs.Suppose that Q = S[H 1 , . . ., H s ] and u, v are two arbitrary vertices of Then Q has a good (u, v)-pair if and only if it satisfies none of the following conditions.
(i) Q or ← − Q is isomorphic to one of the digraphs in Table 1, where ← − Q is obtained from Q be reversing all arcs and interchanging the names of u and v. Proof.First we show that there is no good (u, v)-pair if one of (i)-(iii) holds.If Q or ← − Q is isomorphic to one of the digraphs described in Table 1 then it follows from Lemma 3.1 that Q has no good (u, v)-pair.Recall that if (S, u S , v S ) is of type A (resp., type B), then any pair of branchings B + uS ,S and B − vS ,S of S must share at least one backward arc (resp., all backward arcs) of S. This implies that for every good (u, v)-pair Q (w) = 1 for every w ∈ H(x).Suppose that the arc wy from H(x) to y is used in the out-branching B + u,Q .Then w has out-degree zero in Q − B + u,Q and thus it can not be collected into any in-branching with root v, a contradiction.Therefore, there is no good (u, v)-pair in Q when (ii) or (iii) holds.Now suppose that none of (i)-(iii) holds.We proceed to prove that there is a good (u, v)-pair in Q.First we may assume that Q is not 2-arc-strong, since otherwise there is nothing to prove by Lemma 5.1 and the fact that Q not isomorphic to one of the two digraphs in Table 1 (a).Further, by Lemmas 5.2 and 5.3, we may assume that there is no good (u S , v S )-pair in S, where u S and v S are the vertices in S which u and v correspond to, respectively.Recall that by Remark 4, u S = v S = u when H(u) = H(v) and u = v and, u S = u, v S = v when H(u) = H(v) or u = v.If the digraph S is isomorphic to one of the digraphs in Figure 1 (c)-(f), then either its composition Q (or ← − Q ) is isomorphic to one of the digraphs in Table 1 (b), (c), (g) or there is a good (u, v)-pair in Q.So we may assume that S not isomorphic to any such digraph.Then by the fact that S has no good (u S , v S )-pair, there is a partition of V (S) satisfying Lemma 4.1.Let (V 1 , . . ., V p ) be such a partition and let (x 1 y 1 , . . ., x q y q ) be the ordering of the backward arcs such that x 1 ∈ V p and y q ∈ V 1 .Now we are ready to apply Lemma 4.1.
First we consider the case that (S, u S , v S ) is either of type A or of type B with β = 1.In this case, S has a (u S , v S )-pair where the branchings share only one arc.Since conditions (ii) and (iii) do not hold, we may assume that there is a backward arc xy of S with |H(x)| ≥ 2 such that there is a vertex w ∈ H(x) with d + Q (w) ≥ 2. Then by Lemmas 5.5 and 5.6 (or by Corollary 2 if we consider the case |H(y)| ≥ 2), we have that Q has a good (u, v)-pair, otherwise, the statement (i) of the theorem holds and we obtain a contradiction.
So it suffices to consider the case that every pair of out-and in-branchings B + uS ,S , B − vS ,S of S share at least two arcs, that is, we are in case (II) of Lemma 4.1.This implies that (S, u S , v S ) is of type B with p = β + 1, q = β, β ≥ 2. Since (iii) does not hold, either |H(x i )| ≥ 2 or |H(y i )| ≥ 2, for each backward arc x i y i .
Starting from the semicomplete digraph S we now construct the induced subdigraph Q ′ of Q as follows: (a) For the backward arc x 1 y 1 , if |H(y 1 )| ≥ 2, then add a copy of y 1 to V (Q ′ ), otherwise add a copy of x 1 to V (Q ′ ).
(b) For the backward arc x β y β , if |H(x β )| ≥ 2, then add a copy of x β to V (Q ′ ), otherwise add a copy of y β .
(c) For any x i y i with 1 < i < β, add all vertices of H(x i ) and H(y i ) to V (Q ′ ).
In the following, we use x ′ i and y ′ i to denote a copy of x i and y i , that is, a vertex of H(x i ) − x i and H(y i )− y i , respectively.It follows by Remark 2 that for a vertex w, every vertex in H(w) can be regarded as the vertex w or w ′ .So if there is an arc ab in H(w), we choose {w, w ′ } = {a, b} and we may choose a (resp., b) to be the vertex w or w ′ if the arc ab is useful as an out-arc of a (resp., in-arc of b) in the argument below.
Next we construct a good (u, v)-pair in Q ′ and then it follows by Lemma 2.4 that Q has the wanted pair.Since there is a pair of branchings B + u,S , B − v,S in S such that A(B + u,S ) ∩ A(B − v,S ) = {x 1 y 1 , . . ., x β y β } (Lemma 4.1 (II)), the subdigraph S V 1 has an out-branching rooted at y β which arc-disjoint from some (y β , v)-path P y β ,v Similarly, the subdigraph S V β+1 contains an in-branching I rooted at x 1 and a path P u,x1 which are arc-disjoint.Since Q ′ is a composition of S, there is an out-branching which is arc-disjoint from the path P y β ,v and and an in-branching 1 } which is arc-disjoint from the path P u,x1 .Recall that there are two arc-disjoint (y i−1 , x i )-paths in S V β+2−i when y i−1 = x i (the definition of type B in Definition 1).By the way we defined Q ′ it follows that there are two arc-disjoint paths from H(x 1 ) to H(y β ) in Q ′ as either |H(x i )| ≥ 2 or |H(y i )| ≥ 2 for each x i y i .Next we show how to construct a good (u, v)-pair in Q ′ from such a pair of arc-disjoint paths.

Case 1. |H(y
In this case the vertices x 1 , x ′ 1 , y β and y ′ β belong to V (Q ′ ).Since (iii) does not hold, we may assume that x 1 has out-degree at least two and y β has in-degree at least two in Q.Let P 1 be an (x 1 , y ′ β )-path and let P 2 be an (x ′ 1 , y β )-path in Q ′ such that they are arc-disjoint.As |H(y 1 )| = |H(x β )| = 1, we have that y 1 and x β belong to both P 1 and P 2 .Using P 1 and P 2 one can construct a good (u, v)-pair by adding an in-arc of y β which is distinct from x β y β and all arcs from y β to uncovered vertices of V (Q ′ ).By symmetry, one can construct B − v from the paths P y β ,v , P 2 and the in-branching I ′ rooted at x ′ 1 in Q (V β+1 − x 1 ) ∪ {x ′ 1 } by adding an out-arc of x 1 which is distinct from x 1 y 1 and all arcs from uncovered vertices of V (Q ′ ) to x 1 .See Figure 8.
are not covered by the paths P 1 , P u,x1 Similarly x 1 is used to collect those vertices of V (Q ′ ) − V β+1 which are not covered by the paths P 2 , P y β ,v .
Before considering Cases 2 and 3, we claim that if |H(y i−1 )| ≥ 2 for some 2 ≤ i ≤ β, then there is a vertex in H(y i−1 ) with out-degree at least two in Q (and thus also in Q ′ by the definition of Q ′ ).Recall that there are two arc-disjoint (y i−1 , x i )-paths in S V β+2−i when y i−1 = x i .So if y i−1 = x i , there is nothing to prove.Therefore, we may assume that y i−1 = x i and then |H(x i )| = |H(y i−1 )| ≥ 2. The claim follows by the assumption that the statement (iii) of Theorem 3.2 does not hold.It should be noted that if all out-neighbors of y 1 in Q − y 2 are in H(y 1 ), then we will pick one of such out-neighbor as y ′ 1 , so y 1 also has out-degree two in Q ′ .By symmetry, if |H(x i )| ≥ 2 for some 2 ≤ i ≤ β, then there is a vertex in H(x i ) with in-degree at least two in Q. Reversing all arcs of Q ′ and switching the role of u and v if necessary, we may assume that |H(y 1 )| ≥ 2 and |H(x β )| = 1.By the construction of Q ′ , we have that y ′ 1 and y ′ β belong to V (Q ′ ).Again, since (iii) does not hold, we may assume that y β has in-degree at least two in Q.By the claim before Case 2, we may assume that y 1 has out-degree at least two in Q ′ .Let P 1 (resp., P 2 ) be an (x 1 , y ′ β )-path containing y 1 (resp., an (x 1 , y β )-path containing y ′ 1 ) such that they are arc-disjoint and let e be an out-arc of y 1 in Q ′ which is not on P 1 .It follows by |H(x β )| = 1 that x β ∈ P 1 ∩ P 2 .
Then one can construct a good (u, v)-pair (B + u , B − v ) in Q ′ as follows (similar to the construction in Case 1).Construct B + u from the paths P u,x1 , P 1 and the out-branching O ′ rooted at y ′ β in Q (V 1 − y β ) ∪ {y ′ β } by adding an in-arc of y β which is distinct from x β y β and all arcs from y β to uncovered vertices of V (Q ′ ).By symmetry, one can construct B − v the paths P y β ,v , P 2 and the in-branching I rooted at x 1 in Q V β+1 by adding the arc e and all arcs from uncovered vertices of V (Q ′ ) to x 1 .See Figure 9.
Here, it should be noted that y 1 may not dominate x 1 , so we use the out-arc e of y 1 to collect y 1 into In this case, it follows from the way we defined Q ′ that x 1 and y β have no copy in Q ′ .By the claim before Case 2, we may assume that y 1 has out-degree at least two and x β has in-degree at least two in Q ′ .Let P 1 and P 2 be a pair of arc-disjoint (x 1 , y β )-paths in Q ′ such that y 1 ∈ P 1 and x β ∈ P 2 .Let e y be any out-arc of y 1 in Q ′ which is not on P 1 and let e x be any in-arc of x β in Q ′ which is not on the path P 2 .
If e x = e y , then one can construct a good (u, v)-pair (B + u , B − v ) in Q ′ as follows (similar to the construction in Case 1).Construct B + u from the paths P u,x1 , P 1 and the out-branching O rooted at y β in Q V 1 by adding the arc e x and all arcs from y β to uncovered vertices of V (Q ′ ).By symmetry, one can construct B − v the paths P y β ,v , P 2 and the in-branching I rooted at x 1 in Q V β+1 by adding the arc e y and all arcs from uncovered vertices of V (Q ′ ) to x 1 .See Figure 10.So it suffices to consider the case that y 1 has only one out-arc e y not on P 1 and x β has only one in-arc e x not on P 2 and, these two arcs are the same one.Recall that (S, u, v) is of type B and each backward arc x i y i goes from V β+2−i to V β+1−i (two consecutive sets).So 2 ≤ β ≤ 3. Further, we must have x i = y i−1 for i = 2 when β = 2 and for each i ∈ {2, 3} when β = 3.Otherwise, for i = 2 there are two arc-disjoint (y 1 , x 2 )-paths P, P ′ in S V β .Assume that P is shorter than P ′ and P is contained in the path P 1 .This implies that y 1 has an out-neighbor which is an internal vertex of P ′ , say w is such out-neighbor.Then y 1 has an out-arc y 1 w = y 1 x β which is not on P 1 , a contradiction.By symmetry, for i = 3, we have y 2 = x 3 .So we may assume that {x 1 y 1 , y 1 y 2 } and {x 1 y 1 , y 1 y 2 , y 2 y 3 } are the sets of , where T + u (resp., T − v ) is an out-tree rooted at u (resp., in-tree rooted at v).
Proof.Observe that if Q is isomorphic to P 2 [T u , v] or P 2 [u, T v ], then it clearly has no good (u, v)-pair as it has size 2|V (Q)| − 3 which is less than 2(|V (Q)| − 1).Hence the necessity follows by Lemma 3.1 and Remark 3. Next we show the sufficiency.First consider the case that T is strong and hence T is complete by Lemma 6.1.If both u and v are vertices of T , there is a good (u, v)-pair in T and hence Q has a good (u, v)-pair due to Lemma 2.4.So it suffices to consider the case that u and v are two distinct vertices in the same H r , that is, both u and v correspond to the same vertex of T .
If t = 2, then Q = C 2 [H, H ′ ].By Lemmas 2.7 and 5.1, we may assume that H ′ consists of a single vertex w otherwise Q is 2-arc-strong.As u and v are two distinct vertices in the same H r , the vertices u, v belong to H. Since Q is not isomorphic to the exception, we get that d + Q (u) ≥ 2 and d − Q (v) ≥ 2. Let u O be an out-neighbor of u and v I be an in-neighbor of v in H.If u dominates v, then uvw and uwv form a good (u, v)-pair in Q {u, v, w} and hence there is the wanted pair in Q by Lemma 2.4.So we can assume that uv / ∈ A(Q).Then we can get a good (u, v)-pair of Q as follows.Let B + u,Q = {uw, v I v} ∪ {wz : z ∈ V (H) − {u, v}} and construct B − v,Q from arcs uu O and wv by adding arcs {zw : z ∈ V (H) − {u, v}}.For the case that t ≥ 3, let C = u 1 u 2 • • • u t u 1 be a hamiltonian cycle in T such that u and v correspond to the vertex u 1 .By Remark 2, we may assume that u is the vertex u 1 in T .Then (C − u t u 1 ) ∪ {u t v} and u 1 u t u t−1 • • • u 2 v form a good (u, v)-pair in Q V (T ) ∪ {v} .Lemma 2.4 shows that Q also has a good (u, v)-pair.
It remains to consider the case that T is a non-strong transitive digraph.In this case u = v so we may assume that u, v are vertices of T .Clearly, each vertex in the initial component of Q belong to a set H(w) where w is a vertex of the initial component of T .This means that there is a path from u to any other vertex of T .As T is transitive, u dominates all vertices in T − u, consequently, u dominates all vertices in Q − H(u).Moreover, since u belongs to the initial component of Q, there is an out-branching B + u,H(u) rooted at u in H(u).In the same way, each vertex in Q − H(v) dominates v and there is an in-branching B + v,H(v) rooted at v in H(v).where is an arbitrary non-empty digraph.If there is an arc xy with x ∈ H ∪ v and y ∈ H, then {ur : r ∈ Q − y} ∪ {xy} and {rv : r ∈ Q − u} ∪ {uy} form a good (u, v)-pair in Q.So we may assume that H ∼ = K n−2 and there is no arc from v to H.By symmetry, there is no arc from H to u and then Q is isomorphic to T T 3 [u, K n−2 , v], which contradicts our assumption.This completes the proof.
Recall that in a quasi-transitive digraph, the presence of the arcs xy, yz implies that there is an arc between x and z.So if Q = P 2 [T u , v] is quasi-transitive, where T u is an out-tree rooted at u, then either T u = u or T u = {ur : r ∈ T u − u}.Hence the following holds.

Remark 3
Let D be a digraph and let u, v be two distinct vertices.If there is a good (u, v)-pair in D, then d + D (u) ≥ 2 and d − D (v) ≥ 2.

Figure 2 :
Figure 2: Examples of 3-tuples (S, a, b) of type A or type B. The bold arcs indicate that all possible arcs not shown from right to left are present in the shown direction.

Lemma 4 . 1
Let S be a strong semicomplete digraph and let a, b be two arbitrary vertices (possibly a = b).Suppose that S has no good (a, b)-pair and it is not isomorphic to one of the digraphs in Figure 1 (c)-(f ) with u = a, v = b.Then one of the following statements holds.(I) (S, a, b) is of type A and for each backward arc x r y r S has a pair of branchings B + a , B − b such that A(B + a ) ∩ A(B − b ) = {x r y r }. (II) (S, a, b) is of type B and S has a pair of branchings B + a , B − b such that the intersection of their arc sets is exactly the set of backward arcs of S, that is, A(B + a ) ∩ A(B − b ) = {x 1 y 1 , . . ., x β y β }.
1 )} and, construct B − b from an in-branching B − x1,S V2α+1 and the path P x1,b by adding arcs {zx 1 : z ∈ V (S) − V 2α+1 − V (P x1,b ) − y 2α−1 } and adding the arc y 2α−1 a if y 2α−1 / ∈ P x1,b .It remains to consider the case that the statement (iii) of Theorem 2.8 holds, that is, there exists an arc xy ∈ A(S) such that a / ∈ U 1 and b / ∈ U t , where U 1 , . . ., U t is an acyclic ordering of the strong components of S − xy.Suppose first that there is an (a, b)-path P a,b in S − xy (recall that possibly a = b), then clearly, a, b / ∈ U 1 ∪ U t .We construct B + a from an out-branching B + y,U1 of U 1 and path axy by adding arcs {yz : z ∈ V (S) − U 1 − {a, x}} and construct B − b from an in-branching B − x,Ut of U t and the path xyP a,b by adding arcs {zx : z ∈ V (S) − P a,b − U t − y}.Clearly, B + a and B − b are branchings and they share exactly one arc xy.Thus (I) holds with partition that is, one of H(x), H(y) and H(z) has order three, then construct a good (u, v)-pair(O, I) in Q as follows: Let O ′ = ux 1 y 1 vx 2 y 2 .Further, let O = O ′ ∪ y 2 z 3 and I = ux 2 y 1 z 3 x 1 y 2 v if |H(z)| =3, and O = O ′ ∪ vx 3 and I = x 2 y 1 ux 3 y 2 v ∪ x 1 y 2 if |H(x)| = 3, and O = O ′ ∪ x 1 y 3 and I = x 1 y 2 ux 2 y 3 v ∪ y 1 u if |H(y)| = 3. See Figure 4 (a)-(c). u

Lemma 5 . 2 Lemma 5 . 3
Let S be a strong semicomplete digraph on s ≥ 2 vertices and let H 1 , . . ., H s be arbitrary digraphs.Let Q = S[H 1 , . . ., H s ] and let u, v be two vertices ofQ such that either u = v or H(u) = H(v).If there is a good (u S , v S )-pair in S, then Q has a good (u, v)-pair which uses no arc in ∪ i∈[s] A(H i ).Proof.By Remark 4, we have u S = u, v S = v.Let (O, I) be a good (u, v)-pair in S. Let u I u be any in-arc of u and vv O be any out-arc of v in S. The arcs exist as S is strong.Then one can construct the wanted (u, v)-pair(B + u , B − v ) of Q as follows.Construct B + u from Oby adding arcs {xr : xy ∈ A(O), r ∈ H(y)} and {u I r : r ∈ H(u) − u} and construct B − v from I by adding arcs {ry : xy ∈ A(I), r ∈ H(x)} and {rv O : r ∈ H(v) − v}.It should be noted that if u I u is an arc of the in-branching I in S, then the vertices in H(u I ) are collected by u in B − v and vertices in H(u) − u are collected by u I in B + u .So no arcs between H(u I ) and H(u) are used both in B − v and B + u .By the same argument, no arcs between H(v O ) and H(v) are used twice and thus(B + u , B − v ) is a good (u, v)-pair in Q.Let S be a semicomplete digraph on s ≥ 2 vertices and let H 1 , . . ., H s be arbitrary digraphs.Let Q = S[H 1 , . . ., H s ] and let u, v be two distinct vertices of Q such that u and v belong to the same H r .Suppose that there exists a good (u S , v S )-pair in S.If d + Q (u) ≥ 2 and d − Q (v) ≥ 2, then Q has a good (u, v)-pair.Proof.It follows by Remark 4 that u S = v S = u.Let (O S , I S ) be a good (u, u)-pair in S. Suppose that u I u ∈ A(I S ) and uu O ∈ A(O S ), which implies that every vertex of H(u I ) (resp., H(u)) dominates every vertex of H(u) (resp., H(u O )) in Q.We first extend (O S , I S ) to a good pair (O, I) rooted at u in Q − v as follows: A(O) = {xr : xy ∈ A(O S ), r ∈ H(y)} ∪ {u I r : r ∈ H(u) − {u, v}} and A(I) = {ry : xy ∈ A(I S ), r ∈ H(x)} ∪ {ru O : r ∈ H(u) − {u, v}}.
strong and that S has no good (u S , v S )-pair.Then (S, u S , v S ) is of type A with α = 1 and backward arc xy and if Q has no good (u, v)-pair,then one of the following statements holds.(i) |H(x)| = |H(y)| = 1.(ii) |H(x)| ≥ 2 and d + Q (w) = 1 for every w ∈ H(x), or |H(y)| ≥ 2 and d − Q (w) = 1 for every w ∈ H(y).

Figure 6 ( 2 Figure 6 :
Figure 6: Figures in Lemma 5.5.The red fat arcs and the blue dashed arcs indicate the out-and in-branchings, respectively. S by adding arcs {ar : ab ∈ A(B + u,S ), r ∈ H(b)} and {u I r : r ∈ H(u) − u} and construct B − v,Q from B − v,S by adding arcs {rb : ab ∈ A(B − v,S ), r ∈ H(a)} and {rv O : r ∈ H(v) − v}, where v O is an out-neighbor of v in S. The vertices u I and v O exist as S is strong.Note that {rv O : r ∈ H(v) − v} and {u I r : r ∈ H(u) − u} share no common arc as

Figure 7 :
Figure 7: The red fat arcs are in B + u,Q , O and O ′ , respectively, and the blue dashed arcs are in B − v,Q , I and I ′ , respectively.The red dotted arrow corresponds to the in-arc of y ′ in B + u,Q , possibly the in-arc is x 1 y ′ .
Q must use an arc from H(x) to H(y) for some backward arc xy if (S, a, b) is of type A (resp., for every backward arc xy if (S, a, b) is of type B).If |H(x)| = |H(y)| = 1 in Q, then there is clearly no good (u, v)-pair in Q.By symmetry, we may assume that |H(x)| ≥ 2 and that we have d +

Figure 10 :
Figure 10: Case 3 If |H(u)| ≥ 2, then let u ′ be an arbitrary vertex in H(u) − u.Let B + u,Q = B + u,H(u) ∪ {ur : r ∈ Q − H(u) − v} ∪ {u ′ v} and construct I = B − v,H(v) ∪ {rv : r ∈ Q − H(v) − u ′ }.Note that if u ′ has another out-arc e in Q − B + u,H(u) which is distinct from u ′ v, then (B + u,Q , I ∪ {e}) is a good (u, v)-pair in Q.So we may assume that if |H(u)| ≥ 2, then for any u ′ ∈ H(u) − u, it has only one out-arc u ′ v not in B + u,H(u) .This means that v = Q − H(u) and thus Q = P 2 [H(u), v].Since Q = P 2 [T u , v], there is an arc ab ∈ H(u) not in B + u,H(u) , then B + u,H(u) ∪ {av} and {ab} ∪ {rv : r ∈ H(u) − a} form a good (u, v)-pair in Q.Therefore, we may assume that |H(u)| = 1 and assume |H(v)| = 1 by symmetry.As Q is not just the digraph on two vertices and the arc uv, i.e., P 2 [u, v], Q contains a spanning subdigraph T T 3 [u, H, v], Lemma 5.6 Let S be a strong semicomplete digraph on s ≥ 2 vertices and let H 1 , . . ., H s be arbitrary digraphs.Let Q = S[H 1 , . . ., H s ] and let u, v be two vertices of Q with H(u) = H(v) and d + Q (u) ≥ 2. Suppose that S has no good (u S , v S )-pair but that it has branchings B + uS ,S , B − vS,S such that A(B + uS ,S ) ∩ A(B − vS ,S ) = {xy}.Suppose that there is no good (u, v)-pair in Q.If |H(x)| ≥ 2 and there exists a vertex w in H(x) with d + Q (w) ≥ 2, then the following holds: ( there is no (y, y ′ )-path in O and then x 2 y belongs to no cycle in O.By our assumption, (O, I) is not a good (u, v)-pair in Q and hence O must contain a cycle and by construction, this cycle contains the arc x 1 y ′ , that is, there is a (y ′ , x 1 )-path in O (and hence in B + u,Q ).Therefore, x 1 = u and x 1 y ′ / ∈ B + u,Q .By the construction of B + u,Q and O, we have that the predecessor x − 2 of x 2 on the path P y ′ ,x2 dominates x 1 in B + u,Q (and consequently in O).If there is no (y

Table 1
(e)-(f), where z − is the vertex in S which corresponds to K t .By symmetry, we have the following corollary.Corollary 2 Let S be a strong semicomplete digraph on s ≥ 2 vertices and let H 1 , . . ., H s be arbitrary digraphs.Let Q = S[H 1 , . . ., H s ] and let u, v be two vertices of Q with H(u) = H(v) and d − Q (v) ≥ 2. Suppose that S has no good (u S , v S )-pair but that it has branchings B +

6
[4]d pairs in quasi-transitive digraphs and compositions of transitive digraphs Lemma 6.1[4]Let D be a digraph with an acyclic ordering D 1 , ..., D p of its strong components.The digraph D is transitive if and only if each D i is complete, the digraph H obtained from D by contracting of D 1 , ..., D p followed by deletion of multiple arcs is a transitive oriented graph, and D = H[D 1 , ..., D p ], where p = |V (H)|.Theorem 6.2 Let T be a transitive digraph on t ≥ 2 vertices and let H 1 , ..., H t be arbitrary digraphs.Suppose that Q = T [H 1 , ..., H t ] and u (resp., v) is a vertex in the initial (resp., terminal) component of Q.Then there is a good (u, v)-pair in Q if and only if none of the following holds.•Q= T T 3 [u, K n−2 , v] (the digraph in Table 1 (b)).•Q = C 2 [H, K 1 ]such for some digraph H so that u and v are two distinct vertices of H and d + Q