(k-2)-linear connected components in hypergraphs of rank k

We define a $q$-linear path in a hypergraph $H$ as a sequence $(e_1,\ldots,e_L)$ of edges of $H$ such that $|e_i \cap e_{i+1}| \in [\![1,q]\!]$ and $e_i \cap e_j=\varnothing$ if $|i-j|>1$. In this paper, we study the connected components associated to these paths when $q=k-2$ where $k$ is the rank of $H$. If $k=3$ then $q=1$ which coincides with the well-known notion of linear path or loose path. We describe the structure of the connected components, using an algorithmic proof which shows that the connected components can be computed in polynomial time. We then mention two consequences of our algorithmic result. The first one is that deciding the winner of the Maker-Breaker game on a hypergraph of rank 3 can be done in polynomial time. The second one is that tractable cases for the NP-complete problem of"Paths Avoiding Forbidden Pairs"in a graph can be deduced from the recognition of a special type of line graph of a hypergraph.


Introduction
There are many possible definitions for a path between two vertices in a hypergraph.Each one has its own associated connectivity problem, consisting in the algorithmic computation of the connected components and the potential study of their structure.Possible fields where such problems apply include system security [Guzzo et al. (2014)] on undirected hypergraphs as well as propositional logic [Gallo et al. (1993)], system transfer protocols [Thakur and Tripathi (2009)] or computational tropical geometry [Allamigeon (2014)] on directed hypergraphs.
In an undirected hypergraph, a linear path (or loose path) is a sequence of edges such that any two consecutive edges intersect on exactly one vertex and any two non-consecutive edges do not intersect.Our main motivation is the connectivity problem associated with linear paths in 3-uniform hypergraphs.The existence of such paths is the subject of numerous extremal results [Omidi and Shahsiah (2014)] [Jackowska (2015)] [Jackowska et al. (2016)] [Wu and Peng (2021)].For instance, [Jackowska et al. (2016)] determines the Turán number of the 3-uniform linear path et al. (1976)].
After some basic definitions given in Section 2, including the introduction of q-linear paths, Section 3 presents structures that are specific to the case q = k − 2 as well as some of their properties.It is then shown algorithmically in Section 4 that these structures describe the (k − 2)-linear connected components, which can be computed in polynomial time: these are our two main results.Finally, Section 5 addresses the links that our algorithmic problem has with the Maker-Breaker game and the PAFP problem.We end by formulating some open problems that arise from our study.

Description of the problem
Definition 2.3.A path in H is a sequence − → P = (e 1 , . . ., e L ) of edges of H such that one can write V ( − → P ) = {x 1 , . . ., x N } and e i = {x si , x si+1 , . . ., x fi } with s i < s i+1 ≤ f i < f i+1 for all 1 ≤ i ≤ L − 1.Note that e i ∩ e i+1 ̸ = ∅ for all 1 ≤ i ≤ L − 1.The path is deemed simple if e i ∩ e j = ∅ for all 1 ≤ i, j ≤ L such that |i − j| > 1. See Figure 1.We study paths with the additional q-linearity property that |e i ∩ e i+1 | ≤ q for some fixed integer q.Since we are only interested in existence questions, we can focus on simple such paths: indeed, from any path it is possible to extract a simple path by removing some edges if necessary, and this obviously preserves the q-linearity property.An equivalent definition is the following: Florian Galliot, Sylvain Gravier, Isabelle Sivignon Definition 2.4.Let q ≥ 1.A q-linear path in H is a sequence − → P = (e 1 , . . ., e L ) of edges of H such that for all 1 ≤ i < j ≤ L: |e i ∩ e j | ∈ [[1, q]] if j = i + 1. = 0 otherwise. .Definition 2.5.Let q ≥ 1 be an integer and let X, Y ⊆ V (H) be nonempty such that |X ∩ Y | ≤ q.
A q-linear path from X to Y in H is a q-linear path − → P = (e 1 , . . ., e L ) in H such that: 1 and: (i) X ∩ e 1 ̸ = ∅, and if L ≥ 2 then X ∩ e i = ∅ for all 2 ≤ i ≤ L.
Proof: This is clear by minimality (resp.maximality) of s (resp.r).
Definition 2.7.Let x ∈ V (H).The q-linear connected component of x in H is defined as: LCC q H (x) := {y ∈ V (H) such that there exists a q-linear path from x to y in H}.
It is important to note that q-linear paths do not define a transitive relation, so that the q-linear connected components of a hypergraph do not necessarily form a partition of its vertex set.Indeed, the union of a q-linear path from x to y and a q-linear path from y to z does not necessarily contain a q-linear path from x to z.An illustration in the case q = 1 is provided in Figure 3 (this graphical representation of 3-uniform hypergraphs will be used throughout, with each edge pictured as a "claw" joining its three vertices).Therefore, the problem consisting in computing the q-linear connected component of a given vertex is nontrivial.
This problem reduces polynomially to the case where H is uniform.Indeed, if H is of rank k then let H 0 be the k-uniform hypergraph obtained from H by adding k − |e| new vertices to each edge e: it is easy to see that there exists a q-linear path from x to y in H if and only if there (k − 2)-linear connected components in hypergraphs of rank k x y z Fig. 3: There is no 1-linear path from x to z.
exists one in H 0 .We thus introduce the following decision problem: Input : a k-uniform hypergraph H and two distinct vertices x, y of H.
Output : YES if and only if there exists a q-linear path from x to y in H.
The case q = k − 1 corresponds to standard (i.e.non-constrained) connectivity in hypergraphs, which is tractable via a simple DFS/BFS-type search.We now address the case q = k − 2.

(k − 2)-linear paths in k-uniform hypergraphs
In this section, we suppose H is k-uniform with k ≥ 3.

Principle
Let x * ∈ V (H) be the vertex whose (k − 2)-linear connected component we wish to compute.The idea is to design an algorithm that searches through E(H) and accepts edges under some guarantee that all their vertices are in LCC k−2 H (x * ).Consider the situation in the middle of the execution of the algorithm.Some edges have already been accepted, forming a subhypergraph I 1 of H containing x * such that: for all x ∈ V (I 1 ), there exists a (k − 2)-linear path from x * to x in I 1 .Now, the algorithm encounters some edge e intersecting both V (I 1 ) and V (H) \ V (I 1 ), and needs to decide whether or not e should be accepted right away: let x ∈ e \ V (I 1 ), can we find a (k − 2)-linear path from x * to x made of edges in E(I 1 ) ∪ {e}?
The only way would be to use a (k − 2)-linear path − → P = (e 1 , . . ., e L ) from x * to X := e ∩ V (I 1 ) in I 1 (Lemma 2.6 ensures there exists one), and prolong it with the edge e to reach e \ V (I 1 ).However, though to not just be any (k − 2)-linear path from x * to X but to be one that satisfies X ̸ ⊂ e L : such a path will be deemed (x * , X)-extendable, because it can be prolonged by an edge that contains X while preserving the (k − 2)-linearity.An illustration is given in Figure 4.
So, what property must I 1 have if we want to be able to accept any edge intersecting both V (I 1 ) and V (H) \ V (I 1 )?As we have just seen, the existence of a (k − 2)-linear path from x * to x in I 1 for all x ∈ V (I 1 ) is not sufficient.Additionally to this, we would need the existence of an (x * , X)-extendable path in I 1 for all X ⊂ V (I 1 ) of size k − 1.If I 1 satisfies these two properties, we will say I 1 is an island with entry {x * }.
x * e I x * I e Fig. 4: Here k = 4 and |X| = 3 (the red hatched area is X).The grey path from x * to X on the left is (x * , X)-extendable, but the one on the right is not because its final edge contains X entirely.
However, the accepted edges might not always form an island.Suppose I 1 is an island and we next discover an edge e 0 such that |e 0 ∩ V (I 1 )| = 1 (so we accept e 0 ) i.e. e 0 is of the form e 0 = {x 1 } ∪ ε where e 0 ∩ V (I 1 ) = {x 1 } and |ε| = k − 1.Then the accepted edges do not form an island anymore: the only known (k − 2)-linear paths from x * to ε use e 0 so they contain ε entirely, meaning they are not (x * , ε)-extendable.Suppose the next few accepted edges form a subhypergraph I 2 that contains ε but is disjoint from I 1 , such that for all x ∈ V (I 2 ) there exists a (k − 2)-linear path from ε to x in I 2 .The algorithm now encounters some edge e whose known vertices are in I 2 (see Figure 5): should we accept e? Let X := e ∩ V (I 2 ) and y ∈ e \ X.The only way to reach y from x * is via We know such a − → P exists, however there are conditions on • Since ε ⊂ e 0 , we also need ε ̸ ⊂ e 1 .

Such a path
− → Q will be deemed (ε, X)-extendable (this time, there are conditions at both ends of the path).In conclusion, to be able to accept any such e, we would need the existence of an (ε, X)-extendable path in I 2 for all X ⊂ V (I 2 ) of size at most k − 1.If I 2 satisfies these two properties, we will say I 2 is an island with entry ε.
We see the premises of the archipelago structure of H[LCC k−2 H (x * )], which we are going to establish.

Definitions
We now give the formal definitions that we are going to use.

X Y
Fig. 6: An (X, Y )-extendable path in the case k = 3: the path contains exactly one vertex of X and one vertex of Y .
Note that the condition on X is empty if |X| ≤ k − 2: it is only when |X| = k − 1 that we need to make sure that prolonging − → P with an edge containing X maintains the (k − 2)-linearity (same for Y ).Therefore, if |X|, |Y | ≤ k − 2, then an (X, Y )-extendable path is simply a (k − 2)-linear path from X to Y .It is also important to keep in mind that the definition is dependent on X and Y : we do not define an "extendable path", we define an "(X, Y )-extendable path".
Example.The empty island with entry ε ⊂ V (H), where 1 ≤ |ε| ≤ k − 1, is the island I with entry ε defined by ) is an (ε, X)-extendable path in I.This example is illustrated at the far left of Figure 7. Fig. 7: Some islands for k = 3, except the far right one where k = 4 (with the same "claw" representation for edges).The grey hatched area will always represent the entry.For three of them, we show an (ε, X)-extendable path (in blue) for some X of size k − 1 (circled in blue).

Extension lemmas
The notion of (X, Y )-extendable path has been introduced to prolong and compose (k − 2)-linear paths.In that direction, we now prove two useful lemmas which are illustrated in Figures 8 and 9.
Proof: By symmetry, we only need to prove the first assertion.First notice that  (k − 2)-linear connected components in hypergraphs of rank k , and define

Archipelagos
In this subsection, we fix some x * ∈ V (H).

Definition
Definition 3.5.Let I and I ′ be disjoint islands in H, where I ′ has an entry ε of size k − 1.
An edge e ∈ E(H) of the form e = {x} ∪ ε for some x ∈ V (I) is called a crossing edge from I to I ′ .We denote by C(I, I ′ ) ⊆ E(H) the set of all crossing edges from Remark.The above definition depends on the choice of ε (an island might have several possible entries suiting the definition).However, we will always specify the entries when defining islands and therefore consider crossing edges for those specific entries.Definition 3.6.An x * -archipelago is a subhypergraph A of H such that there exist subhypergraphs I 1 , . . ., I N of A that are pairwise-disjoint islands with respective entries ε 1 , . . ., ε N satisfying the following properties: • If G is exactly a spanning arborescence rooted at I 1 , we say A is an arborescent x * -archipelago.Since x * is fixed, we usually call A an archipelago for short.
Remark.By definition of a crossing edge, there cannot exist a crossing edge from some I i to I 1 in an archipelago since |ε 1 | = 1 ̸ = k − 1.In other words, I 1 has in-degree zero in G.
Therefore, an archipelago is a union of pairwise-disjoint islands and crossing edges between some of them, satisfying specific properties.See Figure 10 for an example (for clarity, we will use k = 3 for all figures from now on).We will later see that an archipelago has a unique decomposition in islands, but for now we have to give ourselves islands and entries suiting the definition whenever we consider an archipelago.

Properties
The next two results show how (k − 2)-linear paths in A are related to paths in the digraph G. Obviously, by definition of an archipelago, a (k − 2)-linear path in A starting from x * necessarily visits successive islands, using crossing edges to jump from one island to another.The following proposition states that, additionally, a crossing edge can only be used in one direction which is given by the digraph G, therefore each island is entered through its entry (hence the terminology) and it is impossible to reenter an island after leaving it.
Proof: That last assertion is clear: for p = 1 we have We proceed by induction on L. The case L = 0 is trivial: we have x = x * so we can set M = 1 and − → P 1 = − → P = ().Let L ≥ 1 and assume the result to be true for all (k − 2)-linear paths that are shorter than − → P .The idea is to separate two simple cases: either we are currently visiting the island I i (case e L ∈ E(I i )) or we have just jumped onto is a (k − 2)-linear path from x * to y in A. We have y ∈ V (I j ) for some 1 ≤ j ≤ N .By the induction hypothesis, there exists a path • First suppose that e L ∈ E(I i ) (see Figure 11, top).Since y ∈ e L , this implies i = j, so Therefore, the following writing of − → P completes the proof: • Now suppose e L ̸ ∈ E(I i ) (see Figure 11, bottom), then by definition of an archipelago we have either e L ∈ C A (I i , I j ) or e L ∈ C A (I j , I i ).Suppose for a contradiction that e L ∈ C A (I i , I j ) i.e. e L = {x} ∪ ε j : in particular j ̸ = 1 (and The following proposition is a generalization to archipelagos of the property that defines an island. Fig. 12: An (εi 1 , X)-extendable path in an archipelago.
Proposition 3.9.Let A be an archipelago, with I 1 , . . ., For all 1 ≤ j ≤ N and for every path Proof: We proceed by induction on M .
• First suppose M = 1: we need to show that if X ∩ V (I j ) ̸ = ∅ then there exists an (ε j , X)extendable path in I j .This is basically the definition of an island, except that X is not necessarily entirely included in V (I j ).This is not a problem: since X ̸ ∈ {ε 2 , . . ., ε N } by assumption, there exists an (ε j , X ∩ V (I j ))-extendable path − → P in I j by definition of an island, and − → P is also (ε j , X)-extendable by Lemma 3.3.
• Now suppose M ≥ 2 and assume the result to be true for all shorter paths in G.We build the desired (ε i1 , X)-extendable path by assembling three parts: (1) By the induction hypothesis, there exists an (ε i2 , X)-extendable path for some x ∈ V (I i1 ).

Florian Galliot, Sylvain Gravier, Isabelle Sivignon
The path We get the following characterization for the entries of an archipelago: Proposition 3.10.Let A be an archipelago, with I 1 , . . ., There exists an (x * , X)-extendable path in A if and only if X ̸ ∈ {ε 2 , . . ., ε N }.
Proof: We distinguish both cases: -linear path from x * to x in A for some x ∈ ε i .By Proposition 3.8, some edge of − → P (necessarily the last one, since Out of all the paths in G from I 1 to one of the islands intersecting X (recall that G contains a spanning arborescence rooted at I 1 , so there exists at least one), consider a shortest one, so that X only intersects the last island of that path.We can now apply Proposition 3.9: there exists an (ε 1 , X)-extendable path in A, which concludes since Corollary 3.11.Let A be an archipelago in H.For all x ∈ V (A), there exists a (k − 2)-linear path from x * to x in A. In particular, V (A) ⊆ LCC k−2 H (x * ).
Proof: Let x ∈ V (A): applying Proposition 3.10 to X = {x} shows that there exists a (k−2)-linear path from x * to x in A.
Finally, we show that an archipelago has a unique decomposition.
Proposition 3.12.Any archipelago A has unique islands and entries suiting the definition.
Proof: Let ε 1 , . . ., ε N be entries suiting the definition: we have ε 1 = {x * }, moreover {ε 2 , . . ., ε N } is exactly the set of all subsets X ⊂ V (A) such that 1 ≤ |X| ≤ k − 1 and there exists no (x * , X)extendable path in A by Proposition 3.10, so these entries are unique.Suppose for a contradiction that {I 1 , . . ., I N } and {I ′ 1 , . . ., I ′ N } are two distinct sets of islands suiting the definition, where I i and I ′ i have the same entry ε i for all 1 ≤ i ≤ N .Since islands are induced subhypergraphs of A, {V (I 1 ), . . ., V (I N )} and {V (I ′ 1 ), . . ., V (I ′ N )} are two distinct partitions of V (A), so there exists 1 (k − 2)-linear connected components in hypergraphs of rank k 15 • Using the first decomposition, there exists an (ε i , x)-extendable path − → P = (e 1 , . . ., e L ) in I i by definition of an island.For all 2 ≤ l ≤ N , no edge of − → P contains ε l : if l = i then this is the definition of an (ε i , x)-extendable path, and if l ̸ = i then this is obvious since V (I i ) is disjoint from ε l .
• Using the second decomposition, since x ∈ V (I ′ j ) and ε i is disjoint from V (I ′ j ), we can define r := inf{1 ≤ p ≤ L such that e p ̸ ⊂ V (I ′ j )}.We have e r ̸ ⊂ V (I ′ j ), however e r intersects V (I ′ j ) by minimality of r, therefore e r is necessarily a crossing edge for the second decomposition.This means that ε l ⊂ e r for some 2 ≤ l ≤ N , which contradicts what we have just established.Notation 3.13.Let A be an archipelago.Proposition 3.12 allows us to define without ambiguity: • I(A): the set of islands of A.
• ε(A): the set of entries of the islands of A.
• G(A): the digraph from the definition of an archipelago.

(k − 2)-linear connected components: structure and computation
In this section, we suppose again that H is k-uniform and we fix some x * ∈ V (H).

Main results
Our two main results about (k − 2)-linear connected components, one structural and the other algorithmic, can be assembled into the following main theorem which will be proven in this section.Definition 4.1.An x * -archipelago A in H is said to be maximal if there is no x * -archipelago in H that has A as a strict subhypergraph.

The key intermediate result
Theorem 4.2 will come as a straightforward consequence of the following theorem, which is illustrated in Figure 13: Theorem 4.4.There exists an x * -archipelago A in H and a partition E(H) = E(A) ∪ E cut ∪ E ext (where E cut and/or E ext may be empty) such that: (1) Every e ∈ E cut is of the form e = ε ∪ {x} for some entry ε of A of size k − 1 and some 5. "other": e is none of the above.
Those are well defined because the islands and entries of an archipelago are unique by Proposition 3.12.The five A-types are illustrated in Figure 14.Fundamentally: • The A-types "crossing", "new crossing" and "other" correspond to edges that get added to the archipelago.• The A-type "cut" corresponds to E cut .
• The A-type corresponds to E ext .
Let A be an archipelago, with islands I 1 , . . ., I N and entries ε 1 , . . ., ε N , and let e ∈ E(H) \ E(A).We now explain why A ∪ e is an archipelago if e is of A-type "crossing", "new crossing" or "other".In the case of the A-types "new crossing" and "other", the arborescent nature of the archipelago will be preserved, so those edges will be added first in our algorithm so that the archipelago remains arborescent for as long as possible.Even though the decomposition of A ∪ e is given by I(A ∪ e) and ε(A ∪ e) alone, we also describe G(A ∪ e) in the arborescent case.

I) e is of A-type "new crossing"
This case is easy: a new island is created, with e being the crossing edge that connects it to the rest (see Figure 15).Proposition 4.6.Suppose A is arborescent and e is of A-type "new crossing".Let 1 ≤ i 0 ≤ N be the index of the only island that intersects e, and let I N +1 be the empty island with entry ε N +1 := e \ V (I i0 ).Then A ∪ e is an arborescent archipelago with: Proof: This is clear: e is a crossing edge from I i0 to I N +1 , hence the new arc in G(A ∪ e) which is obviously an arborescence since G(A) is.

II) e is of A-type "other"
By definition, this means that: |e ∩ V (A)| ≥ 2, e is not a crossing edge, and e is not of the form ε ∪ {x} where ε is an entry of A of size k − 1 and x ∈ V (H) \ V (A).This case is more complicated.Consider Figure 14.If e only intersects one island (e = e ′ 5 or e = e ′′′ 5 for instance), then it should be easy to show that this island plus e is still an island.If e links several islands however, then the way to redefine islands is not as straightforward, since e is not a crossing edge.Suppose e = e 5 for instance, as in Figure 16.The fact that e acts as a bridge between several islands creates new paths: for example, we have an (x * , ε 6 )-extendable path in A ∪ e (represented schematically in Figure 16), therefore ε 6 would not be an entry of A ∪ e (recall Proposition 3.10).Actually, it can be shown that the subhypergraph I, formed by the union of I 2 , I 4 , I 5 , I 6 , I 8 , I 9 and the crossing edges between them as well as e, is an island with entry ε 2 .Therefore, A ∪ e is an archipelago with five islands: I 1 , I 3 , I 7 , I 10 , I. On this example, we see how adding en edge can merge islands together.We are now going to generalize this argument.Definition 4.7.Let G be an arborescence rooted at some v * ∈ V (G), and let Let U := 1≤i≤r {v i,1 , . . ., v i,li } be the set of all vertices on these paths.Merging U into v means: • deleting all vertices in U \ {v}; • deleting all arcs between vertices in U ; • replacing every arc (u, w) ∈ (U \ {v}) × (V (G) \ U ) by an arc (v, w).
Example. Figure 16 features a merging process on the right.The three considered paths are: Proposition 4.9.Suppose A is arborescent and e is of A-type "other".Define: , the set of indices of the islands that e intersects.
• i 0 the index such that the island that will replace I i0 (with the same entry ε i0 ).Then A ∪ e is an arborescent archipelago with: • G(A ∪ e) defined as the digraph obtained from G(A) by merging {I j , j ∈ J} into I i0 .
Proof: For visual help, refer to Figure 16: in this example we have J 0 = {4, 8, 9}, i 0 = 2, J = {2, 4, 5, 6, 8, 9}.The merging process that defines G(A ∪ e) clearly preserves the fact that the digraph is an arborescence.To complete the proof, we only need to show that I is an island with entry , we need to find an (ε i0 , X)-extendable path in I.As visible in Figure 14, e might or might not be included in V (A), so in general we have V (I) = j∈J V (I j ) ∪ e.We distinguish four possibilities: 1) Case 1: X ⊂ j∈J V (I j ) and X ̸ ∈ {ε j , j ∈ J \ {i 0 }}.Of all paths in G(A) from I i0 to an island intersecting X, let I i0 = I j1 → . . .→ I j M be a shortest one, so that X∩V (I j M ) ̸ = ∅ and X∩V (I jp ) = ∅ for all 1 ≤ p ≤ M −1.Note that, by definition of J, we have {j 1 , . . ., j M } ⊆ J, so the islands I j1 , . . ., I j M are all subhypergraphs of I and all crossing edges between them in A are edges of I.By Proposition 3.9, there exists an (ε i0 , X)-extendable path 2) Case 2: X intersects both j∈J V (I j ) and e \ j∈J V (I j ). Define by definition of the A-type "other", and Moreover X ′ ̸ ∈ {ε j , j ∈ J \ {i 0 }}, otherwise e would be of A-type "cut".We can thus apply Case 1 to X ′ , which gives us an (ε i0 , X ′ )-extendable path − → P in I. Lemma 3.4 applied to (k − 2)-linear connected components in hypergraphs of rank k 21 4) Case 4: X = ε j for some j ∈ J \ {i 0 }.
In particular |J| ≥ 2, so e intersects several islands.Note that, since I i0 is a strict ancestor of I j in G(A), we have j ̸ = 1.Remember our example from Figure 16: we considered X = ε 6 , and the (ε 2 , X)-extendable path was obtained by going from ε 2 to e ∩ V (I 4 ) = {y}, then using e to jump from I 4 to I 9 , then going from e ∩ V (I 9 ) = {x} to X. Let us now build this path in general.• Let j 0 ∈ J 0 such that the path Moreover the fact that j ̸ = 1 implies that j 0 ̸ = 1, so e ∩ V (I j0 ) ̸ = ε j0 , otherwise e would be of A-type "crossing".We can thus apply Proposition 3.9 and get an (ε j , e ∩ V (I j0 ))extendable path See Figure 17 (path on the right).
• Since the lowest common ancestor of {I i , i ∈ J 0 } is I i0 and not I j , there exists initialize the archipelago A with: 4: G(A) ← a digraph with only one vertex, labelled I 1 8: initialize N ← 1 (index of the last created island) 9: while there exists e ∈ E(H) \ E(A) of A-type "new crossing" or "other" do 4: update the archipelago A as follows: 5: G(A ∪ e) ← the digraph obtained from G(A) by adding a new vertex labelled I N +1 and an arc (I i0 , 5: update the archipelago A as follows: 6:

9:
G(A) ← the digraph obtained from G(A) by merging the vertices {I j , j ∈ J} into the vertex I i0 .

Algorithm 4 Add_Crossing
1: update the archipelago A as follows: 2: Let us explain the algorithm.At the start, the archipelago A consists of the empty island with entry {x * }.We then augment A one edge at a time, by adding firstly the edges of A-type "new crossing" or "other" and then the edges of A-type "crossing": • Throughout the first While loop, A is an arborescent archipelago, as guaranteed by Propositions 4.6 and 4.9.It is very important to understand that, every time A is augmented in that loop, the vertices and entries of A may change, so the A-types of the remaining edges may change as well: the A-types of the edges in E(H) \ E(A) must be redetermined at each iteration of that loop.• Throughout the second While loop, A is an archipelago, as guaranteed by Proposition 4.10.
This time, the decomposition in islands does not change during that loop (we are adding crossing edges between already existing islands) so the A-types of the remaining edges do not change.That last remark proves that, after the two While loops, all remaining edges are of A-type either "cut" or "exterior" (the A-types "new crossing" and "other" have not reappeared during the second While loop).In conclusion, Partition_Archipelago does output a partition of E(H) and is therefore correct.(k − 2)-linear connected components in hypergraphs of rank k

Time complexity
• E(H) \ E(A) can be implemented as a list.Indeed, it is sensible to store E(H) \ E(A) rather than E(A) since this is the set in which edges are searched for throughout.Each update consists in removing the current edge which is done in O(1) time.• I(A) can be implemented as an array of size n which contains, for each vertex x ∈ V (H), the index of the island containing x (or 0 if x ̸ ∈ V (A)).Each update requires going through the array once and is therefore done in O(n) time.• ε(A) can be implemented as an array of size n which contains, for each vertex x ∈ V (H), a 1 if x is in an entry of A or a 0 otherwise.Each update requires going through the array once and is therefore done in O(n) time.• G(A) is an arborescence for the entire time that it is kept updated.Since O( n k ) islands are created in total (a new island can only be created during Add_NewCrossing, and this requires k − 1 previously undiscovered vertices), G(A) can be implemented as an array of size O( n k ) containing the parent of each island, i.e. for all index i ̸ = 1 it contains the only index j such that (I j , I i ) ∈ E(G(A)).In Add_NewCrossing, updating G(A) is clearly done in O( 1 Notice that the algorithm can easily be tweaked so as to also return a (k − 2)-linear path from x * to x for each x ∈ LCC k−2 H (x * ).Indeed, it suffices, throughout the algorithm, to keep in memory an (x * , X)-extendable path in A for each X ⊂ V (A) such that 1 ≤ |X| ≤ k − 1 and X ̸ ∈ ε(A), which is possible by following the construction given in the proof of Proposition 4.9.If k = O(1) then the algorithm remains in polynomial time.[Galliot et al. (2022)], we study the Maker-Breaker problem on hypergraphs of rank 3, in which linear paths play a crucial role.If H contains a linear path from x to y, where Maker owns x and y while the other vertices of the path are free (xy-nunchaku), then Maker easily wins when playing first, by forcing all of Breaker's moves along the path until Breaker is trapped.It is shown in [Galliot et al. (2022)] that Maker wins on a hypergraph of rank 3, when playing first, if and only if she has a strategy ensuring that the updated hypergraph contains a nunchaku at the end of one of the first four rounds of play.Therefore: Theorem.[Galliot et al. (2022)] MakerBreaker on hypergraphs of rank 3 reduces polynomially to HypConnectivity 3,1 .
Corollary 4.3 thus concludes that MakerBreaker is solvable in polynomial time on hypergraphs of rank 3.This validates part of a conjecture by [Rahman and Watson (2020)].

Reducing HypConnectivity k,q to PAFP
A first attempt at tackling the algorithmic complexity of HypConnectivity k,q , for general 1 ≤ q ≤ k − 2, could be the following reduction to the "Paths Avoiding Forbidden Pairs" problem known as PAFP (sometimes PPFP or PFP): PAFP Input : a bicolored graph G (all edges are blue or red), and x, y ∈ V (G).Output : YES if and only if there exists a blue induced path from x to y in G.
Notation 5.1.Let φ k,q be the function that associates to a k-uniform hypergraph H the bicolored graph G defined by: • V (G) = E(H); • For all distinct e 1 , e 2 ∈ V (G), there is a blue (resp.red) edge between e 1 and e 2 in G if and only if 1 ≤ |e 1 ∩ e 2 | ≤ q (resp.if and only if |e 1 ∩ e 2 | > q).Therefore G is simply the line graph of H with added colors that carry information on the size of the intersections.See Figure 18 for an example.Proposition 5.2.For all k ≥ 3 and 1 ≤ q ≤ k − 2, HypConnectivity k,q polynomially reduces to PAFP.
Proof: This is clear: by definition, a sequence of edges (e 1 , . . ., e L ) in H is a q-linear path if and only if it is a blue induced path in φ k,q (H) ("blue" means two consecutive edges intersect on between 1 and q vertices, "induced" means two non-consecutive edges do not intersect).Therefore, there exists a q-linear path from x to y in H (x ̸ = y) if and only if there exist edges e x ∋ x and e y ∋ y in H such that there exists a blue induced path between e x and e y in φ k,q (H).

Florian Galliot, Sylvain Gravier, Isabelle Sivignon
However, PAFP is known to be NP-complete in general [Gabow et al. (1976)].In fact, unless P=NP, there is no linear approximation ratio for the minimum number of red edges induced by a blue path between two given vertices [Hajiaghayi et al. (2012)].For the problem on directed graphs (the blue edges are directed arcs), which is by far the most studied version in the literature, a few tractable cases are known but they are of little help to us: • It is shown in [Yinnone (1997)] that the problem is tractable if the red edges form a matching and a skew symmetry condition is satisfied.Even though the undirected version is also true with basically the same proof, it does not solve HypConnectivity k,q since a general bicolored graph in Im(φ k,q ) does not satisfy these conditions (nor does it easily reduce to one that does).• Other tractable cases are addressed in [Chen et al. (2001)] and [Kolman and Pangrac (2009)], however they are very specific to directed acyclic graphs.

Reducing some instances of PAFP to HypConnectivity k,q
Instead, now that we know HypConnectivity k,k−2 is solvable in polynomial time for all k ≥ 3, it is interesting to turn the tables and examine the implications on PAFP: Theorem 5.3.PAFP is tractable on bicolored graphs in k≥3 Im(φ k,k−2 ) for which a preimage can be computed in polynomial time.
Proof: Let G = φ k,k−2 (H) for some k-uniform hypergraph H, and let e, e ′ ∈ V (G) = E(H) be distinct.As we have seen before, the blue induced paths between e and e ′ in G are exactly the (k − 2)-linear paths (e = e 1 , . . ., e L = e ′ ) in H. Since HypConnectivity k,k−2 requires a start vertex and an end vertex in its input, define, for all x ∈ e and y ∈ e ′ , the hypergraph H x,y obtained from H by removing all edges adjacent to x and y other than e and e ′ , so that any (k − 2)-linear path from x to y in H x,y necessarily starts with e and ends with e ′ .There exists a blue induced path between e and e ′ in G if and only if there exist x ∈ e and y ∈ e ′ such that there (k − 2)-linear connected components in hypergraphs of rank k 29 is a (k − 2)-linear path from x to y in H x,y , which concludes since HypConnectivity k,k−2 is solvable in polynomial time.
Therefore, any sufficient condition for a bicolored graph G to be in Im(φ k,k−2 ) for some k ≥ 3, if it can be checked in polynomial time and comes with a way to reconstruct a preimage hypergraph in polynomial time, would add to the very short list of known tractable cases for PAFP.
For standard (i.e.non-colored) line graphs, the recognition problem has been studied extensively.Line graphs of graphs are characterized by a finite list of forbidden induced subgraphs ("FIS") [Beineke (1970)].Line graphs of hypergraphs, on the other hand, are notoriously difficult to recognize.There is no finite FIS characterization for line graphs of k-uniform hypergraphs if k ≥ 3 [Lovász (1977)], and this recognition problem is even known to be NP-complete for k = 3 [Poljak et al. (1981)].However, adding information about the size of the pairwise intersections of (hyper)edges, instead of simply telling which ones are non-empty, changes the problem.For example, if all these sizes are given and in {0, 1} (which is equivalent to asking the hypergraph to be linear) then, while remaining NP-complete for k = 3 [Poljak et al. (1981)] [Hlineny and Kratochvil (1997)], the problem becomes easier in some cases: • For k = 3, there is a finite FIS characterization for line graphs of 3-uniform linear hypergraphs if the minimum vertex-degree of the graph is at least 69, as well as a polynomial time algorithm to reconstruct the hypergraph in the positive case [Naik et al. (1982)].This bound has since been improved from 69 to 16 for the finite FIS characterization and 10 for the tractability of the recognition problem [Skums et al. (2009)].There is no analogous result for k ≥ 4, no matter what constant lower bound is put on the minimum vertex-degree [Metelsky and Tyshkevich (1997)].• For any k ≥ 3, there is a finite FIS characterization for line graphs of k-uniform linear hypergraphs if the minimum edge-degree of the graph is at least f (k), where f is a polynomial function, as well as a polynomial (whose power increases with k) time algorithm to reconstruct the hypergraph in the positive case [Naik et al. (1982)].This result has been generalized by replacing the linearity of the hypergraph by any constant upper bound on its multiplicity [Bhattacharya et al. (2021)].These results bring some hope of a finite FIS characterization for bicolored line graphs under some similar restriction over the minimum vertex-degree or edge-degree of the graph, and of a way to reconstruct a preimage in polynomial time which we crucially need.The case k = 3 is the most promising because the exact size of each intersection is also given (in {0, 1, 2}: 0 = no edge, 1 = blue edge, 2 = red edge), although it is NP-complete in general since instances with all blue edges correspond to the 3-uniform linear case for standard line graphs which we know is NP-complete.Figure 19 features some induced bicolored subgraphs that cannot appear in a bicolored graph from k≥3 Im(φ k,k−2 ).For instance, an induced red path on three vertices is impossible because, in a k-uniform hypergraph with k ≥ 3, if

Conclusion and perspectives
In this paper, we have introduced q-linear paths in hypergraphs of rank k, and in the case q = k − 2 we have described the structure of the (k − 2)-linear connected components as well as a polynomial time algorithm to compute them.The time complexity in O(m 2 k) might be optimal, 30 Florian Galliot, Sylvain Gravier, Isabelle Sivignon ... since it seems difficult to avoid an "accept or put aside" process on the edges where each edge is potentially examined O(m) times, and the mere computation of the intersection of two edges is in O(k) time.
What about other values of q?The linear case q = 1 is of particular interest, since linear paths appear in numerous other problems.However, if we want to try and generalize our techniques while maintaining a time complexity that is polynomial in k, it might be more reasonable to look at the case q = k − c where c ≥ 3 is a constant, with adapted definitions of islands and archipelagos (whose entries would be of size between k − c + 1 and k − 1).As an illustration of the difficulties that can be encountered during the algorithm, consider the case k = 4 and q = 1, where at some point an edge e = {x, y, z, t} is discovered with x, y already known vertices from different islands and z, t unknown: on one hand e could be part of a new merged island (since x, y ∈ e), but on the other hand e could be a crossing edge towards a new island with entry {z, t} (since z and t are not separated), and it seems hard to conciliate the two.
The bicolored line graph recognition problem is open.As mentioned in Section 5, the added information on the size of the pairwise intersections of edges might make this problem somewhat easier compared to standard line graphs, especially in the case k = 3.The characterization of line graphs of hypergraphs by a Krausz partition into cliques [Naik et al. (1982)] is easily adaptable to the bicolored version.Some characterizations by finite families of induced subgraphs from [Naik et al. (1982)] and their proofs might be adaptable as well, which would yield new classes of tractable instances for PAFP.Looking beyond applications to PAFP, a general weighted line graph recognition problem, where each edge of the graph would wear a number between 1 and k − 1 indicating the exact size of the corresponding intersection, seems interesting in itself.

Fig. 2 :
Fig. 2: Schematic representation of a q-linear path from X to Y .

Definition
so we can write − → P = (e 1 , . . ., e L ) where L ≥ 1.We already know − → P is (k − 2)-linear, moreover the assumption on B ′ ensures that − → P is from A to B ′ .Finally, since − → P is (A, B)-extendable and e L ∩ B ′ = e L ∩ B, we have |e 1 ∩ A| ≤ k − 2 and |e
linear path.Any intersection between two edges of − → R is of one of four forms: (1) e i ∩ e j or e ′ i ∩ e ′ j .Those are covered by the (k − 2)-linearity of − → P and − → Q respectively.(2) e i ∩ e ′ j .Those are empty because V ( − → P ) and V ( − → Q ) are disjoint by assumption.(3) e i ∩ e where 1 ≤ i ≤ L − 1 or e ∩ e ′ i where 2 ≤ i ≤ M .By symmetry, we only address e i ∩ e.Since − → P is from A to B, we know e i ∩ B = ∅.Moreover e ∩ V ( − → P ) ⊆ B by assumption, so e i ∩ e = ∅.(4) e L ∩ e or e ∩ e ′ 1 .By symmetry, we only address e L ∩e.Since − → P is (A, B)-extendable, we know |e L ∩B| ≤ k−2, moreover the assumption on e implies e L ∩ e = e L ∩ B hence |e L ∩ e| ≤ k − 2. We now verify that − → R is from A to D and is (A, D)-extendable.By symmetry, we only show the conditions on A, for which we distinguish two cases: • If L = 0, then the first edge of − → R is e.We have A ∩ e = A ∩ B by the assumption on e, where A ∩ B ̸ = ∅ (because L = 0) and |A ∩ B| ≤ k − 2 (by assumption), therefore 1

Fig. 10 :
Fig.10: An archipelago which is not arborescent (with the digraph G on the right).Crossing edges will always be represented in red.
and for p ≥ 2 we have ε ip ⊂ e p−1,p by definition of C A (I ip−1 , I ip ).Let us now prove the main assertion.

Fig. 14 :
Fig.14: An arborescent archipelago A (the inside of the islands is not detailed), and some edges in E(H) \ E(A) (in purple).The names of the edges follow the numbering from Definition 4.5: e1 is of A-type "exterior", e2 is of A-type "new crossing", etc.

Fig. 15 :
Fig. 15: The archipelago A ∪ e where A is as in Figure 14 and e = e2.On the right: the arborescences G(A) (top) and G(A ∪ e) (bottom).
defined as the digraph obtained from G(A) by adding a new vertex I N +1 and an arc (I i0 , I N +1 ).

Fig. 16 :
Fig. 16: The archipelago A ∪ e where A is as in Figure 14 and e = e5.On the right: the arborescences G(A) (top) and G(A ∪ e) (bottom).

Fig. 17 :
Fig. 17: Illustration of Case 4 from Proposition 4.9.The bold paths (in red and black) are − → P on the right and − → Q on the left.
Let n = |V (H)| and m = |E(H)|.We now show that Partition_Archipelago runs in O(m 2 k) time.Let us first consider the three procedures Add_NewCrossing, Add_Other and Add_Crossing, to figure out how much time each update of A takes.Since basic operations on data structures can be language-dependent, let us clarify: when we use a list, what matters is the ability to remove the current element in O(1) time; when we use an array, what matters is the ability to access and modify any element in O(1) time.
) time.In Add_Other, updating G(A) is done in O(n) time: indeed, computing |J 0 | ≤ k paths to the root takes O(k × n k ) = O(n) time, going through them a second time to compute i 0 and J takes O(k × n k ) = O(n) time again, and finally the merging process is performed in O( n k ) time since it only requires going through the array once.All in all, performing Add_NewCrossing, Add_Other or Add_Crossing once is done in O(n) time.Determining the A-type of a given edge e is easily done in O(k) time since it boils down to determining, for all x ∈ e, which island/entry (if any) contains x.We can now conclude on the time complexity of Partition_Archipelago: • The initializations before the first While loop are done in O(m + n) time.• During the first While loop, finding an edge of A-type "new crossing" or "other" and then adding it takes O(mk + n) time: indeed, at most m edges are gone through (with the A-type being determined for each one in O(k) time as we have just seen) before finally finding one of A-type "new crossing" or "other" which is added in O(n) time as shown above.Since at most m edges of A-type "new crossing" or "other" are added in total, the first While loop ends in O(m(mk + n)) = O(m 2 k + mn) time.• During the second While loop, no A-types need to be redetermined, and each update of A is done in O(1) time so that this loop ends in O(m) time.• Finally, computing E cut and E ext at the very end of the algorithm takes O(m) time.In conclusion, Partition_Archipelago runs in O(m 2 k + mn) time.Since the (k − 2)-linear connected component is a subset of the connected component, it is reasonable to assume that H is connected, which implies that m ≥ n−1 k−1 .Therefore, we can simplify O(m 2 k + mn) as O(m 2 k).This ends the proof of Theorem 4.4.