{'fraction_non_alphanumeric': 0.045977334720620905, 'fraction_numerical': 0.008745535839824526, 'mean_word_length': 3.5003796507213365, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On Minimum Connecting Transition Sets in Graphs

A forbidden transition graph is a graph defined together with a set of permitted transitions i.e. unordered pair of adjacent edges that one may use consecutively in a walk in the graph. In this paper, we look for the smallest set of transitions needed to be able to go from any vertex of the given graph to any other. We prove that this problem is NP-hard and study approximation algorithms. We develop theoretical tools that help to study this problem.


Introduction
Graphs are the model of choice to solve routing problems in all sorts of networks. Depending on the applications, we sometimes need to express stronger constraints than what the standard definitions allow for. Indeed, in many practical cases, including optical networks, road networks or public transit systems among others, the set of possible walks a user can take is much more complex than the set of walks in a graph (see [1] or [2] for examples). To model a situation where a driver coming from a given road may not turn left while both the road he comes from and the road on the left exists, we have to define the permitted walks by taking into account not only the edges of the graph that a walk may use but also the transitions. A transition is a pair of adjacent edges and we call forbidden-transition graph a graph defined together with a set of permitted transitions.
Graphs with forbidden transitions have appeared in the literature in [7] and have received a lot of interest since, as well as other more specific models such as properly colored paths [3,4]. Many problems are harder in graphs with forbidden transitions, such as determining the existence of an elementary path (a path that does not use twice the same vertex) between two vertices which is a well-known polynomial problem in graph without forbidden transitions and has been proved NP-complete otherwise ( [11]). Algorithms for this problem have been studied in the general case [5] and also on some subclasses of graphs [6].
Forbidden transitions can also be used to measure the robustness of graph properties. In [10], Sudakov studies the Hamiltonicity of a graph with the idea that even Hamiltonian graphs can be more or less strongly Hamiltonian (an Hamiltonian graph is a graph in which there exists an elementary cycle that uses all the vertices). The number of transitions one needs to forbid for a graph to lose its Hamiltonicity gives a measure of its robustness: if the smallest set of forbidden transitions that makes a graph lose its Hamiltonicity has size 4, this means that this graph can withstand the failure of three transitions, no matter where the failures happen.
The notion we are interested in in this paper is not Hamiltonicity but connectivity (the possibility to go from any vertex to any other), which is probably one of the most important properties we expect from any communication or transport network. However, our work differs from others in that we are not looking for the minimum number of transitions to forbid to disconnect the graph but for the minimum number of transitions to allow to keep the graph connected (the equivalent of minimum spanning trees for transitions). In other words, we are looking for the maximum number of transitions that can fail without disconnecting the graph, provided we get to choose which transitions still work. This does not provide a valid measure of the robustness of the network but measuring the robustness is only one part (the definition of the objective function) of the problem of robust network design. In most practical situations, robustness is achievable but comes at a cost and the optimization problem consists in creating a network as robust as possible for the minimum cost. In this respect, it makes sense to be able to choose where the failure are less likely to happen. Our problem highlights which transitions are the most important for the proper functioning of the network and this is where special attention must be paid in its design or maintenance. As long as those transitions work, connectivity is assured.
We also would like to point out that in practice, unusable transitions are not always the result of a malfunction. Consider a train network and imagine that there is a train going from a town A to a town B and one going from the town B to a town C. In the associated graph, there is an edge from A to B and one from B to C but if the second train leaves before the first one arrives, the transition is not usable and this kind of situation is clearly unavoidable in practice even if no special problem happens. Highlighting the most important transitions in the network thus helps design the schedule, even before the question of robustness arises.
Unlike Hamiltonicity or the existence of elementary path between two vertices, testing the connectivity is an easy task to perform even on graphs with forbidden transitions (note that a walk connecting two vertices does not have to be elementary). However, we prove that the problem of determining the smallest set of transitions that maintains the connectivity of the given graph is NP-hard even on co-planar graph which is the main contribution of the paper (see Section 3). Other notable contributions include a O(|V | 2 )-time 3 2 -approximation (Theorem 2.10) and a reformulation of the problem (Theorem 2.5) which was of great help in the proofs of the other results and could hopefully be useful again in subsequent works. Definitions and notations. Throughout this paper, we only consider finite simple graphs, i.e. undirected graphs with a finite number of vertices, no multiple edges and no loop. Let G be a graph. The vertex set of G is denoted by V (G) and its edge set by E(G). The size of a set S is denoted by |S|. We denote by d(v) the degree of a vertex v.We write xy to denote an edge {x, y}. We define a walk in G as a sequence W = (v 1 , . . . , v k ) of vertices such that for all i k − 1, v i v i+1 ∈ E(G) and we say that W uses the edge v i v i+1 . Here, we say that the walk W leads from We say that a graph G is co-connected if and only if G is connected. We also call co-connected components (or co-cc) of G the connected components of G. Transitions. A transition is a set of two adjacent edges. We write abc for the transition {ab, bc}. If a walk uses the edges ab and bc consecutively (with a = c), we say that it uses the transition abc. For example, the walk (u, v, w, v, x) uses the transitions uvw and wvx. Let T be a set of transitions of G and W = (v 1 . . . v k ) be a walk on G. We say that W is T -compatible if and only if it only uses transitions and v i+1 v i+2 are the same edge). Observe that a walk consisting of two vertices is always T -compatible. If for all vertices u and v of V (G), there exists a T -compatible walk between u and v, then we say that G is T -connected and that T is a connecting transition set of G. The problem we study here is the following:

Minimum Connecting Transition Set (MCTS)
Input: A connected graph G. Output: A minimum connecting transition set of G.

Polynomial algorithms and structural results
In this section, we only consider graphs with at least 2 vertices. Our problem is trivial otherwise. Proof. We first prove that |V (G)| − 2 transitions are enough to connect G. For every vertex v of G, we pick a neighbor of v that we call f (v). For every neighbor u = f (v) of v, we allow the transition uvf (v). We end up with the transi- Let us now prove by induction on the number n of vertices of G that at least n − 2 transitions are necessary to connect G. This is obvious for n = 2. Let us assume that it holds for n and let G be a tree with n + 1 vertices. Let T be a minimum connecting transition set of G. Let uv be an internal edge of T if any (i.e. an edge such that u and v are not leaves). Let a and b be two vertices from different connected components of G − {u, v}. Every walk leading from a to b in G therefore uses the edge uv and thus, two transitions containing uv. This proves that every internal edge of T belongs to at least two transitions of T . If every edge of G belongs to at least two transitions of T , T has size at least |E(G)| = |V (G)|− 1 which concludes the proof. Otherwise, let uv be an edge that belongs to at most one transition of T . This means that one of its vertices, say v, is a leaf. It is straightforward to check that uv must belong to one transition of T , otherwise G would not be T -connected. Let t be the transition in T containing uv. The graph G−v is T \{t}-connected and is a tree. By the induction hypothesis, this means that |T \ {t}| n − 3 and |T | n − 2. This concludes the proof of the lemma.
Let us also note that a linear-time algorithm to compute an optimal solution can be easily deduced from this proof. Since every connected graph contains a spanning tree, we have the following corollary. Note however that in the general case, this bound is far from tight. The most extreme case is the complete graph where every vertex can be connected to every other with a walk of one edge, that therefore uses no transition. Thus, the empty set is a connecting transition set of the complete graph. The following result aims at tightening the upper bound on the size of the minimum connecting transition set of a graph.
Proof. By definition, if u and v belong to different co-connected components of G, there is an edge uv ∈ E(G) and there is therefore a walk between u and v is compatible with any transition set. We only have to find a transition set that connects all the vertices that belong to the same co-connected component.
Let C be a co-connected component of G with at least 2 vertices. If G[C] is connected, Corollary 2.2 provides a transition set of size |C| − 2 that connects C. Otherwise, since G is connected, we know that V (G) = C and there exists a vertex v / ∈ C. Hence, v is adjacent to every vertex of C and C ∪ {v} induces a connected subgraph of G. Corollary 2.2 provides a set of size |C ∪ {v}| − 2 = |C| − 1 that connects C. By iterating this on every C, we build a connecting transition set T of size τ (G).
Note that this bound can be computed in O(|V (G)| 2 ). However, this bound is still not tight. Let us consider the graph P 7 whose vertex set is {v 1 , . . . , v 7 } and where every vertex v i , 2 i 6 is connected to every vertex of the graph but v i−1 and v i+1 . Since the graph is connected and co-connected, τ (P 7 ) = 5 but the set is a connecting transition set of size only 4. To better understand this solution, let us consider the spanning tree of P 7 depicted in Figure 1: Note that the set T described above does not connect this spanning tree. Indeed, one can not go from v 1 , v 2 or v 3 to v 5 , v 6 or v 7 using a T -compatible walk in the tree. However, these vertices are already connected to each other by edges that do not belong to the spanning tree. The optimal solution here does not consist in connecting a spanning tree of G but in connecting a spanning tree of In fact, we will prove that to each optimal connecting transition set T of a graph G corresponds an unique decomposition of G into subgraphs G 1 , G 2 , . . . , G k such that T is the disjoint union of T 1 , T 2 , . . . , T k , where each T i is the connecting transition set of some spanning tree of G i . Observe that the size of T is uniquely determined by its correspondent decomposition, i.e., |T | = |V (G 1 )| − 2 + · · · + |V (G k )| − 2. Hence, finding an optimal connecting transition set is equivalent to finding its correspondent decomposition. In the following, we reformulate MCTS into this problem of graph decomposition which is easier to work with.

Definition 2.4. Connecting Hypergraph
Let G be a graph. A connecting hypergraph of G is a set H of subsets of V (G), such that • For all E ∈ H, we have G[E] is connected and |E| 2.
• For all uv / ∈ E(G), there exists E ∈ H such that u, v ∈ E (we say that the hyperedge E connects u and v).
We define the problem of optimal connecting hypergraph as follows: Optimal Connecting HyperGraph (OCHG) In the next theorem, we prove that OCHG is a reformulation of MCTS. Theorem 2.5. Let G be a graph.
• The size of a minimum connecting transition set of G is the same as the cost of an optimal connecting hypergraph. • A solution of one of these problems on G can be deduced in polynomial time from a solution of the other.
Proof. Let G be a graph. This theorem is implied by the two following claims.
There exists a connecting transition set T of size at most cost(H).
By the definition of a connecting hypergraph, each E i induces a connected graph and by Corollary 2.2, there exists a subset of transitions Let ∼ be the relation on T such that t ∼ t ′ if t and t ′ share at least one common edge. We denote by R the transitive closure of ∼. Let T 1 , . . . , T k be the equivalence classes of R. For all i k, we denote by E i the set of vertices induced by T i . We claim that the hypergraph {E 1 , . . . , E k } is a connecting hypergraph and that, for By construction, for all i, we have |E i | 3 since T i contains at least one transition and thus, three vertices. Furthermore, since G is T -connected, there exists a Tcompatible walk W between every pair uv / ∈ E(G). All the transitions that W uses must be in T and are pairwise equivalent for R. Thus, for all uv / ∈ E(G), there exists i such that both u and v belong to E i .
It remains to prove that for all i, |E i | − 2 |T i |. We prove by induction on n that every set T of n pairwise equivalent transitions induces a vertex set of size at most n + 2. This property trivially holds for n = 1. Now, suppose that it is true for sets of size n and let T be a set of pairwise equivalent transitions of size n + 1. Let P = t 1 , . . . , t r be a maximal sequence of distinct transitions of T such that, for all i r − 1, t i ∼ t i+1 . One can check that all the transitions of T \ {t 1 } are still pairwise equivalent (otherwise, P would not be maximal). By the induction hypothesis, T \{t 1 } induces at most n+2 vertices. Since t 1 shares an edge (and thus at least 2 vertices) with t 2 , it induces at most one vertex not induced by T \ {t 1 }. Thus T induces at most n + 3 vertices.
Let us note that the bound provided in Theorem 2.3 suggests a O(|V | 2 )-time heuristic for OCHG which consists in building the set H as follows: We use the reformulation given by Theorem 2.5 to generalize Lemma 2.1: Lemma 2.8. If G has a cut vertex, then a minimum connecting transition set of G has size |V (G)| − 2.
Proof. By Theorem 2.5, it is sufficient to prove that H = {V (G)} is an optimal connecting hypergraph of G. Let p be a cut vertex of G and C 1 , . . . , C r be the connected components of G − p. Let H = {E 1 , . . . , E k } be an optimal connecting hypergraph of G.
Let a ∈ C 1 . Suppose that there are two vertices b, c = p that do not belong to C 1 . Hence, {a, b} / ∈ E(G) and there exists i such that a, b ∈ E i . Since E i must induce a connected subgraph of G, we know that p ∈ E i . Similarly, we know that there exists E j that contains a, c and p. Thus, we have is also an optimal connecting hypergraph where the same hyperedge contains both b and c. By iterating this process, we prove that there is an optimal connecting hypergraph with one hyperedge E that contains a, p and C 2 , . . . , C r . This result trivially holds if there is only one vertex b = p that does not belong in C 1 . By iterating the previous process on this hypergraph with a vertex in E ∩ C 2 instead of a, we end up with the optimal connecting hypergraph {V (G)} whose cost is n − 2.
The following lemma will help us to prove that MCTS admits a 3 2 -approximation and its NP-hardness. It proves that if the graph is co-connected, we can restrict ourselves to some specific connecting hypergraph. Lemma 2.9. Let G be a connected graph. If G is co-connected or G has a dominating vertex x and G − x is connected and co-connected, then there exists an optimal connecting hypergraph H Proof. Let H be an optimal connecting hypergraph on G and let E be an hyperedge of H that is not co-connected. If G[E] is complete, then E does not connect any pair of non-adjacent vertices and H \ E is still a connecting hypergraph whose cost is less or equal than the cost of H. Else, let a and b be two non-adjacent vertices of E. They therefore belong to the same co-connected component C of G[E].
If C is a co-connected component of G, then, since C E V (G), we know that G is not co-connected and by hypothesis, it therefore has a dominating vertex Thus, C is not a co-connected component of G, which means that there exists u ∈ C and v ∈ V (G) \ C such that u and v are not adjacent. To facilitate the understanding, the construction we use in this case is illustrated in Figure 2. Since C is a co-cc of G[E], we also know that v / ∈ E. Hence, there exists E ′ = E in H that contains u and v. Let c 1 , . . . , c l be the connected components of G[C] that are not connected to any vertex of E ′ (if any). By definition of connecting hypergraph, we know that for all i l, there exists E i ∈ H that connects a vertex of E ′ and a vertex of c i . We create H ′ from H by replacing E by E \ C and by replacing E 1 , . . . , E l and E ′ by We claim that cost(H ′ ) cost(H) − 1. Indeed, replacing E by E \ C decreases the cost by |C| while replacing E ′ by E ′ ∪ C increases the cost of at most |C| − 1 because E ′ ∩ C contains at least the vertex u. Moreover, we can prove by induction on i l that the cost of size at least two (it contains at least one vertex in E ′ and one in c i ⊂ C, by definition of E i ). It follows that cost(E ) cost({E ′ ∪ C, E 1 , . . . , E l }). Therefore, cost(H ′ ) cost(H) − 1. Since H is an optimal connecting hypergraph, we know Figure 2. Here, G[C] has five connected components, two of which (c 1 and c 2 ) are not connected to E ′ . To ensure that E is connected, we need the hyperedges E 1 and E 2 .
that H ′ is not a connecting hypergraph. But observe that H ′ satisfies the following properties: • Every pair of non-adjacent vertices is still connected by an hyperedge of H ′ . Indeed, if two non-adjacent vertices are connected by E in H they are connected by E \ C or E in H ′ depending on whether they belonged to C or not; if they are connected by an E i in H, they are connected by E in H ′ and otherwise, the hyperedge that connects them in H belongs to H ′ too. Thus, either |E\C| < 2 or G[E\C] is not connected. If E\C is a singleton, it does not connect any pair of non-adjacent vertices. Thus, H ′ \ {E \ C} is a connecting hypergraph whose cost is strictly smaller than H, which is absurd. Hence, G[E \ C] is not connected, which means it is co-connected. We can therefore apply to E \ C the same method we used on C.
Just like before, we know that there exists two non-adjacent vertices u ′ ∈ E \ C and v ′ / ∈ E. Let F ∈ H ′ be the hyperedge that connects u ′ and v ′ , let d 1 , . . . , d l ′ be the connected components of E \ C that are not connected to F and let F 1 , · · · , F l ′ be hyperedges of H ′ such that F i connects a vertex of F to a vertex of d i . We create H ′′ from H ′ by removing E \ C and by replacing F 1 , . . . , F l ′ and F by With the same arguments used for H ′ , we can prove that F is connected and that H ′′ connects every pair of non-adjacent vertices, which means that H ′′ is a connecting hypergraph. Moreover, with these arguments, we can also prove that cost(F ) cost({F ∪ (E \ C), F 1 , . . . , F l ′ }). Furthermore, removing E \ C from H ′ decreases the cost by |E \ C| − 2 and replacing F by F ∪ (E \ C) increases it by at most |E \ C| − 1 since F ∩ (E \ C) contains at least the vertex u ′ . Hence, cost(H ′′ ) cost(H ′ )+1 cost(H) and then H ′′ is an optimal covering hypergraph.
Observe that H ′′ has strictly fewer hyperedges E such that G[E] is not co-connected than H. We prove the lemma by iterating this process.
We now prove that MCTS has a polynomial 3 2 -approximation: Theorem 2.10. For every connected graph G and optimal connecting transition set T of G, the size of T is at least 2/3τ (G), where τ (G) is the function defined in Theorem 2.3.
Proof. By Theorem 2.5, it is enough to prove that an optimal connecting hypergraph has cost at least 2/3τ (G). We start by proving the following claim which proves the theorem on the graphs that are connected and co-connected.
Also note that for all i < k, there exists an hyperedge E j with j > i that shares a vertex with an hyperedge of E 1 , . . . , E i . Otherwise, j i E j and j>i E j cover the vertices of G and since G is co-connected, this means that there exists u ∈ j i E j and v ∈ j>i E j such that (u, v) / ∈ E(G) but no set of H connects them, which is impossible. We can assume without loss of generality that this hyperedge that shares at least one vertex with j i E j is E i+1 .
It is now immediate to prove by induction on i k that By combining the two inequalities, we find that cost(H) 2(n−1)
Let H = {E 1 , . . . , E k } be an optimal connecting hypergraph of G, let C 1 , . . . , C l be the co-connected components of G and for all j l, let v j be a vertex that does not belong to C j .
For all i k and j l such that |E i ∩ C j | 2, we define and we define F as the union of the {E i,j }. Note that if G is co-connected, there is only one co-connected component C 1 = V (G) and while there is is connected by definition, so we do not need v 1 in the above construction.
Since v j dominates C j , it is easy to check that every hyperedge of F is connected and has size at least 2. Plus, any two non-adjacent vertices of G belong to the same C j and are connected by an E i ∈ H. Therefore, they belong to E i ∩ C j which has size at least two and thus belongs to F . Hence, F is a connecting hypergraph.
Let E i ∈ H and let S i be the set of values of j such that E i,j exists. If there is only one such value j, then cost( still holds. Since F = i k j∈Si {E i,j }, it follows that cost(F ) cost(H) which proves that F is optimal.
We know that two non-adjacent vertices necessarily belong to the same coconnected component of G and since an hyperedge E i,j only contains one vertex that does not belong to C j it only connects non-adjacent vertices of one connected component. For all j, let F j be the set of hyperedges of F that connect non-adjacent vertices of C j . Since E i,j ⊆ C j ∪{v j }, F j is a connecting hypergraph of G[C j ∪{v j }].
Let C j be a co-connected component of G and observe that: by Lemma 2.9 an optimal connecting hypergraph H j such that for every hyperedge E of H j , G[E] is co-connected and thus, v j / ∈ E. This proves that H j is a connecting hypergraph of G[C j ]. As G[C j ] is connected and co-connected, we know by the above claim that cost(H j ) Thus, we have We also can prove that this bound is tight. Indeed consider the graph G defined as the complement of a star of n branches of 3 edges. The graph G has 3n + 1 vertices that we call c, v i,1 , v i,2 and v i,3 with 1 i n (in G, c is the center of the star and v i,1 , v i,2 and v i,3 are the three vertices of the branch i). Every vertex of G is connected to every other except c and v i,1 , v i,1 and v i,2 and v i,2 and v i,3 with 1 i n. Since G is both connected and co-connected, our algorithm returns the connecting hypergraph H 1 = {V (G)} whose cost is 3n − 1 but the hypergraph 3 } is a connecting hypergrpah of cost 2n. The example of co-P 7 that we used to prove that the algorithm was not exact (see Figure 1) is the case i = 2.

NP-hardness
In this section, we give a proof of NP-hardness of OCHG which involves very dense graphs. Hence, we prefer to work with the complementary graphs and therefore prove the NP-hardness of the following problem that we call co-OCHG: Definition 3.1. co-Connecting Hypergraph Let G be a graph. A co-connecting hypergraph is a collection of hyperedges E 1 , . . . , E r ⊆ V (G) such that • For all uv ∈ E(G), there exists i such that u, v ∈ E i (we say that the hyperedge E i covers the edge uv).

Output:
A co-Connecting Hypergraph that minimizes cost(H) = E∈H (|E| − 2). We prove the NP-hardness of this problem by reducing 3-SAT to it. We restrict ourselves to the version of 3-SAT where each variable has at least one positive and one negative occurrence and each clause has exactly 3 literals that are associated to different variables. It is folklore that this restrictions of 3-SAT is NP-complete.
Let F = {c 1 , . . . , c m } be an instance of 3-SAT with n variables. We will construct from F a graph G F such that F is satisfiable if and only if G F admits a co-covering hypergraph of cost 25m.
We start by describing how to construct G F . To simplify the construction and the proofs, we give labels to some vertices and some edges. The set of labels we use are For each clause c i and each variable x occurring in c i , we create the gadget g(x, c i ). If x occurs positively in c i then g(x, c i ) is the graph depicted in Figure 3a, otherwise, if x occurs negatively in c i then g(x, c i ) is the graph depicted in Figure 3b. Each gadget g(x, c i ) contains a vertex labelled c i and two edges labelled T i,x and F i,x .
The gadget g(x, ci) if x appears in ci.

Figure 3
We then create a new vertex for each clause c i that we connect to the three vertices labelled c i and to an additional vertex of degree 1. We thus have for each clause a graph like the one depicted in Figure 4 that we call g(c i ). Finally, for each variable x, we do the following. Let c i1 , . . . , c i ℓ be the clause where x appears. Observe that ℓ 2 since every variable has a positive and a negative occurrence. For each j ℓ, we merge the edge labelled T ij ,x in g(x, c ij ) with the edge labelled F i k ,x in g(x, c i k ) (where k = j + 1 mod ℓ) such that the resulting edge has an extremity of degree one. We consider that this edge has both T ij ,x and F i k ,x as labels. For example, if a variable x appears positively in the clauses c 1 and c 4 and negatively in the clause c 3 , the Figure 5 depicts what the graph looks like around the gadget associated to the variable x. By connecting all the gadgets g(x, c i ) as described above, we obtain the gadget graph G F . We may assume that G F is connected. Otherwise, this means that F is the conjunction of two formulas that share no common variables and F is satisfiable if and only if those two formulas are. Observe that G F is trivially co-connected. Moreover, the size of G F is polynomial in n and m. Now, we prove that F is satisfiable if and only if G F admits a co-covering hypergraph of cost 25m. We start with the following lemma which proves the existence of an optimal co-covering hypergraph where every hyperedge is contained in the vertex set of some clause-gadget.
Lemma 3.2. There exists an optimal co-connecting hypergraph H of G F such that H = H 1 ∪ H 2 ∪ · · · ∪ H m and for all i m, we have V (H i ) ⊆ V (g(c i )).
Proof. In the graph G F , the intersection between two clause-gadgets only contains labelled edges. Thus, if an hyperedge E is not included in any clause-gadget, it means that E covers at least two non-labelled edges from two distinct clausegadgets. The Figure 6 depicts what we call the junction between two clause-gadgets and names the vertices of interest in this proof. Here, the clause-gadget g(c 1 ) contains the vertices v 0 , v 1 , v 2 and v 3 and g(c 2 ) contains v 2 , v 3 , v 4 and v 5 . Figure 6. The junction between the clause-gadgets of c 1 and c 2 .
Since G F is connected and co-connected, we know by Lemma 2.9 that it admits an optimal co-connecting hypergraph H = {E 1 , . . . , E k } such that for all i, G F [E i ] is connected. The only way for an hyperedge E i , such that G F [E i ] is connected, to cover non-labelled edges in several clause-gadgets is to contain the vertices labelled v 1 , v 2 and v 4 at the junction between two clause-gadgets. In this case, we say that E i covers the junction between these two gadgets. Let us assume that an hyperedge E i covers the junction between two clause-gadgets g(c 1 ) and g(c 2 ). We make no assumption on whether x appears positively or negatively in c 1 and c 2 .
By definition, E i contains the vertices v 1 , v 2 and v 4 . If E i does not contain v 3 , there exists an hyperedge E j that covers the edge {v 2 , v 3 } has to contain at least one of v 1 and v 4 (in order to induce a connected and co-connected subgraph of G F ) and therefore shares at least two common vertices with E i . This means that we can merge E i and E j without increasing the cost of the solution and thus, we can assume that E i contains v 3 . However, is still not co-connected and E i has to contain other vertices. By connectivity, E i must contain at least one of v 0 and v 5 .
• If E i contains only one of {v 0 , v 5 }, say v 0 , we remove v 4 from E i and add v 2 to the hyperedge E j that covers {v 4 , v 5 }. The hyperedges E i and E j still induce co-connected subgraphs of G F , cover the same edges as before and the cost of H does not increase.
except v 4 that can be connected to v 2 through v 0 ) . Let us also note that both is not connected, we know it has two connected components C 1 and C 2 (since removing a vertex set of degree k cannot create more than k connected components). We replace E i by F 1 = {v 2 , v 3 } ∪ C 1 and F 2 = {v 2 , v 3 } ∪ C 2 . The hyperedges F 1 and F 2 have the same cost as E i and cover the same edges. Furthermore, both G F [F 1 ] and G F [F 2 ] are connected since every vertex is adjacent to v 3 except v 2 that can be connected to v 3 through v 0 and v 5 in C 1 and C 2 . We also notice that G F [F 1 ] and G F [F 2 ] are both connected.
In any case, we can build an optimal co-connecting hypergraph where G F [E i ] is still connected for all i and the hyperedges cover strictly fewer junctions. We can iterate this process until H satisfies the lemma.
Let H = H 1 ∪ · · · ∪ H m be an optimal co-connecting hypergraph of G such that for all i m, we have V (H i ) ⊆ V (g(c i )).
Observe that the labelled edges are the only edges of G F to belong to several clause-gadgets. Thus, for each i m, the non-labelled edges of g(c i ) must be covered by H i . Consequently, the cost of H i is fully determined by which labelled edges of g(c i ) it covers. We want to prove that G F is satisfiable if and only if the labelled edges can be covered in a way such that each H j has cost 25.
Let c i be a clause of F and let us study the cost of H i in function of which labelled edges it covers. Let x be a variable of c i . We recall that the gadget g(x, c i ) differs depending on whether x appears positively or negatively in c i but in both cases, the gadget has an edge labelled F i,x and one labelled T i,x . The subgraph of g(x, c i ) induced by H i can take four values (up to isomorphims) depending on which of the following situations occurs: • H i covers neither T i,x nor F i,x . We call this configuration N (for "none").
• H i covers both T i,x and F i,x . We call this configuration B (for "both").
• H i covers T i,x and x appears positively in c i or H i covers F i,x and x appears negatively in c i . We call this configuration S (for "satisfied").
• H i covers T i,x and x appears negatively in c i or H i covers F i,x and x appears positively in c i . We call this configuration U (for "unsatisfied").
Hence, the edges that H i covers are determined (up to isomorphism) by the configurations encountered for each of the three variables that appear in c i . Since the clause-gadget is symmetric, the order does not matter: the configuration SU N is exactly the same as the configuration N SU . Thus, we find that H i can cover 20 different sets of edges up to isomorphisms. We determined the optimal values of cost(H i ) for each case via a computer-assisted exhaustive search. The results are the following: The first observation we make is that the optimal value of cost(H i ) is necessarily at least 25 and an optimal co-connecting hypergraph on G F therefore always costs at least 25m. We now investigate the case where the optimal cost is exactly 25m. To this end, we suppose that H has a cost of 25m.
We note that every configuration that contains a B costs at least 26. Thus, we know that for each H i and each x appearing in c i , H i covers at most one of the two labelled edges of g(x, c i ).
Let us now look at the gadgets associated to a variable x that appears in ℓ clauses (cf. Figure 5). For all j such that x appears in c j , the hypergraph H j either covers the two labelled edges of g(x, c j ) (B), one (S or U ) or none (N ). Since every edge must be covered at least once, this means that a solution where no configuration involves B also does not feature a configuration involving N . Hence, for every H i , the only configurations that occur are S and U .
Let us suppose that H i covers the edge T i,x . Since the configuration B is impossible, we know that H i does not cover the edge F i,x . Let T j,x the other label of the edge F i,x . Since this edge has to be covered, this means that H j must cover the edge T j,x and because the configuration B is impossible, it cannot cover the edge F j,x . We can prove by induction that for each variable x either, for all gadget g(x, c i ), H i covers the edge T i,x or for all gadget g(x, c i ), H i covers the edge F i,x . In the first case, we say that the variable x is set to True, and in the second case, to False. If the variable x is set to True, this means all its positive occurrence will lead to a S configuration in the clause where it appears and conversely.
Finally, we notice that the cost of an optimal co-connecting hypergraph on the configurations SSS, SSU and SU U is 25 while it is 26 on the configuration U U U . Therefore, there exists a solution of cost 25m if and only of there exists a way to affect all the variables to either True or False such that every clause is satisfied by at least one variable, which comes down to saying that the formula F is satisfiable.
This proves that co-OCGH and therefore OCGH and MCTS are all NPhard. Moreover, Lichtenstein proved in [8] that 3-SAT remains NP-complete when restricted to formulas whose incidence graph is planar. The incidence graph of a formula F is the bipartite graph representing the relation of belonging between the variables and the clauses of F . Clearly, if the incidence graph of F is planar then G F is planar too. We conclude that MCTS is NP-hard even on co-planar graphs.

Conclusion
Our work proves that finding a minimum connecting transition set is NP-hard even on co-planar graphs. This notably implies the NP-hardness of other problems that generalizes this one such as finding a minimum connecting transition set in a graph that already has forbidden transitions.
A lot of our results suggest that the density of the graph has an impact on the complexity of MCTS. Consequently, it would be interesting to study the complexity of this problem on sparse graphs such as planar graphs or graphs with bounded treewith.
Further works could lead us to generalize this study to directed graphs, that are more suitable for many practical applications. Another interesting continuation of this work would also be the study of low-stretch connecting transition sets, a problem that is already well-studied for minimal spanning trees [9]. Intuitively, it consists in looking for a subset of transitions T such that the shortest T -compatible path between two vertices is not much longer than the shortest path in the graph with no forbidden transitions, which is also an important criteria of robustness.