On the inversion number of oriented graphs

Let $D$ be an oriented graph. The inversion of a set $X$ of vertices in $D$ consists in reversing the direction of all arcs with both ends in $X$. The inversion number of $D$, denoted by ${\rm inv}(D)$, is the minimum number of inversions needed to make $D$ acyclic. Denoting by $\tau(D)$, $\tau' (D)$, and $\nu(D)$ the cycle transversal number, the cycle arc-transversal number and the cycle packing number of $D$ respectively, one shows that ${\rm inv}(D) \leq \tau' (D)$, ${\rm inv}(D) \leq 2\tau(D)$ and there exists a function $g$ such that ${\rm inv}(D)\leq g(\nu(D))$. We conjecture that for any two oriented graphs $L$ and $R$, ${\rm inv}(L\rightarrow R) ={\rm inv}(L) +{\rm inv}(R)$ where $L\rightarrow R$ is the dijoin of $L$ and $R$. This would imply that the first two inequalities are tight. We prove this conjecture when ${\rm inv}(L)\leq 1$ and ${\rm inv}(R)\leq 2$ and when ${\rm inv}(L) ={\rm inv}(R)=2$ and $L$ and $R$ are strongly connected. We also show that the function $g$ of the third inequality satisfies $g(1)\leq 4$. We then consider the complexity of deciding whether ${\rm inv}(D)\leq k$ for a given oriented graph $D$. We show that it is NP-complete for $k=1$, which together with the above conjecture would imply that it is NP-complete for every $k$. This contrasts with a result of Belkhechine et al. which states that deciding whether ${\rm inv}(T)\leq k$ for a given tournament $T$ is polynomial-time solvable.

Making a digraph acyclic by either removing a minimum cardinality set of arcs or vertices are important and heavily studied problems, known under the names CYCLE ARC TRANSVERSAL or FEEDBACK ARC SET and CYCLE TRANSVERSAL or FEEDBACK VERTEX SET.A cycle transversal or feedback vertex set (resp.cycle arc-transversal or feedback arc set) in a digraph is a set of vertices (resp.arcs) whose deletion results in an acyclic digraph.The cycle transversal number (resp.cycle arc-transversal number) is the minimum size of a cycle transversal (resp.cycle arc-transversal) of D and is denoted by τ (D) (resp.τ (D)).It is well-known that a digraph is acyclic if and only if it admits an acyclic ordering, that is an ordering (v 1 , . . ., v n ) of its vertices such that there is no backward arc (i.e. an arc v j v i with i < j).It follows that a minimum cycle arc-transversal F in a digraph D consists only of backward arcs with respect to any acyclic ordering of D \ F .Thus the digraph D obtained from D by reversing the arcs of F is also acyclic.Conversely, if the digraph D obtained from D by reversing the arcs of F is acyclic, then D \ F is also trivially acyclic.Therefore the cycle arc-transversal number of a digraph is also the minimum size of a set of arcs whose reversal makes the digraph acyclic.
It is well-known and easy to show that τ (D) ≤ τ (D) (just take one end-vertex of each arc in a minimum cycle arc-transversal).
Computing τ (D) and τ (D) are two of the first problems shown to be NP-hard listed by Karp in [Kar72].They also remain NP-complete in tournaments as shown by Bang-Jensen and Thomassen [BJT92] and Speckenmeyer [Spe89] for τ , and by Alon [Alo06] and Charbit, Thomassé, and Yeo [CTY07] for τ .
In this paper, we consider another operation, called inversion, where we reverse all arcs of an induced subdigraph.Let D be a digraph.The inversion of a set X of vertices consists in reversing the direction of all arcs of D X .We say that we invert X in D. The resulting digraph is denoted by Inv(D; X).If (X i ) i∈I is a family of subsets of V (D), then Inv(D; (X i ) i∈I ) is the digraph obtained after inverting the X i one after another.Observe that this is independent of the order in which we invert the X i : Inv(D; (X i ) i∈I ) is obtained from D by reversing the arcs such that an odd number of the X i contain its two end-vertices.
Since an inversion preserves the directed cycles of length 2, a digraph can be made acyclic only if it has no directed cycle of length 2, that is if it is an oriented graph.Reciprocally, observe that in an oriented graph, reversing an arc a = uv is the same as inverting X a = {u, v}.Hence if F is a minimum cycle arc-transversal of D, then Inv(D; (X a ) a∈F ) is acyclic.
A decycling family of an oriented graph D is a family of subsets (X i ) i∈I of subsets of V (D) such that Inv(D; (X i ) i∈I ) is acyclic.The inversion number of an oriented graph D, denoted by inv(D), is the minimum number of inversions needed to transform D into an acyclic digraph, that is, the minimum cardinality of a decycling family.By convention, the empty digraph (no vertices) is acyclic and so has inversion number 0.

Inversion versus cycle (arc-) transversal and cycle packing
One can easily obtain the following upper bounds on the inversion number in terms of the cycle transversal number and the cycle arc-transversal number.See Section 2. A natural question is to ask whether these bounds are tight or not.We denote by C 3 the directed cycle of length 3 and by T T n the transitive tournament of order n.The vertices of T T n are v 1 , . . ., v n and its arcs {v Pouzet asked for an elementary proof of Theorem 1.2.Let L and R be two oriented graphs.The dijoin from L to R is the oriented graph, denoted by L → R, obtained from the disjoint union of L and R by adding all arcs from L to R. Observe that T T . So an elementary way to prove Theorem 1.2 would be to prove that inv( C 3 → T ) = inv(T ) + 1 for all tournament T .First inverting inv(L) subsets of V (L) to make L acyclic and then inverting inv(R) subsets of V (R) to make R acyclic, makes L → R acyclic.Therefore we have the following inequality.
In fact, we believe that equality always holds.
As observed in Proposition 2.5, this conjecture is equivalent to its restriction to tournaments.If inv(L) = 0 (resp.inv(R) = 0), then Conjecture 1.4 holds has any decycling family of R (resp.L) is also a decycling family of L → R. In Section 3, we prove Conjecture 1.4 when inv(L) = 1 and inv(R) ∈ {1, 2}.We also prove it when inv(L) = inv(R) = 2 and both L and R are strongly connected.
Let us now consider the inequality inv(D) ≤ 2τ (D) of Theorem 1.1.One can see that is tight for τ (D) = 1.Indeed, let V n be the tournament obtained from a T T n−1 by adding a vertex x such that x is acyclic, and one can easily check that inv(V n ) ≥ 2 for n ≥ 5. Observe that V 5 is strong, so by the above results, we have inv(V 5 → V 5 ) = 4 while τ (V 5 → V 5 ) = 2, so the inequality inv(D) ≤ 2τ (D) is also tight for τ (D) = 2.More generally, Conjecture 1.4 would imply that inv(T T n [V 5 ]) = 2n, while τ (T T n [V 5 ]) = n and thus that the second inequality of Theorem 1.1 is tight.Hence we conjecture the following.Conjecture 1.5.For every positive integer n, there exists an oriented graph D such that τ (D) = n and inv(D) = 2n.
A cycle packing in a digraph is a set of vertex disjoint cycles.The cycle packing number of a digraph D, denoted by ν(D), is the maximum size of a cycle packing in D. We have ν(D) ≤ τ (D) for every digraph D. On the other hand, Reed et al. [RRST96] proved that there is a (minimum) function f such that τ (D) ≤ f (ν(D)) for every digraph D. With Theorem 1.1, this implies inv(D) ≤ 2 • f (ν(D)).Theorem 1.6.There is a (minimum) function g such that inv(D) ≤ g(ν(D)) for all oriented graph D and g ≤ 2f .
A natural question is then to determine this function g or at least obtain good upper bounds on it.Note that the upper bound on f given by the proof of Reed et al. [RRST96] is huge (a multiply iterated exponential, where the number of iterations is also a multiply iterated exponential).The only known value has been established by McCuaig [McC91] who proved f (1) = 3.As noted in [RRST96], the best lower bound on f due to Alon (unpublished)  Another natural question is whether or not the inequality g ≤ 2f is tight.In Section 5, we show that it is not the case.We show that g(1) ≤ 4, while f (1) = 3 as shown by McCuaig [McC91].However we do not know if this bound 4 on g(1) is attained.Furthermore can we characterize the intercyclic digraphs with small inversion number ?Problem 1.8.For any k ∈ [4], can we characterize the intercyclic oriented graphs with inversion number k ?
In contrast to Theorems 1.1 and 1.6, the difference between inv and ν, τ , and τ can be arbitrarily large as for every k, there are tournaments T k for which inv(T k ) = 1 and ν(T k ) = k.Consider for example the tournament T k obtained from three transitive tournaments A, B, C of order k by adding all arcs form A to B, B to C and C to A. One easily sees that ν(T k ) = k and so τ

Maximum inversion number of an oriented graph of order n
For any positive integer n, let inv(n) = max{inv(D) | D oriented graph of order n}.Since the inversion number is monotone (see Proposition 2.1), we have inv(n) = max{inv(T ) | T tournament of order n}.
Proof: Let T be a tournament of order n.Pick a vertex x of T .It is a sink in D = Inv(T ; Every oriented graph on at most two vertices is acyclic, so inv(1) = inv(2) = 0. Every tournament of order at most 4 has a cycle arc-transversal of size at most 1, so inv(3) = inv(4) = 1.As observed by Belkhechine et al. [BBBP], every tournament of order at most 6 has inversion number at most 2. inv(n) ≤ n − 4 for all n ≥ 6. ( Moreover, Belkhechine et al. [BBBP10] observed that since there are n! labelled transitive tournaments of order n, the number of labelled tournaments of order n with inversion number less than p is at most n!2 n(p−1) , while there are 2 n(n−1) 2 labelled tournaments of order n.So for all n such that 2 1) , there is a tournament T of order n such that inv(T ) ≥ p. Hence However, it is believed that Equation (2) is not tight.

2
. Let Q n be the tournament obtained from the transitive tournament by reversing the arcs of its unique directed hamiltonian path A possible way to prove Conjecture 1.11 would be via augmentations.Let D be an oriented graph and z a vertex of D. The z-augmentation of D is the digraph, denoted by σ(z, D), obtained from D by adding two new vertices y and x, the arc zy, yx and xz and all the arcs from {x, y} to V (D) \ {z}.We let σ i (z, D) be the z-augmentation of D on which the vertices added are denoted by x i and y i .

Complexity of computing the inversion number
We also consider the complexity of computing the inversion number of an oriented graph and the following associated problem.Let k be a positive integer.A tournament T is k-inversion-critical if inv(T ) = k and inv(T − x) < k for all x ∈ V (T ).We denote by IC k the set of k-inversion-critical tournaments.Observe that a tournament T has inversion number at least k if and only if T has a subtournament in IC k ∪ IC k+1 (by Lemma 2.3).Theorem 1.12 (Belkhechine et al. [BBBP10]).For any positive integer k, the set IC k is finite.
Checking whether the given tournament T contains I for every element I in IC k+1 ∪ IC k , one can decide whether inv(T ) ≥ k in O(|V (T )| max{m k+1 ,m k } ) time, where m k is the maximum order of an element of IC k .
The proof of Theorem 1.12 neither explicitly describes IC k nor gives upper bound on m k .So the degree of the polynomial in Corollary 1.13 is unknown.This leaves open the following questions.As observed in [BBBP10], IC 1 = { C 3 }, so m 1 = 3.This implies that 0-TOURNAMENT-INVERSION can be done in O(n 3 ).However, deciding whether a tournament is acyclic can be solved in O(n 2 )-time.

Belkhechine et al. [BBBP10] also proved that
Fig. 3: The 2-inversion-critical tournaments Hence m 2 = 6, so 1-TOURNAMENT-INVERSION can be solved in O(n 6 )-time.This is not optimal: we show in Subsection 6.2 that it can be solved in O(n 3 )-time, and that 2-TOURNAMENT-INVERSION can be solved in O(n 6 )-time.
There is no upper bound on m k so far.Hence since the inversion number of a tournament can be linear in its order (See e.g.tournament T k described at the end of the introduction), Theorem 1.12 does not imply that one can compute the inversion number of a tournament in polynomial time.In fact, we believe that it cannot be calculated in polynomial time.
Conjecture 1.15.Given a tournament and an integer k, deciding whether inv(T ) = k is NP-complete.
In contrast to Corollary 1.13, we show in Subsection 6.1 that 1-INVERSION is NP-complete.Note that together with Conjecture 1.4, this would imply that k-INVERSION is NP-complete for every positive integer k.
Conjecture 1.16.k-INVERSION is NP-complete for all positive integer k.
Because of its relations with τ , τ , and ν, (see Subsection 1.1), it is natural to ask about the complexity of computing the inversion number when restricted to oriented graphs (tournaments) for which one of these parameters is bounded.Recall that inv(D) = 0 if and only if D is acyclic, so if and only if Problem 1.17.Let k be a positive integer and γ be a parameter in {τ , τ, ν}.What is the complexity of computing the inversion number of an oriented graph (tournament) D with γ(D) ≤ k ?Conversely, it is also natural to ask about the complexity of computing any of τ , τ , and ν, when restricted to oriented graphs with bounded inversion number.In Subsection 6.3, we show that computing any of these parameters is NP-hard even for oriented graphs with inversion number 1.However, the question remains open when we restrict to tournaments.Problem 1.18.Let k be a positive integer and γ be a parameter in {τ , τ, ν}.What is the complexity of computing γ(T ) for a tournament T with inv(T ) ≤ k ?

Properties of the inversion number
In this section, we establish easy properties of the inversion number and deduce from them Theorem 1.1 and the fact that Conjecture 1.4 is equivalent to its restriction to tournaments.
The inversion number is monotone : Proof: ) is the oriented graph obtained from D by reversing the arc between x and its out-neighbours.Hence x is a sink in D and D Proof Proof of Theorem 1.1:As observed in the introduction, if F is a minimum cycle arc-transversal, then the family of sets of end-vertices of arcs of F is a decycling family.So inv(D) ≤ τ (D).
Let D be an oriented graph.An extension of D is any tournament Lemma 2.4.Let D be an oriented graph.There is an extension T of D such that inv(T ) = inv(D).
Let T be the extension of D constructed as follows: For every , and in the second v v k is reversed an odd number of times by ). Hence inv(T ) ≤ inv(D), and so, by Proposition 2.1, inv(T ) = inv(D).Proposition 2.5.Conjecture 1.4 is equivalent to its restriction to tournaments.
Proof: Suppose there are oriented graphs L, R that form a counterexample to Conjecture 1.4, that is such that inv(L → R) < inv(L) + inv(R).By Lemma 2.4, there is an extension T of L → R such that inv(T ) = inv(L → R) and let T L = T V (L) and T R = T V (R) .We have T = T L → T R and by Proposition 2.1, inv(L) ≤ inv(T L ) and inv(R) ≤ inv(T R ).Hence inv(T ) < inv(T L ) + inv(T R ), so T L and T R are two tournaments that form a counterexample to Conjecture 1.4.

Inversion number of dijoins of oriented graphs
In this section, we give some evidence for Conjecture 1.4 to be true.We prove that it holds when inv(L) and inv(R) are small.
Proof: Assume inv(L), inv(R) ≥ 1.Then L and R are not acyclic, so let C L and C R be directed cycles in L and R respectively.Assume for a contradiction that there is a set X such that inverting X in L → R results in an acyclic digraph D .There must be an arc xy in A(C L ) such that x ∈ X and y / ∈ X, and there must be z ∈ X ∩ V (C R ).But then (x, y, z, x) is a directed cycle in D , a contradiction.Then, for any decycling family Proof: Let (X 1 , X 2 ) be a decycling family of D and let D * be the acyclic digraph obtained after inverting X 1 and X 2 (in symbols Let us define some sets.See Figure 4.
• for {i, j} = {1, 2}, Observe that at least one of the sets Assume for a contradiction that inv(D) = 2. Let (X 1 , X 2 ) be a decycling family of D and let and X R 2−1 as in Theorem 3.3.See Figure 4.Note that each of these sets induces an acyclic digraph in D * and thus also in D.
In the following, we denote by A ; B the fact that there is no arc from B to A.
2 ) would be acyclic, a contradiction.Thus, X L 2−1 = ∅.Then by Claims 1 and 2, we get In the same way, one shows that and D * is acyclic, one of X L 1−2 and X L 2−1 must be empty.Without loss of generality, we may assume Then by Claims 1 and 2, we have Therefore inv(D) ≥ 3.So inv(D) = 3.
Proof: Assume for a contradiction that there are two strong oriented graphs L and R such that inv (L), inv (R) ≥ 2 and inv (L → R) ≤ 3.By Lemma 2.4 and Proposition 2.1, we can assume that L and R are strong tournaments.
Hence L contains C 3 .By Theorem 3.4, inv ( Thus, by Proposition 2.1, inv (L → R) ≥ 3 and so inv (L → R) = 3.Let (X 1 , X 2 , X 3 ) be a decycling sequence of D = L → R and denote the resulting acyclic (transitive) tournament by T .We will use the following notation.Below and in the whole proof, whenever we use subscripts i, j, k together we have {i, j, k} = {1, 2, 3}.
For any two (possibly empty) sets Q, W , we write Q → W to indicate that every q ∈ Q has an arc to every w ∈ W . Unless otherwise specified, we are always referring to the arcs of T below.When we refer to arcs of the original digraph we will use the notation u ⇒ v, whereas we use u → v for arcs in T .
Proof.Suppose w.l.o.g. that X R 1 = ∅ and let D = Inv(D; X 1 ).Then D contains C 3 → R as a subtournament since reversing X L 1 does not make L acyclic so there is still a directed 3-cycle (by Moon's theorem).♦ Claim B: In T the following holds, implying that at least one of the involved sets is empty (as T is acyclic).
Proof.This follows from the fact that and arc of D is inverted if and only if it belongs to an odd number of the sets X 1 , X 2 , X 3 .♦ Claim C: For all i = j, we have Proof.Suppose this is not true, then without loss of generality ) is a decycling sequence of L as inverting X L 2 and X L 3 leaves every arc unchanged and we have inv(L) ≥ 2. ♦ Now we are ready to obtain a contradiction to the assumption that (X 1 , X 2 , X 3 ) is a decycling sequence for D = L → R. We divide the proof into five cases.In order to increase readability, we will emphasize partial conclusions in blue, assumptions in orange, and indicate consequences of assumptions in red.

Case 1: X
By Claim C, at least two of the sets X L 12−3 , X L 13−2 , X L 23−1 are non-empty and at least two of the sets X R 12−3 , X R 13−2 , X R 23−1 are non-empty.Without loss of generality, X L 12−3 , X L 13−2 = ∅.Now Claim B (b) implies that one of X R 12−3 , X R 13−2 must be empty.By interchanging the names of X 2 , X 3 if necessary, we may assume that X R 13−2 = ∅ and hence, by Claim C, X R 12−3 , X R 23−1 = ∅.By Claim B (a), this implies in R (these arcs are reversed by X 2 ), we must have Z R = ∅.Moreover the arcs incident to Z R are not reversed, so the set Z R has an out-neighbour in By reversing all arcs and switching the names of L and R if necessary, we may assume w.l.o.g that By symmetry, we can assume that X R 12−3 = ∅.
Suppose for a contradiction that X R 23−1 = ∅.Then Claims A and C imply X R 13−2 = ∅.Now, by Claim B (b), one of X L 12−3 , X L 13−2 is empty.By symmetry, we can assume This implies that in L all arcs between X L 12−3 and X L 23−1 ∪X L 123 ∪X L 1−23 are entering X L 12−3 (the arcs between X L 123 and X L 12−3 were reversed twice and those between X L 1−23 ∪X L 23−1 and X L 12−3 were reversed once).Hence, as L is strong, we must have an arc uz from So as R is strong there must be an arc in R from Z R to X R 23−1 .This arc is not reversed, so it is also an arc in T .But since X R 23−1 → X L 13−2 → Z R , this arc is in a directed 3-cycle, a contradiction.This completes Case 2.

By symmetry we can assume X
By Claim C, X L 2 = X L 3 , so one of X L 12−3 and X L 13−2 is non-empty.By symmetry we may assume where each of these sets induces an acyclic subtournament of L and we have where each of these sets induces an acyclic subtournament in R and However, there can be no arcs from This completes Subcase 3.2.
By symmetry, we can assume that Subcase 5.1: otherwise the inversion of X transforms C in the directed cycle in the opposite direction.Hence, without loss of generality, we may assume that u − , the in-neighbour of u in C is not in X.
Note also that C = (z, y, x, z) is a directed cycle in σ(z, D) so X must contain exactly two vertices of C .In particular, there is a vertex, say w, in {x, y} ∩ X.
Recall that σ i (z, D) denotes the z-augmentation of D on which the vertices added are denoted by x i and y i .Theorem 4.2.Let D be an oriented graph with inv(D) = 1 and let H = σ 1 (x 2 , σ 2 (z, D)).Then, inv(H) = 3.
Recall that Q n is the tournament we obtain from the transitive tournament on n vertices by reversing the arcs of the unique hamiltonian path

Inversion number of intercyclic oriented graphs
The aim of this subsection is to prove the following theorem.In order to prove this theorem, we need some preliminaries.Let D be an oriented graph.An arc uv is weak in Set a = uv, and let w be the vertex corresponding to both u and v in D/a.Let (X 1 , . . ., X p ) be a decycling family of D = D/a that result in an acyclic oriented graph R .For Let a * = uv if w is in an even number of X i and a * = vu otherwise, and let R = Inv(D; (X 1 , . . ., X p )).One easily shows that R = R /a * .Therefore R is acyclic since the contraction of an arc transforms a directed cycle into a directed cycle.
Lemma 5.3.Let D be an intercyclic oriented graph.If there is a non-contractable weak arc, then inv(D) ≤ 4.
Proof: Let uv be a non-contractable weak arc.By directional duality, we may assume that d − (v) = 1.Since uv is non-contractable, uv is in a directed 3-cycle (u, v, w, u).Since D is intercyclic, we have D \ {u, v, w} is acyclic.Consequently, {w, u} is a cycle transversal of D, because every directed cycle containing v also contains u.Hence, by Theorem 1.1, inv(D) ≤ 2τ (D) ≤ 4.
The description below follows [BJK11].A digraph D is in reduced form if it is strong, and it has no weak arc, that is min{δ Intercyclic digraphs in reduced form were characterized by Mc Cuaig [McC91].In order to restate his result, we need some definitions.Let P(x 1 , . . ., x s ; y 1 , . . ., y t ) be the class of acyclic digraphs D such that x 1 , . . ., x s , s ≥ 2, are the sources of D, y 1 , . . ., y t , t ≥ 2, are the sinks of D, every vertex which is neither a source nor a sink has in-and out-degree at least 2, and, for 1 ≤ i < j ≤ s and 1 ≤ k < ≤ t, every (x i , y )-path intersects every (x j , y k )-path.By a theorem of Metzlar [Met89], such a digraph can be embedded in a disk such that x 1 , x 2 , . . ., x s , y t , y t−1 , . . ., y 1 occur, in this cyclic order, on its boundary.Let T be the class of digraphs with minimum in-and out-degree at least 2 which can be obtained from a digraph in P(x + , y + ; x − , y − ) by identifying x + = x − and y + = y − .Let D 7 be the digraph from Figure 5(a).
Proof Proof of Theorem 6.1: Reduction from MONOTONE 1-IN-3 SAT which is well-known to be NP-complete.
Let Φ be a monotone 3-SAT formula with variables x 1 , . . ., x n and clauses C 1 , . . ., C m .Let D be the oriented graph constructed as follows.For every i ∈ [n], let us construct a variable digraph K i as follows: for every j ∈ [m], create a copy J j i of J, and then identify all the vertices c j i into one vertex c i as depicted in Figure 9.Then, for every clause C j = x i1 ∨ x i2 ∨ x i3 , we add the arcs of the directed 3-cycle D j = (a j i1 , a j i2 , a j i3 ).Observe that D is strong.We shall prove that inv(D) = 1 if and only if Φ admits a 1-in-3-SAT assignment.
Assume first that inv(D) = 1.Let X be a set whose inversion makes D acyclic.By Lemma 6.2, and the vertices c j i are identified in c i , for every i ∈ Let ϕ be the truth assignment defined by ϕ( . Because D j is a directed 3-cycle, X contains exactly two vertices in V (D j ).Let 1 and 2 be the two indices of {i 1 , i 2 , i 3 } such that a j 1 and a j 2 are in X and 3 be the third one.By our definition of ϕ, we have ϕ(x 1 ) = ϕ(x 2 ) = f alse and ϕ(x 3 ) = true.Therefore, ϕ is a 1-in-3 SAT assignment.
Assume now that Φ admits a 1-in-3 SAT assignment ϕ.For every i ∈ Let D be the graph obtained from D by the inversion on X.We shall prove that D is acyclic, which implies inv(D) = 1.
Assume for a contradiction that D contains a directed cycle C.By Lemma 6.2, there is no directed cycle in any variable gadget K i , so C must contain an arc with both ends in V (D j ) for some j.Let C j = x i1 ∨ x i2 ∨ x i3 .Now since ϕ is a 1-in-3-SAT assignment, w.l.o.g., we may assume that ϕ(x i1 ) = ϕ(x i2 ) = f alse and ϕ(x i3 ) = true.Hence in D , a j i2 → a j i1 , a j i2 → a j i3 and a j i3 → a j i1 .Moreover, in D V (J j i1 ) , a j i1 is a sink, so a j i1 is a sink in D .Therefore C does not goes through a j i1 , and thus C contains the arc a j i2 a j i3 , and then enters J j i3 .But in D V (J j i3 ) , a j i3 has a unique out-neighbour, namely b j i3 , which is a sink.This is a contradiction.

Proof:
Let T be a tournament.For every vertex v one can check whether there is an inversion that transforms T into a transitive tournament with source v. Indeed the unique possibility inversion is the one on the closed in-neighbourhood of v, N − [v] = N − (v) ∪ {v}.So one can make inversion on N − [v] and check whether the resulting tournament is transitive.This can obviously be done in O(n 2 ) time Doing this for every vertex v yields an algorithm which solves 1-TOURNAMENT-INVERSION in O(n 3 ) time.
Theorem 6.5.2-TOURNAMENT-INVERSION can be solved in in O(n 6 ) time.
The main idea to prove this theorem is to consider every pair (s, t) of distinct vertices and to check whether there are two sets X 1 , X 2 such that the inversion of X 1 and X 2 results in a transitive tournament with source s and sink t.We need some definitions and lemmas.
The symmetric difference of two sets A and For the possibilities corresponding to Case (a), we proceed as in (1) above.For every arc t s ∈ A(T B(s, t) ), we check that C(s , t ) = D(s , t ) = ∅ (where those sets are computed in T B(s, t) ).Furthermore, by Lemma 6.6, we must have X 1 = {s, t} ∪ B(s , t ) and X 2 = B(s, t) \ X 1 .So we invert those two sets and check whether the resulting tournament T B is transitive.This can be done in O(n 2 ) (for each arc t s ).
For the possibilities corresponding to Case (b), we proceed as in (2) above.For every arc t s ∈ A(T B(s, t) ), by Lemma 6.6, the only possibility is that X 1 = {s } ∪ B(s , t ) ∪ D(s , t ), and X 2 = {t } ∪ B(s , t ) ∪ C(s , t ).As those two sets form a partition of B(s, t), we also must have B(s , t ) = ∅ and A(s , t ) = ∅.So we invert those two sets and check whether the resulting tournament T B is transitive.This can be done in O(n 2 ) for each arc t s .
In both cases, we are left with a transitive tournament T B .We compute its directed hamiltonian path P B = (b 1 , . . ., b q ) which can be done in O(n 2 ).We need to check whether this partial solution on B(s, t) is compatible with the rest of the tournament, that is {s, t} ∪ A(s, t).It is obvious that it will always be compatible with s and t as they become source and sink.So we have to check that we can merge T A and T B into a transitive tournament on A(s, t) and B(s, t) after the reversals of X 1 and X 2 .In other words, we must interlace the vertices of P A and P so the arcs between Z and B(s, t) will be reversed exactly once when we invert X 1 and X 2 .Using this fact, one easily checks that this is possible if and only there are integers • either b j → a i for j ≤ j i and b j ← a i for j > j i (in which case a i / ∈ Z and the arcs between a i and B(s, t) are not reversed), • or b j ← a i for j ≤ j i and b j → a i for j > j i (in which case a i ∈ Z and the arcs between a i and B(s, t) are reversed).
See Figure 10 for an illustration of a case when we can merge the two orderings after reversing X 1 and X 2 .Deciding whether there are such indices can be done in O(n 2 ) for each possibility.
As we have O(n 2 ) possibilities, and for each possibility the procedure runs in O(n 2 ) time, the overall procedure runs in O(n 4 ) time.
Proof Proof of Theorem 6.5:By Lemma 2.2, by removing iteratively the sources and sinks of the tournament, it suffices to solve the problem for a tournament with no sink and no source.Now for each pair (s, t) of distinct vertices, one shall check whether there are two sets X 1 , X 2 such that the inversion of X 1 and X 2 results in a transitive tournament with source s and sink t.Observe that since s and t are neither sources nor sinks in T , each of them must belong to at least one of X 1 , X 2 .Therefore, without loss of generality, we are in one of the following possibilities: • {s, t} ⊆ X 1 \ X 2 .Such a possibility can be checked in O(n 3 ) by Lemma 6.7 (1).
• t ∈ X 1 ∩ X 2 and s ∈ X 1 \ X 2 .Such a possibility is the directional dual of the preceding one.It can be tested in O(n 2 ) by reversing all arcs and applying Lemma 6.7 (3).
Since there are O(n 2 ) pairs (s, t) and for each pair the procedure runs in O(n 4 ), the algorithm runs in O(n 6 ) time.

Computing related parameters when the inversion number is bounded
The aim of this subsection is to prove the following theorem.Theorem 6.8.Let γ be a parameter in τ, τ , ν.Given an oriented graph D with inversion number 1 and an integer k, it is NP-complete to decide whether γ(D) ≤ k.
Let D be a digraph.The second subdivision of D is the oriented graph S 2 (D) obtained from D by replacing every arc a = uv by a directed path P a = (u, x a , y a , u) where x a , y a are two new vertices.Lemma 6.9.Let D be a digraph.Proof: (i) Inverting the set a∈A(D) {x a , y a } makes S 2 (D) acyclic.Indeed the x a become sinks, the y a become sources and the other vertices form a stable set.Thus inv(S 2 (D)) = 1.
(ii) There is a one-to-one correspondence between directed cycles in D and directed cycles in S 2 (D) (their second subdivision).Hence ν(S 2 (D)) = ν(D).
Moreover every cycle transversal S of D is also a cycle transversal of S 2 (D).So τ (S 2 (D)) ≤ τ (D).Now consider a cycle transversal T .If x a or y a is in S for some a ∈ A(D), then we can replace it by any end-vertex of a.Therefore, we may assume that T ⊆ V (D), and so T is a cycle transversal of D. Hence τ (S 2 (D)) = τ (D).
Similarly, consider a cycle arc-transversal F of D. Then F = {a | x a y a ∈ F } is a cycle arctransversal of S 2 (D).Conversely, consider a cycle arc-transversal F of S 2 (D).Replacing each arc incident to x a , y a by x a y a for each a ∈ A(D), we obtain another cycle arc-transversal.So we may assume that F ⊆ {x a y a | a ∈ A(D)}.Then F = {a | x a y a ∈ F } is a cycle arc-transversal of D. Thus τ (S 2 (D)) = τ (D).
Proof Proof of Theorem 6.8: Since computing each of τ , τ , ν is NP-hard, Lemma 6.9 (ii) implies that computing each of τ , τ , ν is also NP-hard for second subdivisions of digraphs.As those oriented graphs have inversion number 1 (Lemma 6.9 (i)), computing each of τ , τ , ν is NP-hard for oriented graphs with inversion number 1.
i v j | i < j}.The lexicographic product of a digraph D by a digraph H is the digraph D[H] with vertex set V (D) × V (H) and arc set A(D[H]) = {(a, x)(b, y) | ab ∈ A(D),or a = b and xy ∈ A(H)}.It can be seen as blowing up each vertex of D by a copy of H. Using boolean dimension, Pouzet et al. [PKT21] proved the following.Theorem 1.2 (Pouzet et al. [PKT21]).inv(T T n [ C 3 ]) = n.Since τ (T T n [ C 3 ]) = n, this shows that the inequality inv(D) ≤ τ (D) of Theorem 1.1 is tight.
This would imply the following conjecture.Conjecture 1.7.For all k, g(k) = O(k log k): there is an absolute constant C such that inv(D) ≤ C • ν(D) log(ν(D)) for all oriented graph D. Note that for planar digraphs, combining results of Reed and Sheperd [RS96] and Goemans and Williamson [GW96], we get τ (D) ≤ 63 • ν(D) for every planar digraph D. This implies that τ (D) ≤ 126 • ν(D) for every planar digraph D and so Conjecture 1.7 holds for planar oriented graphs.
k-INVERSION.Input: An oriented graph D. Question: inv(D) ≤ k ?We also study the complexity of the restriction of this problem to tournaments.k-TOURNAMENT-INVERSION.Input: A tournament.Question: inv(T ) ≤ k ?Note that 0-INVERSION is equivalent to deciding whether an oriented graph D is acyclic.This can be done in O(|V (D)| 2 ) time.

Problem 1 .
14. Explicitly describe IC k or at least find an upper bound on m k .What is the minimum real number r k such that k-TOURNAMENT-INVERSION can be solved in O(|V (T )| r k ) time ?

Lemma 2 . 2 .Lemma 2 . 3 .
Let D be an oriented graph.If D has a source (a sink) x, then inv(D) = inv(D − x).Proof: Every decycling family of D − x is also a decycling family of D since adding a source (sink) to an acyclic digraph results in an acyclic digraph.Let D be an oriented graph and let x be a vertex of D. Then inv(D) ≤ inv(D − x) + 2.
weak and in no directed 3-cycle.If a is a contractable arc, then let D/a is the digraph obtained by contracting the arc a and D/a be the oriented graph obtained from D by removing one arc from every pair of parallel arcs created in D/a.Lemma 5.2.Let D be a strong oriented graph and let a be a contractable arc in D. Then D/a is a strong intercyclic oriented graph and inv( D/a) ≥ inv(D).Proof: McCuaig proved that D/a is strong and intercyclic.Let us prove that inv(D) ≤ inv( D/a).Observe that inv( D/a) = inv(D/a).

Fig. 6 :
Fig. 6: The digraphs from K. The arrow in the grey area symbolizing the acyclic (plane) digraph KH indicates that z0, w0 are its sources and z1, w1 are its sinks.(This figure is a courtesy of [BJK11]).