# 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.

## Authors

• 8 publications
• 8 publications
05/04/2020

### Reducing graph transversals via edge contractions

For a graph parameter π, the Contraction(π) problem consists in, given a...
07/23/2021

### The complexity of the Bondage problem in planar graphs

A set S⊆ V(G) of a graph G is a dominating set if each vertex has a neig...
11/11/2018

### Approximation Algorithms for Graph Burning

Numerous approaches study the vulnerability of networks against social c...
07/15/2019

### A Neural Turing Machine for Conditional Transition Graph Modeling

Graphs are an essential part of many machine learning problems such as a...
06/27/2021

### AniVis: Generating Animated Transitions Between Statistical Charts with a Tree Model

Animated transitions help viewers understand changes between related vis...
11/07/2018

### Approximability of the Eight-vertex Model

We initiate a study of the classification of approximation complexity of...
10/30/2019

### Group Centrality Maximization for Large-scale Graphs

The study of vertex centrality measures is a key aspect of network analy...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1. 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 [Ahmed] or [SCTM] 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 [Kotzig] and have received a lot of interest since, as well as other more specific models such as properly colored paths [Daykin, Gutin]. 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 ([szeider]). Algorithms for this problem have been studied in the general case [Kante-algopath] and also on some subclasses of graphs [Kante-grid].

Forbidden transitions can also be used to measure the robustness of graph properties. In [Sudakov], 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 to a town and one going from the town to a town . In the associated graph, there is an edge from to and one from to 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 -time -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 be a graph. The vertex set of is denoted by and its edge set by . The size of a set is denoted by . We denote by the degree of a vertex .We write to denote an edge . We define a walk in as a sequence of vertices such that for all , and we say that uses the edge . Here, we say that the walk leads from the vertex to .

For , we denote by the subgraph of induced by . We also denote by the subgraph of induced by . For , we write instead of . We denote by the complement of i.e. the graph such that and . We say that a graph is co-connected if and only if is connected. We also call co-connected components (or co-cc) of the connected components of .

### Transitions

A transition is a set of two adjacent edges. We write for the transition . If a walk uses the edges and consecutively (with ), we say that it uses the transition . For example, the walk uses the transitions and . Let be a set of transitions of and be a walk on . We say that is -compatible if and only if it only uses transitions of i.e. for all , we have or (i.e. and are the same edge). Observe that a walk consisting of two vertices is always -compatible. If for all vertices and of , there exists a -compatible walk between and , then we say that is -connected and that is a connecting transition set of . The problem we study here is the following:

Minimum Connecting Transition Set (MCTS)

[5pt] Input: A connected graph .

Output: A minimum connecting transition set of .

## 2. Polynomial algorithms and structural results

In this section, we only consider graphs with at least 2 vertices. Our problem is trivial otherwise.

###### Lemma 2.1.

If is a tree then a minimum connecting transition set of has size .

###### Proof.

We first prove that transitions are enough to connect . For every vertex of , we pick a neighbor of that we call . For every neighbor of , we allow the transition . We end up with the transition set . Let and be vertices of . Since is connected, there exists a walk . The walk is -compatible and still leads from to . This proves that is -connected. The size of is . Since is a tree, and thus, .

Let us now prove by induction on the number of vertices of that at least transitions are necessary to connect . This is obvious for . Let us assume that it holds for and let be a tree with vertices. Let be a minimum connecting transition set of . Let be an internal edge of if any (i.e. an edge such that and are not leaves). Let and be two vertices from different connected components of . Every walk leading from to in therefore uses the edge and thus, two transitions containing . This proves that every internal edge of belongs to at least two transitions of . If every edge of belongs to at least two transitions of , has size at least which concludes the proof. Otherwise, let be an edge that belongs to at most one transition of . This means that one of its vertices, say , is a leaf. It is straightforward to check that must belong to one transition of , otherwise would not be -connected. Let be the transition in containing . The graph is -connected and is a tree. By the induction hypothesis, this means that and . 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.

###### Corollary 2.2.

Every connected graph has a connecting transition set of size .

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.

###### Theorem 2.3.

Every connected graph has a connecting transition set of size where

 τ(G)=∑C co-cc of G|C|⩾2{|C|−2 if the subgraph of G induced by % C is connected|C|−1 otherwise
###### Proof.

By definition, if and belong to different co-connected components of , there is an edge and there is therefore a walk between and 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 be a co-connected component of with at least 2 vertices. If is connected, Corollary 2.2 provides a transition set of size that connects . Otherwise, since is connected, we know that and there exists a vertex . Hence, is adjacent to every vertex of and induces a connected subgraph of . Corollary 2.2 provides a set of size that connects . By iterating this on every , we build a connecting transition set of size . ∎∎

Note that this bound can be computed in . However, this bound is still not tight. Let us consider the graph whose vertex set is and where every vertex is connected to every vertex of the graph but and . Since the graph is connected and co-connected, but the set is a connecting transition set of size only 4. To better understand this solution, let us consider the spanning tree of depicted in Figure 1:

Note that the set described above does not connect this spanning tree. Indeed, one can not go from , or to , or using a -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 but in connecting a spanning tree of and one of and the cost is instead of .

In fact, we will prove that to each optimal connecting transition set of a graph corresponds an unique decomposition of into subgraphs such that is the disjoint union of , where each is the connecting transition set of some spanning tree of . Observe that the size of is uniquely determined by its correspondent decomposition, i.e., . 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 be a graph. A connecting hypergraph of is a set of subsets of , such that

• For all , we have is connected and .

• For all , there exists such that (we say that the hyperedge connects and ).

We define the problem of optimal connecting hypergraph as follows:

Optimal Connecting HyperGraph (OCHG)

[5pt] Input: A connected graph .

Output: A connecting hypergraph that minimizes .

In the next theorem, we prove that OCHG is a reformulation of MCTS.

###### Theorem 2.5.

Let be a graph.

• The size of a minimum connecting transition set of is the same as the cost of an optimal connecting hypergraph.

• A solution of one of these problems on can be deduced in polynomial time from a solution of the other.

###### Proof.

Let be a graph. This theorem is implied by the two following claims.

###### Claim 2.6.

Let be a connecting hypergraph of . There exists a connecting transition set of size at most .

By the definition of a connecting hypergraph, each induces a connected graph and by Corollary 2.2, there exists a subset of transitions of size such that is -connected. Let . By definition, for all , there exists such that . Since is -connected and , there is a -compatible walk between and in which means that is -connected. Since , .

###### Claim 2.7.

Let be a connecting transition set of . There exists a connecting hypergraph of cost at most .

Let be the relation on such that if and share at least one common edge. We denote by the transitive closure of . Let be the equivalence classes of . For all , we denote by the set of vertices induced by . We claim that the hypergraph is a connecting hypergraph and that, for all , .

By construction, for all , we have since contains at least one transition and thus, three vertices. Furthermore, since is -connected, there exists a -compatible walk between every pair . All the transitions that uses must be in and are pairwise equivalent for . Thus, for all , there exists such that both and belong to .

It remains to prove that for all , . We prove by induction on that every set of pairwise equivalent transitions induces a vertex set of size at most . This property trivially holds for . Now, suppose that it is true for sets of size and let be a set of pairwise equivalent transitions of size . Let be a maximal sequence of distinct transitions of such that, for all , . One can check that all the transitions of are still pairwise equivalent (otherwise, would not be maximal). By the induction hypothesis, induces at most vertices. Since shares an edge (and thus at least 2 vertices) with , it induces at most one vertex not induced by . Thus induces at most vertices. ∎∎

Let us note that the bound provided in Theorem 2.3 suggests a

-time heuristic for

OCHG which consists in building the set as follows:

We use the reformulation given by Theorem 2.5 to generalize Lemma 2.1:

###### Lemma 2.8.

If has a cut vertex, then a minimum connecting transition set of has size .

###### Proof.

By Theorem 2.5, it is sufficient to prove that is an optimal connecting hypergraph of . Let be a cut vertex of and be the connected components of . Let be an optimal connecting hypergraph of .

Let . Suppose that there are two vertices that do not belong to . Hence, and there exists such that . Since must induce a connected subgraph of , we know that . Similarly, we know that there exists that contains and . Thus, we have and .

Thus, is also an optimal connecting hypergraph where the same hyperedge contains both and . By iterating this process, we prove that there is an optimal connecting hypergraph with one hyperedge that contains , and . This result trivially holds if there is only one vertex that does not belong in . By iterating the previous process on this hypergraph with a vertex in instead of , we end up with the optimal connecting hypergraph whose cost is . ∎∎

The following lemma will help us to prove that MCTS admits a -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 be a connected graph. If is co-connected or has a dominating vertex and is connected and co-connected, then there exists an optimal connecting hypergraph on such that for all , is co-connected.

###### Proof.

Let be an optimal connecting hypergraph on and let be an hyperedge of that is not co-connected. If is complete, then does not connect any pair of non-adjacent vertices and is still a connecting hypergraph whose cost is less or equal than the cost of . Else, let and be two non-adjacent vertices of . They therefore belong to the same co-connected component of .

If is a co-connected component of , then, since , we know that is not co-connected and by hypothesis, it therefore has a dominating vertex and and thus, . Hence, which is absurd since is a connecting hypergraph of cost .

Thus, is not a co-connected component of , which means that there exists and such that and are not adjacent. To facilitate the understanding, the construction we use in this case is illustrated in Figure 2.

Since is a co-cc of , we also know that . Hence, there exists in that contains and . Let be the connected components of that are not connected to any vertex of (if any). By definition of connecting hypergraph, we know that for all , there exists that connects a vertex of and a vertex of . We create from by replacing by and by replacing and by .

We claim that . Indeed, replacing by decreases the cost by while replacing by increases the cost of at most because contains at least the vertex . Moreover, we can prove by induction on that the cost of is greater or equal than the cost of . Indeed, has size at least two (it contains at least one vertex in and one in , by definition of ). It follows that . Therefore, . Since is an optimal connecting hypergraph, we know that is not a connecting hypergraph. But observe that satisfies the following properties:

• Every pair of non-adjacent vertices is still connected by an hyperedge of . Indeed, if two non-adjacent vertices are connected by in they are connected by or in depending on whether they belonged to or not; if they are connected by an in , they are connected by in and otherwise, the hyperedge that connects them in belongs to too.

• The graph is connected. Indeed, the sets all induce connected subgraphs of by definition and are connected to each other because for all , . Furthermore, all the connected components of are connected to a vertex of , except the which are by definition connected to the .

Thus, either or is not connected. If is a singleton, it does not connect any pair of non-adjacent vertices. Thus, is a connecting hypergraph whose cost is strictly smaller than , which is absurd. Hence, is not connected, which means it is co-connected. We can therefore apply to the same method we used on .

Just like before, we know that there exists two non-adjacent vertices and . Let be the hyperedge that connects and , let be the connected components of that are not connected to and let be hyperedges of such that connects a vertex of to a vertex of . We create from by removing and by replacing and by .

With the same arguments used for , we can prove that is connected and that connects every pair of non-adjacent vertices, which means that is a connecting hypergraph. Moreover, with these arguments, we can also prove that . Furthermore, removing from decreases the cost by and replacing by increases it by at most since contains at least the vertex . Hence, and then is an optimal covering hypergraph. Observe that has strictly fewer hyperedges such that is not co-connected than . We prove the lemma by iterating this process. ∎∎

We now prove that MCTS has a polynomial -approximation:

###### Theorem 2.10.

For every connected graph and optimal connecting transition set of , the size of is at least , where 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 . We start by proving the following claim which proves the theorem on the graphs that are connected and co-connected.

###### Claim 2.11.

Let be a connected and co-connected graph with vertices. For every connecting hypergraph of , we have .

###### Proof.

We know by Lemma 2.9 that there exists an optimal connecting hypergraph of such that for all , is co-connected.

First, observe that . Indeed, for every , is both connected and co-connected, thus we have . As , we deduce that .

Now, we prove that . Observe that since is connected, every vertex belongs to at least one edge in . Hence, by definition of connecting hypergraph, there exists such that and .

Also note that for all , there exists an hyperedge with that shares a vertex with an hyperedge of . Otherwise, and cover the vertices of and since is co-connected, this means that there exists and such that but no set of connects them, which is impossible. We can assume without loss of generality that this hyperedge that shares at least one vertex with is .

It is now immediate to prove by induction on that . Thus, we have .

By combining the two inequalities, we find that . ∎∎

Let be an optimal connecting hypergraph of , let be the co-connected components of and for all , let be a vertex that does not belong to .

For all and such that , we define

and we define as the union of the . Note that if is co-connected, there is only one co-connected component and while there is no vertex , for all , is connected by definition, so we do not need in the above construction.

Since dominates , it is easy to check that every hyperedge of is connected and has size at least 2. Plus, any two non-adjacent vertices of belong to the same and are connected by an . Therefore, they belong to which has size at least two and thus belongs to . Hence, is a connecting hypergraph.

Let and let be the set of values of such that exists. If there is only one such value , then follows immediately. Otherwise

 cost(⋃j∈Si{Ei,j})⩽∑j∈Si(|Ei∩Cj|+|{vj}|−2)⩽|Ei|−|Si|⩽|Ei|−2=cost(Ei)

still holds. Since , it follows that which proves that is optimal.

We know that two non-adjacent vertices necessarily belong to the same co-connected component of and since an hyperedge only contains one vertex that does not belong to it only connects non-adjacent vertices of one connected component. For all , let be the set of hyperedges of that connect non-adjacent vertices of . Since , is a connecting hypergraph of .

Let be a co-connected component of and observe that:

• if is not connected, then is a cut vertex of . Hence, by Lemma 2.8, .

• if is connected, since it is co-connected by definition, admits by Lemma 2.9 an optimal connecting hypergraph such that for every hyperedge of , is co-connected and thus, . This proves that is a connecting hypergraph of . As is connected and co-connected, we know by the above claim that .

Thus, we have

 cost(F)=∑j⩽lcost(Fj)⩾∑j⩽l⎧⎪⎨⎪⎩|Cj|−1 if Cj is not% connected2(|Cj|−2)3 otherwise⩾23∑j⩽l{|Cj|−1 if Cj is not connected|Cj|−2 otherwise⩾23τ(G)

∎∎

We also can prove that this bound is tight. Indeed consider the graph defined as the complement of a star of branches of 3 edges. The graph has vertices that we call , , and with (in , is the center of the star and , and are the three vertices of the branch ). Every vertex of is connected to every other except and , and and and with . Since is both connected and co-connected, our algorithm returns the connecting hypergraph whose cost is but the hypergraph is a connecting hypergrpah of cost . The example of co- that we used to prove that the algorithm was not exact (see Figure 1) is the case .

## 3. 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 be a graph. A co-connecting hypergraph is a collection of hyperedges such that

• For all , is co-connected and .

• For all , there exists such that (we say that the hyperedge covers the edge ).

co-Optimal Connecting HyperGraph (co-OCHG)

[5pt] Input: A co-connected graph .

Output: A co-Connecting Hypergraph that minimizes .

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 be an instance of 3-SAT with variables. We will construct from a graph such that is satisfiable if and only if admits a co-covering hypergraph of cost .

We start by describing how to construct . 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 and each variable occurring in , we create the gadget . If occurs positively in then is the graph depicted in Figure 2(a), otherwise, if occurs negatively in then is the graph depicted in Figure 2(b). Each gadget contains a vertex labelled and two edges labelled and .

We then create a new vertex for each clause that we connect to the three vertices labelled 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 .

Finally, for each variable , we do the following. Let be the clause where appears. Observe that since every variable has a positive and a negative occurrence. For each , we merge the edge labelled in with the edge labelled in (where ) such that the resulting edge has an extremity of degree one. We consider that this edge has both and as labels. For example, if a variable appears positively in the clauses and and negatively in the clause , the Figure 5 depicts what the graph looks like around the gadget associated to the variable .

By connecting all the gadgets as described above, we obtain the gadget graph . We may assume that is connected. Otherwise, this means that is the conjunction of two formulas that share no common variables and is satisfiable if and only if those two formulas are. Observe that is trivially co-connected. Moreover, the size of is polynomial in and .

Now, we prove that is satisfiable if and only if admits a co-covering hypergraph of cost . 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 of such that and for all , we have .

###### Proof.

In the graph , the intersection between two clause-gadgets only contains labelled edges. Thus, if an hyperedge is not included in any clause-gadget, it means that covers at least two non-labelled edges from two distinct clause-gadgets. 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 contains the vertices and and contains and .

Since is connected and co-connected, we know by Lemma 2.9 that it admits an optimal co-connecting hypergraph such that for all , is connected. The only way for an hyperedge , such that is connected, to cover non-labelled edges in several clause-gadgets is to contain the vertices labelled and at the junction between two clause-gadgets. In this case, we say that covers the junction between these two gadgets. Let us assume that an hyperedge covers the junction between two clause-gadgets and . We make no assumption on whether appears positively or negatively in and .

By definition, contains the vertices and . If does not contain , there exists an hyperedge that covers the edge has to contain at least one of and (in order to induce a connected and co-connected subgraph of ) and therefore shares at least two common vertices with . This means that we can merge and without increasing the cost of the solution and thus, we can assume that contains . However, is still not co-connected and has to contain other vertices. By connectivity, must contain at least one of and .

• If contains only one of , say , we remove from and add to the hyperedge that covers . The hyperedges and still induce co-connected subgraphs of , cover the same edges as before and the cost of does not increase.

• If is connected, we replace in the solution by the hyperedges and . The hyperedges and have the same cost as and cover the same edges, is co-connected and so is (all the vertices are adjacent to in except that can be connected to through ) . Let us also note that both and are connected.

• If contains both and but is not connected, we know it has two connected components and (since removing a vertex set of degree cannot create more than connected components). We replace by and . The hyperedges and have the same cost as and cover the same edges. Furthermore, both and are connected since every vertex is adjacent to except that can be connected to through and in and . We also notice that