Packing Arc-Disjoint Cycles in Tournaments

A tournament is a directed graph in which there is a single arc between every pair of distinct vertices. Given a tournament T on n vertices, we explore the classical and parameterized complexity of the problems of determining if T has a cycle packing (a set of pairwise arc-disjoint cycles) of size k and a triangle packing (a set of pairwise arc-disjoint triangles) of size k. We refer to these problems as Arc-disjoint Cycles in Tournaments (ACT) and Arc-disjoint Triangles in Tournaments (ATT), respectively. Although the maximization version of ACT can be seen as the dual of the well-studied problem of finding a minimum feedback arc set (a set of arcs whose deletion results in an acyclic graph) in tournaments, surprisingly no algorithmic results seem to exist for ACT. We first show that ACT and ATT are both NP-complete. Then, we show that the problem of determining if a tournament has a cycle packing and a feedback arc set of the same size is NP-complete. Next, we prove that ACT is fixed-parameter tractable via a 2O(klogk)nO(1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2^{\mathcal {O}(k \log k)} n^{\mathcal {O}(1)}$$\end{document}-time algorithm and admits a kernel with O(k)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(k)$$\end{document} vertices. Then, we show that ATT too has a kernel with O(k)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(k)$$\end{document} vertices and can be solved in 2O(k)nO(1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2^{\mathcal {O}(k)} n^{\mathcal {O}(1)}$$\end{document} time. Afterwards, we describe polynomial-time algorithms for ACT and ATT when the input tournament has a feedback arc set that is a matching. We also prove that ACT and ATT cannot be solved in 2o(n)nO(1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2^{o(\sqrt{n})} n^{\mathcal {O}(1)}$$\end{document} time under the exponential-time hypothesis.


Introduction
Given a (directed or undirected) graph G and a positive integer k, the disjoint cycle PAcking problem is to determine whether G has k (vertex or arc/edge) disjoint (directed or undirected) cycles. Packing disjoint cycles is a fundamental problem in Graph Theory and Algorithm Design with applications in several areas. Since the publication of the classic Erdős-Pósa theorem in 1965 [24], this problem has received significant scientific attention in various algorithmic realms. In particular, Vertex-disjoint cycle PAcking in undirected graphs is one of the first problems studied in the framework of parameterized complexity.
Vertex-disjoint cycle PAcking in undirected graphs is in FPT when parameterized by the solution size k [11,41] but has no polynomial kernel unless NP ⊆ coNP/poly [12]. In contrast, edge-disjoint cycle PAcking in undirected graphs admits a kernel with O(k log k) vertices (and is therefore FPT) [12]. On directed graphs, these problems have many practical applications (for example in biology [13,21]) and they have been extensively studied [7,38,42]. It turns out that Vertex-disjoint cycle PAcking and Arc-disjoint cycle PAcking are equivalent under parameterized reductions and are W[1]-hard [37,49] but admits an FPT approximation algorithm [32]. Therefore, studying these problems on a subclass of directed graphs is a natural direction of research.
Tournaments form a mathematically rich subclass of directed graphs with interesting structural and algorithmic properties [6,44]. A tournament is a directed graph in which there is a single arc between every pair of distinct vertices. A feedback vertex (arc) set is a set of vertices (arcs) whose deletion results in an acyclic graph. Given a tournament, minFAst and minFVst are the problems of obtaining a feedback arc set and feedback vertex set of minimum size, respectively. We refer to the corresponding decision version of the problems as FAst and FVst. The optimization problems minFAst and minFVst have numerous practical applications in the areas of voting theory [20,40], machine learning [16], search engine ranking [23] and have been intensively studied in various algorithmic areas. minFAst and min-FVst are NP-hard [3,14,17,50] while FAst and FVst are FPT when parameterized by the solution size k [4,26,28,34,47]. Further, FAst has a kernel with O(k) vertices [10] and FVst has a kernel with O(k 1.5 ) vertices [39].
Surprisingly, the duals of minFAst and minFVst have not been considered in the literature until recently. Any tournament that has a cycle also has a triangle [7]. Therefore, if a tournament has k vertex-disjoint cycles, then it also has k vertex-disjoint triangles. Thus, Vertex-disjoint cycle PAcking in tournaments is just packing vertex-disjoint triangles. This problem is NP-hard [8]. A straightforward application of the colour coding technique [5] shows that this problem is in FPT and a kernel with O(k 2 ) vertices is an immediate consequence of the quadratic element kernel known for 3-set PAcking [1]. Recently, a kernel with O(k 1.5 ) vertices was shown for this problem using interesting variants and generalizations of the popular expansion lemma [39].
Subsequently, we refer to a set of pairwise arc-disjoint cycles as a cycle packing and a set of pairwise arc-disjoint triangles as a triangle packing. Given a tournament, mAxAct and mAxAtt are the problems of obtaining a maximum set of arc-disjoint cycles and triangles, respectively. We refer to the corresponding decision versions of the problems as Act and Att . Formally, given a tournament T and a positive integer k, Act is the task of determining if T has k arcdisjoint cycles and Att is the task of determining if T has k arc-disjoint triangles. mAxAtt is a special case of 3-set PAcking, by creating the hypergraph on the arc set of the tournament and each triangle becomes a hyperedge. The 3-set PAcking problem admits a 4 3 + approximation [18], implying the same result for mAxAtt . From a structural point of view, the problem of partitioning the arc set of a directed graph into a collection of triangles has been studied for regular tournaments [52], almost regular tournaments [2] and complete digraphs [31].
In this work, we study the classical complexity of mAxAct and mAxAtt and the parameterized complexity of Act and Att with respect to the solution size (i.e. the number k of cycles/triangles) as parameter. In particular, we show the following results.
• mAxAtt and mAxAct are NP-hard (Theorems 5 and 7). As a consequence, we also show that Act and Att do not admit algorithms with O ⋆ (2 o( √ n) ) running time under the exponential-time hypothesis (Theorem 8). Moreover, deciding if a tournament has a cycle packing and a feedback arc set of the same size is NPcomplete (Theorem 11). • A tournament T has k arc-disjoint cycles if and only if T has k arc-disjoint cycles each of length at most 2k + 1 (Theorem 12). • Act can be solved in O ⋆ (2 O(k log k) ) time (Theorem 18) and admits a kernel with O(k) vertices (Theorem 17). • Att can be solved in O ⋆ (2 O(k) ) time (Theorem 19) and admits a kernel with O(k) vertices (Theorem 20). • mAxAtt and mAxAct restricted to sparse tournaments (tournaments that have a feedback arc set that is a matching) is polynomial-time solvable (Theorem 23).

Road Map
The paper is organized as follows. In Sect. 2, we give some definitions related to directed graphs, paths, cycles and tournaments. In Sect. 3, we show the result on the NP-hardness of the problems considered. In Sect. 4, we show the parameterized complexity results for Act . Then, in Sect. 5, we show the parameterized complexity results for Att . Then, we show the polynomial-time solvability of mAxAtt and mAxAct restricted to sparse tournaments in Sect. 6. Finally, we conclude with some remarks in Sect. 7.

Preliminaries
We denote the set {1, 2, … , n} of consecutive integers from 1 to n by [n]. Directed graphs A directed graph (or digraph) is a pair consisting of a set V of vertices and a set A of arcs. An arc is specified as an ordered pair of vertices (called its endpoints). We will consider only simple unweighted digraphs. For a digraph D, V(D) and A(D) denote the set of its vertices and the set of its arcs, respectively. Two vertices u, v are said to be adjacent in D if uv ∈ A(D) or vu ∈ A(D) . For an arc e = uv , we define h(e) = v as the head of e and t(e) = u as the tail of e. For a vertex v ∈ V(D) , its out-neighbourhood, denoted by N + (v) , is the set {u ∈ V(D) ∶ vu ∈ A(D)} and its in-neighbourhood, denoted by N − (v) , is the set {u ∈ V(D) ∶ uv ∈ A(D)} . For a set F of arcs, V(F) denotes the union of the sets of endpoints of arcs in F. Given a digraph D and a subset X of vertices, we denote by D[X] the digraph induced by the vertices in X. Moreover, we denote by D⧵X the digraph D[V(D)⧵X] and say that this digraph is obtained by deleting X from D. For a set F ⊆ A(D) , D − F denotes the digraph obtained from D by deleting F.

Paths and cycles
The length of a path or cycle X is the number of vertices in it and is denoted by |X|. If a cycle has length two, we say it is a digon. For a set C of paths or cycles, A cycle on three vertices is called a triangle. A digraph is said to be triangle-free if it has no triangles. A set of pairwise arc-disjoint cycles is called a cycle packing and a set of pairwise arc-disjoint triangles is called a triangle packing. A digraph is called a directed acyclic graph if it has no cycles. A feedback arc set (FAS) is a set of arcs whose deletion results in an acyclic graph. For a digraph D, let minfas (D) denote the size of a minimum FAS of D. Any directed acyclic graph D has an ordering (D) = (v 1 , … , v n ) called topological ordering of its vertices such that for each v i v j ∈ A(D) , i < j holds. Given an ordering and two vertices u and v, we write u < v if u is before v in .
Tournaments A tournament T is a digraph in which for every pair u, v of distinct vertices either uv ∈ A(T) or vu ∈ A(T) but not both. In other words, a tournament T on n vertices is an orientation of the complete graph K n . A tournament T can alternatively be defined by an ordering (T) = (v 1 , … , v n ) of its vertices and a set of backward arcs ⃖� A (T) (which will be denoted ⃖� A(T) if the considered ordering is not ambiguous), where each arc } is the set of forward arcs of T in the given ordering (T) . The pair ( (T), ⃖� A(T)) is called a linear representation of the tournament T . A tournament is called transitive if it is a directed acyclic graph and a transitive tournament has a unique topological ordering. It is clear that for any linear representation ( (T), ⃖� A(T)) of T the set ⃖� A(T) is a FAS of T . A tournament is sparse if it admits a FAS which is a matching. Given a linear representation ( (T), ⃖� A(T)) of a tournament T, a triangle C in T is a triple and v i 2 v i 1 ∈ ⃖� A(T) (in this case we call C a triangle with two backward arcs v i 3 v i 2 and v i 2 v i 1 ). Given two tournaments T 1 , T 2 defined by (T l ) and ⃖� A(T l ) with l ∈ {1, 2} , we denote by T = T 1 T 2 the tournament called the concatenation of T 1 and T 2 , where is the concatenation of the two sequences, and ⃖� A(T) = ⃖� A(T 1 ) ∪ ⃖� A(T 2 ).
Parameterized complexity In this framework, each problem instance is associated with a non-negative integer k called parameter, and a problem is said to be fixed-parameter tractable if it can be solved in f (k)n O(1) time for some computable function f, where n is the input size. For convenience, the running time f (k)n O(1) is denoted as O ⋆ (f (k)) by supressing the terms polynomial in n.
A kernelization algorithm is a polynomial-time algorithm that transforms an arbitrary instance of the problem to an equivalent instance of the same problem whose size is bounded by some computable function g of the parameter of the original instance. The resulting instance is called a kernel and if g is a polynomial function, then it is called a polynomial kernel and we say that the problem admits a polynomial kernel. A decidable parameterized problem is fixed-parameter tractable if and only if it has a kernel (not necessarily of polynomial size). Kernelization typically involves applying a set of rules (called reduction rules) to the given instance to produce another instance. A reduction rule is said to be safe if it is sound and complete, i.e., applying it to the given instance produces an equivalent instance.
In order to classify parameterized problems as being fixed-parameter tractable or not, the W-hierarchy is defined : where FPT is the set of all parameterized problems that are fixed-parameter tractable. It is believed that the subset relations in this sequence are all strict, and a parameterized problem that is hard for some complexity class above FPT in this hierarchy is said to be fixed-parameter intractable. As mentioned before, the set of parameterized problems that admit a polynomial kernel is contained in the class FPT and it is believed that this subset relation is also strict. For further details on parameterized algorithms, we refer to recent books [19,22,27,29].

NP-hardness of MaxaCT and MaxaTT
This section contains our main results. We prove the NP-hardness of mAxAtt using a reduction from 3-sAt(3). Here, 3-sAt(3) denotes the specific case of 3-sAt where each clause has at most three literals, and each literal appears at most two times positively and exactly one time negatively. In the following, denote by F the input formula of an instance of 3-sAt(3).
Let n be the number of variables of F and m be the number of its clauses. In the following, we also suppose that n ≡ 3 (mod 6) as well as m + 1 ≡ 3 (mod 6) . Indeed, if it is not the case, if we add a new variable x and the trivial clause x ∨ x . Thus, we can reach n ≡ 3 (mod 6) by adding up to five variables. Similarly, as long as m + 1 ≢ 3 (mod 6) , we can add six new variables x 1 , … , x 6 (preserving n ≡ 3 (mod 6) ) and add the six trivial clauses x i ∨ x i for every i ∈ 1, … , 6 and the clause x 1 ∨ x 2 , that is seven clauses in total. Once again, by repeating this operation up to five times, we can assume that n ≡ 3 (mod 6) and m + 1 ≡ 3 (mod 6) . In total, we added at most 35 new variables and 40 new clauses. From F we construct a tournament T which is the concatenation of two tournaments T v and T c defined below.
In the following, let f be the reduction that maps an instance F of 3-sAt(3) to a tournament T we describe now.
The variable tournament T v . For each variable v i of F, we define a tournament V i of order 6 as follows: ure 1 is a representation of one variable gadget V i . One can notice that the minimum FAS of V i corresponds exactly to the set of its backward arcs. We now define V(T v ) be the union of the vertex sets of the V i 's and we equip T v with the order 1 2 … n . Thus, T v has 6n vertices. We also add the following backward arcs to T v . Since n ≡ 3 (mod 6) , there is an edge-disjoint (undirected) triangle packing of K n covering all its edges with triangles that can be computed in polynomial time [35]. Let {u 1 , … , u n } be an arbitrary enumeration of the vertices of K n . Using a perfect triangle packing Δ K n of K n , we create a tournament T K n such that � ( Intuitively, we "blow up" every vertex u i of T K n into our variable gadget V i . The clause tournament T c . For each of the m clauses c j of F, we define a tournament C j of order 3 as follows: (C j ) = (c 1 j , c 2 j , c 3 j ) and ⃖� A (C j ) = � . In addition, we have a (m + 1) th tournament denoted by C m+1 and defined by (C m+1 ) = (c 1 m+1 , c 2 m+1 , c 3 m+1 ) and ⃖� A (C m+1 ) = {c 3 m+1 c 1 m+1 } , that is C m+1 is a triangle. We call this triangle the dummy triangle, and its vertices the dummy vertices. We now define T c such that (T c ) is the concatenation of each ordering (C j ) in the natural order, that is ( . So T c has 3(m + 1) vertices. Since m + 1 ≡ 3 (mod 6) , we use the same trick as above to add arcs to ⃖� A (T c ) coming from a perfect packing of undirected triangles of K m+1 . Once again, we "blow up" every vertex u j of T K m+1 into our clause gadget C j .
The tournament T . To define our final tournament T let us begin with its ordering defined by (T) = (T v ) (T c ) . Then we construct the backward arcs ⃖� A vc (T) between T c and T v . For any j ∈ [m] , if the clause c j in F has three literals, that is c j = 1 ∨ 2 ∨ 3 , then we add to ⃖� A vc (T) the three backward arcs c 3 j z u where u ∈ [3] and such that z u =x i u when u =v i u , and z u ∈ {x 1 i u , x 2 i u } when u = v i u in such a way that for any i ∈ [n] , there exists a unique arc a ∈ ⃖� A vc (T) with h(a) = x 1 i . Informally, in the previous definition, if x 1 i u is already "used" by another clause, we chose z u = x 2 i u . Such an orientation will always be possible since each variable occurs at most two times positively and once negatively in F. If the clause c j in F has only two literals, that is c j = 1 ∨ 2 , then we add to ⃖� A vc (T) the two backward arcs c 2 j z u where Notice that each x i has exactly four arcs a ∈ ⃖� A (T) such that h(a) =x i and t(a) is a vertex of T c . To finish the construction, notice also that T has 6n + 3(m + 1) vertices and can be computed in polynomial time. For i = 2, 3 , we denote by cl i the number of clauses of F containing exactly i literals. Then, notice that we have ⃖� A vc (T) = 2cl 2 + 3cl 3 + 3n.
Now, we move on to proving the correctness of the reduction. First of all, observe that in each variable gadget V i , there are only four triangles: We call these packings Δ ⊤ i , Δ ⊤ � i and Δ ⊥ i , respectively. Given a triangle packing Δ of T and a subset X of vertices, we define for any x ∈ X the Δ-local out-degree of the vertex x, denoted d + X⧵Δ (x) , as the remaining outdegree of x in T[X] when we remove the arcs of the triangles of Δ . More formally, we set: Observation 1 Given a variable gadget V i , we have: Informally, we want to set the variable x i to true (resp. false) when one of the locally-optimal Δ ⊤ � i or Δ ⊤ i (resp. Δ ⊥ i ) is taken in the variable gadget V i in the global solution. Now given a triangle packing Δ of T , we partition Δ into the following sets: Forward arcs are not depicted. In addition to the depicted backward arcs, we have the 36 backward arcs from V 3 to V 1 , and the 9 backward arcs from C 3 to C 1 Notice that in T , there is no triangle with two vertices in a variable gadget V i and its third vertex in a variable gadget V j with i ≠ j since all the arcs between two variable gadgets are oriented in the same direction. We have the same observation for clauses.
In the two next lemmas, we prove some properties concerning the solution Δ.

Lemma 2
There exists a triangle packing Δ v (resp. Δ c ) which uses exactly the arcs between distinct variable gadgets (resp. clause gadgets). Therefore, we have and these bounds are tight.
Proof First recall that the tournament T v is constructed from a tournament T K n which admits a perfect packing of n(n − 1)∕6 triangles. Then we replaced each vertex u i in T K n by the variable gadget V i and kept all the arcs between two variable gadgets V i and V j in the same orientation as between u i and u j . Let u i u j u k be a triangle of the perfect packing of T K n . We temporarily relabel the vertices of V i , V j and V k respectively by } and consider the tripartite tournament K 6,6,6 given by V( } is a perfect triangle packing of K 6,6,6 . Since every triangle of T K n becomes a K 6,6,6 in T v , we can find a triangle packing Δ v which uses all the arcs between disjoint variable gadgets. We use the same reasoning to prove that there exists a triangle packing Δ c which uses all the arcs available in T c between two distinct clause gadget. ◻

Lemma 3
For any triangle packing Δ of the tournament T, we have the following inequalities: Therefore in total we have |Δ| ≤ 6n(n − 1) + 3m(m + 1)∕2 + 2n + | ⃖� A vc (T)| + 1. Proof Let Δ be a triangle packing of T . Recall that we have: inequality (i) comes directly from Lemma 2. Then, notice that we have | since every triangle of these sets consumes one backward arc from T c to T v . We have |Δ 3V | ≤ 2n since we have at most 2 disjoint triangles in each variable gadget. Finally we also have |Δ 3C | ≤ 1 since the dummy triangle is the only triangle lying in a clause gadget. ◻ The number 6n(n − 1) + 3m(m + 1)∕2 + 2n + | ⃖� A vc (T)| + 1 = 6n(n − 1) + 3m(m + 1)∕2 + 5n + 2cl 2 + 3cl 3 + 1 will be a threshold value used throughout the reduction. We will often keep it in its first form to facilitate the computation.
So, the two previous lemmas allow us to prove the following.

Lemma 4 F is satisfiable if and only if there exists a triangle packing Δ of size
Proof First, let us suppose that there exists an assignment a of the variables which satisfies F, and let a ⊤ (resp. a ⊥ ) be the set of variables set to true (resp. false).
We construct a triangle packing Δ of T with the desired number of triangles. First, we pick all the disjoint triangles of Δ v and Δ c . By Lemma 3, if we also add the Then, for any variable v i of the formula F, if v i ∈ a ⊤ , then we add to Δ the triangles Δ ⊤ i . Otherwise, we add Δ ⊥ i . One can check that in both cases, these triangles are disjoint to the triangles we just added. Thus, in each V i , we made a locally-optimal solution, so we added 2n triangles to Δ.
Now we add to Δ the triangles ( which will consume all the dummy arcs of the tournament. Recall that in Observation 1 we mentioned that the vertices x 1 i and x 2 i (resp. x i ) have an Δ ⊤ i -local out-degree both equal to 1 (resp. Δ ⊥ i -local out-degree equals to 4). Then given a clause c j , let be one literal which satisfies c j . Assume that the clause is of size 3, since the reasoning is the same for clauses of size 2. If is a positive literal, say v i , then let u be the number such that c 3 j x u i is a backward arc of T . By Observation 1, we know that there Three of these four available arcs are used in the triangles which consume the dummy arcs, then we can still make the triangle (x i , s i , c 3 j ) . Let also 1 and 2 be the two other literals of c j (which do not necessarily satisfy c j ). Denote by a 1 and a 2 the vertices of T v connected to c 3 j corresponding to the literals 1 and 2 , respectively. Then we add the two following triangles: (a 1 , c 1 j , c 3 j ) and (a 2 , c 2 j , c 3 j ). So we used all the backward arcs from T c to T v , and there are no triangles which use two arcs of ⃖� A vc (T) . Then in the packing Δ there are in total In the same way as we already did before, we partition Δ into the different subsets we defined before. We have By Lemma 3 all the upper bounds described above are tight, that is: Δ V,C,C ) will use one arc between two distinct variable gadgets (resp. clause gadgets) and according to Lemma 2, Δ v (resp. Δ c ) uses all the arcs between distinct variable gadgets (resp. clause gadgets). Finally, we always have |Δ 3V | ≤ 2n and Since |Δ 3V | = 2n and we have at most two arc-disjoint triangles in each variable In the following, we will simply write Δ i instead of Δ[V i ] . Let us consider the following assignment a: for any varia- Let us see that the assignment a satisfies the formula F. We have just proved that the backward arcs from T c to T v are all used in Δ 2V,C and Δ V,2C . As |Δ 3C | = 1 the dummy triangle C m+1 belongs to Δ . So every dummy arc c u m+1x i is contained in a triangle of Δ which uses an arc of V i . Therefore in each V i we have d + Moreover, for each clause of size q with q ∈ {2, 3} , there are q triangles which use the backward arcs coming from the clause to variable gadgets. Let C j be a clause gadget of size 3. By construction the 3 triangles cannot all lie in Δ V,2C . Thus, there is at least one of these triangles which is in Δ 2V,C . Let t be one of them, V i be the variable gadget where t has two out of its three vertices and x be the vertex of V i which is also the head of the backward arc from C j to V i . By construction, x corresponds to a literal in the clause c j . If is positive, then i so the assignment sets the positive literal to true, which satisfies c j . Otherwise, is negative so x =x i . Since x i has to use three out-going arcs to consume the dummy arcs and one out-going arc to consume t, we have d + i by Observation 1. Therefore, c j is satisfied in that case too. We can do the same reasoning if C j has size 2, but in that case one recalls that the backward arcs from the clause gadget to its corresponding variable gadgets are from c 2 j instead of c 3 j . Thus, the assignment a satisfies the whole formula F. ◻ As 3-sAt (3) is NP-hard [45,51], this directly implies the following theorem.

Theorem 5 MaxaTT is NP -hard
Algorithmica (2021) 83:1393-1420 As mentioned in the introduction, packing arc-disjoint cycles is not necessarily equivalent to packing arc-disjoint triangles. Thus, we need to establish the following lemma to transfer the previous NP-hardness result to mAxAct .

Lemma 6 Given a 3-SaT(3) instance F, and the tournament
we partition it into the following sets: As we did in the previous proof, we begin by finding upper bounds on each of these sets. First, recall that the FAS of each V i is 2. Thus, we have |O V | ≤ 2n . By construction, we also have |O C | ≤ 1 . Secondly, notice that a cycle of O V * cannot belong to exactly two distinct variable gadgets since the arcs between them are all in the same direction. Thus, the cycles of O V * contain at least three arcs between different variable gadgets which implies |O V * | ≤ 6n(n − 1) . We obtain |O C * | ≤ 3m(m + 1)∕2 using the same reasoning on O C * . Finally, we have |O V * ,C * | ≤ | ⃖� A vc (T)| since each cycle must have at least one backward arc.
Putting these upper bounds together, we obtain that |O| ≤ 6n(n − 1) + 3m(m + 1)∕2 + 2n + | ⃖� A vc (T)| + 1 which implies that the bounds are tight. In particular, cycles of O V * (resp. O C * ) use exactly three arcs that are between distinct variable gadgets (resp. clause gadgets) and all these arcs are used. So we can construct a new cycle packing O ′ where we replace the cycles of O V * and O C * by the triangle packings Δ v and Δ c defined in Lemma 2. The new solution uses a subset of arcs of O and has the same size. The cycles of O V * ,C * use exactly one backward arc of ⃖� A vc (T) due to the tight upper bound | ⃖� A vc (T)| . Moreover, by the previous reasoning, two vertices of a cycle of O V * ,C * cannot belong to two different variable gadgets (resp. clause gadgets). Let C j be a clause gadget which has three literals (if it has only two literals, the reasoning is analogous). Let x i k ∈ V i k be the head of a backward arc from c 3 j where k ∈ [3] . By the previous arguments each arc c 3 jx i k is contained in a cycle o k of O for k ∈ [3] . There is at least one x i k whose next vertex in o k , say y, belongs to V i k since C j has only two other vertices in addition to c 3 j . Without loss of generality, we may assume that x i 3 is that vertex. Then, we can replace o 1 and o 2 by the triangles (x i 1 , c 1 j , c 3 j ) and (x i 2 , c 2 j , c 3 j ) . The arcs c 1 j c 3 j and c 2 j c 3 j cannot have already been used because C j is acyclic and we previously consumed all the arcs between clause gadgets. In the same way, we replace the cycle o 3 by the triangle (x i 3 , y, c 3 j ) . The arc yc 3 j is available since it could have been used only in the cycle o 3 .
We now prove that given a V i , we can restructure every cycle of In the same way, we can restructure o into (x 1 i , s i , t i ) whose all the arcs are available. As O C is already a triangle, T finally has a triangle packing of size 6n(n − 1) + 3m(m + 1)∕2 + 2n + | ⃖� A vc (T)| + 1 . The other direction of the equivalence is straightforward. ◻ The previous lemma and Theorem 5 directly imply the following theorem.
Finally, the size s of the required packing in Lemma 4 satisfies s = O((n + m) 2 ) . Under the exponential-time hypothesis, the problem 3-SAT cannot be solved in 2 o(n+m) [19,33]. Then, using the linear reduction from 3-SAT to 3-sAt(3) [51], we also get the following result. Let us now define two special cases tight-Att (resp. tight-Act ) where, given a tournament T and a linear ordering with k backward arcs (where k = minfas (T) ), the goal is to decide if there is a triangle (resp. cycle) packing of size k. We call these special cases the "tight" versions of the classical packing problems because as the input admits a FAS of size k, any triangle (or cycle) packing has size at most k. We now prove that we can construct in polynomial time an ordering of T , the tournament of the reduction, with k backward arcs (where k is the threshold value defined in Lemma 4).

Lemma 9
Let T be a tournament constructed by the reduction f, and k be the threshold value 6n(n − 1) + 3m(m + 1)∕2 + 5n + 2cl 2 + 3cl 3 + 1. Then, we can construct (in polynomial time) an ordering of T with k backward arcs implying that T has a FAS of size k. Algorithmica (2021Algorithmica ( ) 83:1393Algorithmica ( -1420 Proof Let us define a linear representation ( (T), ⃖� A(T)) such that | ⃖� A(T)| = k . Remember that since n ≡ 3 (mod 6) , the edges of the n-clique K n can be packed into a packing O of n(n − 1)∕6 (undirected) triangles. Let us first prove that there exists an orientation T K n of K n and a linear ordering of T K n with |O| backward arcs. Let = 1 … n . For each undirected triangle ijk in O where i < j < k , we set ki ∈ ⃖� A(T K n ) (implying that ij and jk are forward arcs). As all edges are used in O this defines an orientation for all edges. Thus, there are only |O| backward arcs in . Thus, when using the previous orientations T K n to construct the variable tournament T v of the reduction (remember that we blow up each vertex u i into 6 vertices V i ), we get an ordering with 36n(n − 1)∕6 = 6n(n − 1) backward arcs between two different V i (more formally, 1) ). Following the same construction for the clause tournament T c we get an ordering with 3m(m + 1)∕2 backward arcs between two distinct C j . Now, as there are two backward arcs in each V i , one backward arc in C m+1 , and | ⃖� A vc (T)| backward arcs from T c to T v , the total number of backward arcs is k. ◻ We also prove that k = minfas (T).
Proof We suppose that T is equipped with the ordering defined in Lemma 9. Let S be an optimal FAS of T . Given an arc a, let v(a) = {t(a), h(a)} . Let us partition the arcs of T into the following sets. For any i ∈ [n], j ∈ [m + 1] , let us define

not a tournament) obtained by starting from T v and only keeping arcs in
As according to Lemma 2 there is a cycle packing of size 6n(n − 1) in T ′ v , we get |S VV | ≥ 6n(n − 1) . The same arguments hold for the clause part, and thus with S CC = ⋃ j,j � ∈[m+1],j≠j � S C j C j � , we get |S CC | ≥ 3m(m + 1)∕2 . As C m+1 is a triangle, we also get |S C m+1 | ≥ 1.

For any j ∈ [m]
, let u j ∈ {2, 3} be equal to the size of the clause j (we also have u j = |{a ∈ ⃖� A(T) ∶ ∃i ∈ [n], h(a) ∈ V i and t(a) ∈ C j }| ).
Let L = {j ∈ [m] ∶ |S * C j ∪ S C j | ≥ u j } be informally the set of clauses where S spends a large (in fact larger than the u j required) amount of arcs, and S = [m]⧵L.
Let us prove that for any j ∈ S , |S C j | ≥ u j − 1 . Let us first consider the case where u j = 3 . Suppose by contradiction than S C j = {a} (arguments will also hold for S C j = � ). Remember that (C j ) = (c 1 j , c 2 j , c 3 j ) (there are only forward arcs). As |S * C j | ≤ 1 , there exists i ∈ [n] and two arcs a 1 , a 2 not in S such that t(a 1 h(a 1 ) , and h(a 2 ) ≠ t(a) . Thus, (t(a 1 ), t(a 2 ), h(a 2 )) is a triangle using no arc of S , a contradiction. As an analogous argument holds for the case where u j = 2 , we get that for any j ∈ S , |S C j | ≥ u j − 1 (implying also |S * C j | = 0).
Let us now prove that |S| ≤ 1 . Suppose by contradiction that |S| ≥ 2 . Let j 1 and j 2 be in S. For each l ∈ [2] , let define a l such that there exists i l ∈ [n] with t(a l ) ∈ C j l and h(a l ) ∈ V i l . Notice that we may have i 1 = i 2 , but we always have h(a 1 ) ≠ h(a 2 ) . Moreover, we have that a 3 = h(a 1 )t(a 2 ) and a 4 = h(a 2 )t(a 1 ) are forward arcs of T . As Thus, (t(a 1 ), h(a 1 ), t(a 2 ), h(a 2 ), t(a 1 )) is a cycle using no arc of S , a contradiction. Let

then as S V i must be a FAS of V i and Āx i V i is not a FAS of V i , there exists at least another arc in S V i and we get |S
Let us finally prove that for every i ∈ L � , |S V i ∪ S V i C m+1 | ≥ 6 . As i ∈ L � , there is an arc a ∈ T with h(a) ∈ V i and t(a) ∈ C j 0 where S = {j 0 } . Let x = h(a) . Notice that As |S * C j 0 | = 0 we get that A xV i ⊆ S V i (otherwise there would be a cycle with one vertex in C j 0 , x, and an out-neighbour of x in V i ).
Case 1 x =x i . As S V i must be a FAS of V i , S needs two other arcs in A V i and we get |S V i | ≥ 6.
Putting all the pieces together, we get the following.
So we obtain the claimed result as in the last inequality, if we have |S| = 1 then, it is clear that |L ′ | ≥ 1 . ◻ Then, using Lemmas 9 and 10, we get the NP-hardness of tight-Att and tight-Act .

Theorem 11 TighT-aTT and TighT-aCT are NP -hard.
In the framework of parameterizing above guaranteed values [43], the above results imply that Act parameterized below the guaranteed value of the size of a minimal feedback arc set, that is with parameter r being the difference between the minimum size of a feedback arc set and the maximum size of a triangle packing, is para-NP-hard. Indeed Theorem 11 asserts that is problem is NP-hard for r = 0.

Parameterized Complexity of aCT
In this section, we show that Act can be solved in O ⋆ (2 O(k log k) ) time and admits a linear vertex kernel. Both these results crucially use a combinatorial result relating to arc-disjoint cycles and feedback arc sets.

An Erdős-Pósa Type Theorem
The classical Erdős-Pósa theorem for cycles in undirected graphs states that there exists a function f (k) = O(k log k) such that for each non-negative integer k, every undirected graph either contains k vertex-disjoint cycles or has a feedback vertex set consisting of f(k) vertices [24]. Analogous to this result, we prove an Erdős-Pósa type theorem for tournaments.

Theorem 12 A tournament T contains a set of k arc-disjoint cycles if and only if T contains a set of k arc-disjoint cycles each of length at most
Proof The reverse direction of the claim holds trivially. Let us now prove the forward direction. Let C be a set of k arc-disjoint cycles in T that minimizes ∑ C∈C �C� . If every cycle in C is a triangle, then the claim trivially holds. Otherwise, let C be a longest cycle in C and let denote its length. Let v i , v j be a pair of non-consecutive vertices in C. Then, either v i v j ∈ A(T) or v j v i ∈ A(T) . In any case, the arc e between v i and v j along with A(C) forms a cycle C ′ of length less than with A(C � )⧵{e} ⊂ A(C) . By our choice of C , this implies that e is an arc in some other cycle Ĉ ∈ C . This property is true for the arc between any pair of non-consecutive vertices in C. Therefore, we have 2 − ≤ (k − 1) leading to ≤ 2k + 1 . ◻ This result essentially shows that it suffices to determine the existence of k arcdisjoint cycles in T each of length at most 2k + 1 in order to determine if (T, k) is an yes-instance of Act . This immediately leads to a quadratic Erdős-Pósa bound. That is, for every non-negative integer k, every tournament T either contains k arc-disjoint cycles or has a FAS of size O(k 2 ) . Next, we strengthen this result to arrive at a linear bound.
We will use the following lemma of Chudnovsky et al. [15] in the process 1

Lemma 13 [15] Let D be a triangle-free digraph in which for every pair u, v of distinct vertices, at most one of uv or vu is in A(D). Then, we can compute a FAS of size at most Λ(D) in polynomial time.
This leads to the following main result of this section.

Theorem 14 For every non-negative integer k, every tournament T either contains k arc-disjoint triangles or has a FAS of size at most 5(k − 1) that can be obtained in polynomial time.
Proof Let C be a maximal set of arc-disjoint triangles in T (that can be obtained greedily in polynomial time). If |C| ≥ k , then we have the required set of triangles. Otherwise, let D denote the digraph obtained from T by deleting the arcs that are in some triangle in C . Clearly, D has no triangle and Λ(D) ≤ 3(k − 1) . Let F be a FAS of D obtained in polynomial time using Lemma 13. Then, we have |F| ≤ 3(k − 1) . Next, consider a topological ordering of D − F . Each triangle of C contains at most 2 arcs which are backward in this ordering. If we denote by F ′ the set of all the arcs of the triangles of C which are backward in , then we have |F � | ≤ 2(k − 1) and Algorithmica (2021) 83:1393-1420

A Linear Vertex Kernel
Next, we show that Act has a linear vertex kernel. This kernel is inspired by the linear kernelization described in [10] for FAst and uses Theorem 14. Let T be a tournament on n vertices. First, we apply the following reduction rule.

Reduction Rule 4.1 If a vertex v is not in any cycle, then delete v from T.
This rule is clearly safe as our goal is to find k cycles and v cannot be in any of them. To describe our next rule, we need to state a result by Bessy et al. [10]. An interval is a consecutive set of vertices in a linear representation ( (T), ⃖� A(T)) of a tournament T.

Lemma 15 [10] 2 Let T = ( (T), ⃖� A(T)) be a tournament on which Reduction Rule 4.1 is not applicable. If |V(T)| ≥ 2| ⃖� A(T)| + 1, then there exists a partition J of V(T) into intervals (that can be computed in polynomial time) such that there are | ⃖� A(T) ∩ E| > 0 arc-disjoint cycles using only arcs in E where E denotes the set of arcs in T with endpoints in different intervals.
Our reduction rule that is based on this lemma is as follows.

Lemma 16 Reduction Rule 4.2 is safe.
Proof Let T ′ be the tournament obtained from T by reversing all arcs in ⃖� A(T) ∩ E . Suppose T ′ has k − | ⃖� A(T) ∩ E| arc-disjoint cycles. Then, it is guaranteed that each such cycle is completely contained in an interval. This is due to the fact that T ′ has no backward arc with endpoints in different intervals. Indeed, if a cycle in T ′ uses a forward (backward) arc with endpoints in different intervals, then it also uses a backward (forward) arc with endpoints in different intervals. It follows that for each arc uv ∈ E , neither uv nor vu is used in these k − | ⃖� A(T) ∩ E| cycles. Hence, these k − | ⃖� A(T) ∩ E| cycles in T ′ are also cycles in T. Then, we can add a set of | ⃖� A(T) ∩ E| cycles obtained from the second property of Lemma 15 to these k − | ⃖� A(T) ∩ E| cycles to get k cycles in T. Conversely, consider a set of k cycles in T. As argued earlier, we know that the number of cycles that have an arc that is in E is at most | ⃖� A(T) ∩ E| . The remaining cycles (at least k − | ⃖� A(T) ∩ E| of them) do not contain any 1 3 arc that is in E, in particular, they do not contain any arc from ⃖� A(T) ∩ E . Therefore, these cycles are also cycles in T ′ . ◻ Thus, we have the following result.

Theorem 17 aCT admits a kernel with O(k) vertices.
Proof Let (T, k) denote the instance obtained from the input instance by applying Reduction Rule 4.1 exhaustively. From Lemma 14, we know that either T has k arc-disjoint triangles or has a FAS of size at most 5(k − 1) that can be obtained in polynomial time. In the first case, we return a trivial yes-instance of constant size as the kernel. In the second case, let F be the FAS of size at most 5(k − 1) of T. Let ( (T), ⃖� A(T)) be the linear representation of T where (T) is a topological ordering of the vertices of the directed acyclic graph , then from Lemma 15, there is a partition of V(T) into intervals with the specified properties. Therefore, Reduction Rule 4.2 is applicable (and the parameter drops by at least 1). When we obtain an instance where neither of the Reduction Rules 4.1 and 4.2 is applicable, it follows that the tournament in that instance has at most 10k vertices. ◻

An FPT Algorithm
Finally, we show that Act can be solved in O ⋆ (2 O(k log k) ) time. The idea is to reduce the problem to the following Arc-disjoint PAths problem in directed acyclic graphs: given a digraph D on n vertices and k ordered pairs (s 1 , t 1 ), … , (s k , t k ) of vertices of D, do there exist arc-disjoint paths P 1 , … , P k in D such that P i is a path from s i to t i for each i ∈ [k] ? On directed acyclic graphs, Arc-disjoint PAths is known to be NPcomplete [25], W[1]-hard [49] with respect to k as parameter and solvable in n O(k) time [30]. Despite its fixed-parameter intractability, we will show that we can use the n O(k) algorithm and Theorems 14 and 17 to describe an FPT algorithm for Act .

Theorem 18 aCT can be solved in
Proof Consider an instance (T, k) of Act . Using Theorem 17, we obtain a kernel I = (T,k) such that T has O(k) vertices. Further, k ≤ k . By definition, (T, k) is an yes-instance if and only if (T,k) is an yes-instance. Using Theorem 14, we know that T either contains k arc-disjoint triangles or has a FAS of size at most 5(k − 1) that can be obtained in polynomial time. If Theorem 14 returns a set of k arc-disjoint triangles in T , then we declare that (T, k) is an yes-instance. Otherwise, let F be the FAS of size at most 5(k − 1) returned by Theorem 14. Let D denote the (acyclic) digraph obtained from T by deleting F . Observe that D has O(k) vertices. Suppose T has a set C = {C 1 , … , Ck} of k arc-disjoint cycles. For each C ∈ C , we know that A(C) ∩F ≠ � as F is a FAS of T . We can guess that subset F of F such that F =F ∩ A(C) . Then, for each cycle C i ∈ C , we can guess the arcs F i from F that it contains and also the order i in which they appear. This information is captured as a partition F of F into k sets, F 1 to Fk and the set { 1 , … , k } of permutations where i is a permutation of F i for each i ∈ [k] . Any cycle C i with A(C i ) ∩ F = F i contains a (v, x)-path between every pair (u, v), (x, y) of consecutive arcs of F i with arcs from A(D). That is, there is a path from h( −1 i (j)) and t( −1 i ((j + 1) mod |F i |)) with arcs from D for each j ∈ [|F i |] . The total number of such paths in these k cycles is O(|F|) and the arcs of these paths are contained in D which is a (simple) directed acyclic graph.
The number of choices for F is 2 |F| and the number of choices for a partition F = {F 1 , … , Fk} of F and a set X = { 1 , … , k } of permutations is 2 O(|F| log |F|) . Once such a choice is made, the problem of finding k arc-disjoint cycles in T reduces to the problem of finding k arc-disjoint cycles C = {C 1 , … , Ck} in T such that for each 1 ≤ i ≤k and for each 1 ≤ j ≤ |F i | , C i has a path P ij between h( −1 i (j)) and t( −1 i ((j + 1) mod |F i |)) with arcs from D =T −F . This problem is essentially finding r = O(|F|) arc-disjoint paths in D and can be solved in |V(D)| O(r) time using the algorithm of Fortune et al. [30]. Therefore, the overall running time of the algorithm is O ⋆ (2 O(k log k) ) as |V(D)| = O(k) and r = O(k) . ◻

Parameterized Complexity of aTT
In this section, we provide an FPT algorithm and a linear vertex kernel for Att . First, it is easy to obtain an O ⋆ (2 O(k) ) time algorithm using the classical colour coding technique [5] for packing subgraphs of bounded size. ) time using (m, 3k)-perfect hash functions [5,48]. This family satisfies the following property: for every set E ⊆ A(T) of size 3k, there is a function c ∈ F such that c(e) ≠ c(e � ) for any two distinct arcs e, e � ∈ E . For each colouring function c in F , we colour A(T) according to c and find a triangle packing of size k whose arcs use different colours. We use a standard dynamic programming routine to finding such a triangle packing. Clearly, if I is an yes-instance and C is a set of k arc-disjoint triangles in T, there is a colouring function in F that colours the 3k arcs in these triangles with distinct colours and our algorithm will find the required triangle packing. Given a colouring c ∈ F , we first compute for every set of 3 colours {a, b, c} whether the arcs coloured with a, b or c induce a triangle using 3 different colours or not. Then, for every set S of 3(p + 1) colours with p ∈ [k − 1] , we recursively test if the arcs coloured with the colours in S induce p + 1 arc-disjoint triangles whose arcs use all the colours of S. This is achieved by iterating over every subset {a, b, c} of S and checking if there is a triangle using colours a, b and c and a collection of p arc-disjoint triangles whose arcs use all the colours of S⧵{a, b, c} . For a given S, we can find this collection of triangles in O(p 3 ) = O(k 3 ) time. Therefore, the overall running time of the algorithm is O ⋆ (2 O(k) ) . ◻ Next, we show that Att has a linear vertex kernel.
Theorem 20 aTT admits a kernel with O(k) vertices.
Proof Let X be a maximal collection of arc-disjoint triangles of a tournament T obtained greedily. Let V X denote the vertices of the triangles in X and A X denote the arcs of V X . Let U be the remaining vertices of V(T) , i.e., U = V(T)⧵V X . If |X| ≥ k , then (T, k) is an yes-instance of Att . Otherwise, |X| < k and |V X | < 3k . Moreover, notice that T[U] is acyclic and T does not contain a triangle with one vertex in V X and two in vertices in U (otherwise X would not be maximal). Let B be the (undirected) bipartite graph defined by V(B) = A X ∪ U and E(B) = {au ∶ a ∈ A X , u ∈ U such that (t(a), h(a), u) forms a triangle in T} . Let M be a maximum matching of B and A ′ (resp. U ′ ) denote the vertices of A X (resp. U ) covered by M . Define A � = A X ⧵A � and U � = U⧵U � .
We now prove that (V X ∪ U � , k) is a linear kernel of (T, k) . Let C be a maximum sized triangle packing that minimizes the number of vertices of U ′ belonging to a triangle of C . By previous remarks, we can partition C into C X ∪ F where C X are the triangles of C included in T[V X ] and F are the triangles of C containing one vertex of U and two vertices of V X . It is clear that F corresponds to a union of vertex-disjoint stars of B with centres in U. Denote by U[F] the vertices of U which belong to a triangle of F. If U[F] ⊆ U � then (V X ∪ U � , k) is immediately a kernel. Indeed, in this case the vertex set of C belongs to V X ∪ U � , and hence (V X ∪ U � , k) is a yes instance. In the reverse direction, note that T[V X ∪ U � ] is an induced subgraph of T, and hence if (V X ∪ U � , k) is a yes instance, then so is (T, k). This completes the equivalence in this case. Now we assume that there exists a vertex x 0 such that x 0 ∈ U[F] ∩ U � .
We will build a tree rooted in x 0 with edges alternating between F and M.
edge of T). This operation leads to another collection of arc-disjoint triangles with the same size as C but containing a strictly smaller number of vertices in U ′ , yielding a contradiction.
Finally V X ∪ U � can be computed in polynomial time and we have , which proves that the kernel has O(k) vertices. ◻

MaxaCT and MaxaTT in Sparse Tournaments
Recall that a tournament is sparse if it admits a FAS which is a matching. This class of tournaments is interesting for cycle packing problems and packing vertex-disjoint triangles (and hence cycles) in sparse tournaments is NP-complete [8]. In this section, we show that mAxAct and mAxAtt are polynomial-time solvable on sparse tournaments. Let T be a sparse tournament according to the ordering of its vertices (T) , that is the set of its backward arcs ⃖� A(T) is a matching. If a backward arc xy of T lies between two consecutive vertices, then we can exchange the position of x and y in (T) to obtain a sparse tournament with fewer backward arc. So we can assume that the backward arcs of T do not contain consecutive vertices.
Moreover, if a vertex x of T is contained in no backward arcs of T , then call A (resp. B) the vertices of T which are after (resp. before) x in (T) . Let X 0 be the set of triangles made from a backward arc from A to B and the vertex x. As T is sparse it is clear that X 0 is a set of disjoint triangles. Moreover, it can easily be seen that there exists an optimal packing of triangles (resp. cycles) of T which is the union of an optimal packing of triangles (resp. cycles) of T[A] , one of T[B] and X 0 . Thus to solve mAxAtt or mAxAct on T we can solve the problem on T[A] and on T[B] and build the optimal solution for T . Therefore we can focus on the case where every vertex of T is the beginning or the end of a backward arc ⃖� A(T) . We will call such a tournament a fully sparse tournament. So we focus on solving mAxAtt in fully sparse tournaments. Let Π be the problem of finding a collection of arc-disjoint triangles of maximum size on a fully sparse tournament. Now order the arcs e 1 , … , e b of ⃖� A(T) such that for any i , t(e i )) or (h(e i ), t(e j ), t(e i )) is a triangle of T . Let Π � be the problem such that, given a digraph G � = (V � , A � ) , the objective is to find a maximum sized subset of A ′ such that the digraph induced by the arcs of the subset is a functional and digon-free digraph. Recall that a functional digraph is a digraph such that any of its vertices has out-degree at most 1 and that a digon is a cycle over two vertices.
Let X be a solution (not necessary optimal) of Π � (G � ) , and e i e j an arc of X. We denote by (e i e j ) the triangle (h(e i ), h(e j ), t(e i )) if i < j and (h(e i ), t(e j ), t(e i )) otherwise. Given a triangle (e i e j ) , let s(e j ) be the second vertex of (e i e j ) ; in other words, if (e i e j ) = (h(e i ), t(e j ), t(e i )) , then s(e j ) = t(e j ) and s(e j ) = h(e j ) otherwise.
Informally, (e i e j ) corresponds to the triangle formed by the backward arc e i and one vertex of e j , that vertex being s(e j ) . In the same way, we define (X) = ⋃ x∈X (x). Proof First let X be an optimal solution of Π � (G � ) and let e i e j and e k e l be two distinct arcs of X. We cannot have e i = e k as X induces a functional digraph in G ′ . Without loss of generality, we may assume that i < k , that is h(e i ) < h(e k ) . Moreover, we cannot have t(e i ) = t(e k ) without contradicting that T is a sparse tournament. As h(e i ) < h(e k ) the arc h(e i )s(e j ) is not an arc of (e k e l ) . Thus if (e i e j ) and (e k e l ) share a common arc, it means that s(e j )t(e i ) = h(e k )s(e l ) . But in this case e i = e l and e j = e k , implying {e i e j , e k e l } is a digon of G ′ , which contradict the fact that X is a solution Π � (G � ) . So, if X is a solution of Π � (G � ) , then (X) is an solution of Π(T). Now, let Y be a set of arc-disjoint triangles of T, and let y be an element of Y. As T is sparse, y contains only one backward arc of T, and so t is (h(e i ), u, t(e i )) for some i ∈ [b] and u ∈ V(T) . Moreover u is incident with a backward arc e j of T. So we have either y = (e i e j ) or h(e i ) < h(e j ) < t(e j ) < t(e i ) and y = (h(e i ), t(e j ), t(e i )) . In this later case, notice that no triangle of Y uses the arcs h(e i )h(e j ) and h(e j )t(e i ) , and so that Y⧵{y} ∪ (e i e j ) is still a set of arc-disjoint triangles of T. In both cases, we associate the arc e i e j of G ′ to y, and call X the corresponding set of arcs of G ′ associated with the triangles of Y. The set X does not contain any digon, as otherwise the two corresponding triangles of Y would not be arc-disjoint. Moreover, we cannot have a vertex e i of G ′ such that d + X (e i ) > 1 , since it would imply that the backward arc e i of T is covered by at least two triangles of Y. So X induces a digon-free functional subdigraph of G ′ , and hence is a solution of Π � (G � ) , with |X| = |Y| . ◻ So, by this claim we can solve Π � (G � ) instead of Π(T) , and we will now show how to solve Π � in polynomial time.

Claim 6.2 If G ′ is strongly connected and has a cycle C of size at least 3 then the solution of Π � (G � ) is the number of vertices of G ′ .
Proof We construct the arc set X as follows: we start by taking the arcs of C. Then, while there is a vertex x which is not covered by any arcs of X, we add to X the arcs of the shortest path from x to any vertex of X. By construction, every vertex x of every arc of X verify d + X (x) = 1 , and X is digon free. Since X covers every vertex of G ′ , |X| is a maximum solution of Π � (G � ) , that is the number of vertices of G ′ . ◻ A digraph D is a digoned tree if D arises from a tree with at least 2 vertices whose each edge is replaced by a digon.

Claim 6.3 If G ′ is strongly connected and has only cycles of length 2 then G ′ is a digoned tree.
Proof Since G ′ is strongly connected, for any arc xy of G ′ there exists a path from y to x. As G ′ only contains cycles of length 2, the only path from y to x is the directed arc yx. So every arc of G ′ is contained in a digon. If H is the underlying graph of G ′ (without multiple edges) then it is clear that H is a tree otherwise G ′ would contain a cycle of length more than 2. ◻ Claim 6.4 If G ′ is a digoned tree or if |V(G � )| = 1, then the size of an optimum solu- Proof The case |V(G � )| = 1 is clear. So assume that G ′ is a digoned tree and let X be a set of arcs of G ′ corresponding to an optimal solution of Π � (G � ) . Then X is acyclic and then has size at most |V(G � )| − 1 . Moreover, any in-branching of G ′ provides a solution of size |V(G � )| − 1 . ◻ Let us now investigate the case where G ′ is not strongly connected. In that case, it is known that the strong subdigraphs D 1 , … , D t of G ′ can be ordered such that there is no arc from and u a vertex of D i .

Lemma 21
Let G ′ be a digraph with n vertices. Denote by S 1 , … , S p terminal strong components of G ′ such that for any i with 1 ≤ i ≤ k, S i is a digoned tree or an isolated vertex and for any i > k, S i contains a cycle of length at least 3. Then the size of an optimum solution to Π � (G � ) is n − k and we can construct one in polynomial time.
Proof We can assume that G ′ is connected otherwise we apply the result on every connected component of G ′ and the disjoint union of the solutions produces an optimal solution on the whole digraph G ′ .
So assume that G ′ is connected and let S be a terminal strong component of G ′ . If X is an optimal solution of Π � (G � ) then the restriction of X to the arcs of G � [S] is an optimal solution of Π � (G � [S]) . Indeed otherwise we could replace this set of arcs in X by an optimal solution of Π � (G � [S]) and obtain a better solution for Π � (G � ) , a contradiction.
So by Claims 6.2 and 6.4 the set X contains at most ∑ i=1,…,p �S i � − k arcs lying in a terminal strong component of G ′ . Now as every vertex of G � ⧵ ⋃ i=1,…,p S i is the beginning of at most one arc of X, the set X has size at most n − k . Conversely by growing in-branchings in G ′ from the union of the optimal solutions of Π � (G � [S i ]) for i = 1, … , p , by Claim 6.2 and 6.4 we obtain a solution of Π � (G � ) of size n − k which is then optimal. Moreover, this solution can clearly be built in polynomial time. ◻ Using Claim 6.1 and Lemma 21 we can solve mAxAtt in polynomial time in sparse tournaments.

Lemma 22
In a fully sparse tournament T the size of a maximum cycle packing is equal to the size of a maximum triangle packing.
Proof Let T be a fully sparse tournament with its associated order (T) = (x 1 , … , x n ) , that is the set of its backward arcs ⃖� A(T) forms a perfect matching on V(T) . Respectively denote by t 0 and t 3 the maximum number of arc-disjoint cycles in T and the maximum number of arc-disjoint number of arc-disjoint triangles in T . It is clear that we have t 3 ≤ t 0 , and let us prove that the converse inequality holds. Consider C a collection of arc-disjoint cycles of T of size t 0 such that C contains a maximal number of triangles for this. If C only contains triangles then we have t 0 = |C| = t 3 and then we are done.
Assume that this is not the case and denote by x i a vertex of T which belongs to a cycle C of C different from a triangle and with i maximum for that. As T is fully sparse, x i is the tail of a backward arc x i x j of T . By choice of x i , the out-neighbour of x i along C is before x i in (T) and so it is x j . Let now x k be the out-neighbour of x j along C. As T is sparse, we have j < k < i . If x k x i does not belong to a cycle of C , then replacing C by x j x k x i in C leads to an arc-disjoint collection of cycles of T of size t 0 containing more triangles than C , a contradiction. So, the arc x k x i belong to a cycle C ′ of C.
The out-neighbour x p of x i in C ′ is not x j as C and C ′ are arc-disjoint. Thus we have p > i and by definition of x i , the cycle C ′ is the triangle x k x i x p . In particular, the backward arc of T incident with x k is x p x k and if we denote by x l the out-neighbour of x k in C, we have l > k . By choice of x i , we also have l < i . If x l x p does not belong to any cycle of C then replacing C and C ′ by the triangles x j x k x i and x k x l x p in C gives us an arc-disjoint collection of cycles of T of size t 0 containing more triangles than C , a contradiction. So, the arc x l x p belongs to a cycle C ′′ of C. Now we will be able to conclude, see Fig. 3 which depicts this case. By definition of x i , the cycle C ′′ is a triangle. And as the backward arc of T incident with x p is x p x k , the out-neighbour x q of x p in C ′′ satisfies q > p . So, C ′′ is the triangle x l x p x q . Notice that the arc x l x i either belongs to C or does not belong to any cycle of C . Indeed, otherwise, it should be contained in a triangle of C by definition of x i , but no backward arc incident with x l or x i could be used by this triangle. If C in C does not use x l x i , then we can replace a part of C with (the unused) arc x l x i . Fig. 3 We can replace the cycles C (partially depicted in red), C ′ (in green) and C ′′ (in blue) by the triangles x j x k x i , x k x l x p and x l x i x q in C which leads to an arc-disjoint collection of cycles of T Moreover, notice also that x i x q does not belong to any cycle of C . Indeed, otherwise, it should belong to a triangle of C by choice of x i , but no backward arc in x i or x q is available to form such a triangle. So replacing C, C ′ and C ′′ by the triangles x j x k x i , x k x l x p and x l x i x q in C leads to an arc-disjoint collection of cycles of T of size t 0 containing more triangles than C , a contradiction.
Finally, C only contains triangles and we obtain that t 0 = t 3 . ◻ This leads to the following main result of this section.

Theorem 23
MaxaTT and MaxaCT restricted to sparse tournaments can be solved in polynomial time.

Concluding Remarks
In this work, we studied the classical and parameterized complexity of packing arcdisjoint cycles and triangles in tournaments. We showed NP-hardness, fixed-parameter tractability and linear kernelization results. We also showed that these problems are polynomial-time solvable in sparse tournaments. To conclude, observe that very few problems on tournaments are known to admit an O ⋆ (2 O( √ k) )-time algorithm when parameterized by the standard parameter k [46]-FAst is one of them [4,26]. To the best of our knowledge, outside bidimensionality theory, there are no packing problems that are known to admit such subexponential algorithms. In light of the