On the Complexity of Local Graph Transformations
Christian Scheideler, Alexander Setzer

TL;DR
This paper studies the complexity of transforming one graph into another using local, node-based primitives, proving NP-hardness for optimal sequences and providing a polynomial-time approximation algorithm.
Contribution
It introduces a formal framework for local graph transformations, proves NP-hardness of finding minimal transformation sequences, and offers an efficient approximation algorithm.
Findings
Transforming graphs with local primitives is NP-hard.
A polynomial-time approximation algorithm with a constant ratio exists.
Local primitives cannot disconnect or add nodes to the graph.
Abstract
We consider the problem of transforming a given graph into a desired graph by applying a minimum number primitives from a particular set of local graph transformation primitives. These primitives are local in the sense that each node can apply them based on local knowledge and by affecting only its -neighborhood. Although the specific set of primitives we consider makes it possible to transform any (weakly) connected graph into any other (weakly) connected graph consisting of the same nodes, they cannot disconnect the graph or introduce new nodes into the graph, making them ideal in the context of supervised overlay network transformations. We prove that computing a minimum sequence of primitive applications (even centralized) for arbitrary and is NP-hard, which we conjecture to hold for any set of local graph transformation primitives satisfying the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Paderborn University, Germany and https://cs.uni-paderborn.de/en/ti/[email protected] Paderborn University, Germany and https://cs.uni-paderborn.de/en/ti/[email protected]
\CopyrightC. Scheideler and A. Setzer \ccsdesc[500]Theory of computation Problems, reductions and completeness \ccsdesc[500]Theory of computation Approximation algorithms analysis
\fundingThis work was supported by the German Research Foundation (DFG) within the Collaborative Research Center "On-The-Fly Computing" (SFB 901) under Grant No.: GZ SFB 901/02. \hideLIPIcs
On the Complexity of Local Graph Transformations
Christian Scheideler
Alexander Setzer
Abstract
We consider the problem of transforming a given graph into a desired graph by applying a minimum number of primitives from a particular set of local graph transformation primitives. These primitives are local in the sense that each node can apply them based on local knowledge and by affecting only its -neighborhood. Although the specific set of primitives we consider makes it possible to transform any (weakly) connected graph into any other (weakly) connected graph consisting of the same nodes, they cannot disconnect the graph or introduce new nodes into the graph, making them ideal in the context of supervised overlay network transformations. We prove that computing a minimum sequence of primitive applications (even centralized) for arbitrary and is -hard, which we conjecture to hold for any set of local graph transformation primitives satisfying the aforementioned properties. On the other hand, we show that this problem admits a polynomial time algorithm with a constant approximation ratio.
This publication is the (revised) full version of a paper that appeared at ICALP’19 [DBLP:conf/icalp/ScheidelerS19].
keywords:
Graphs transformations, NP-hardness, approximation algorithms
1 Introduction
Overlay networks are used in many contexts, including peer-to-peer systems, multipoint VPNs, and wireless ad-hoc networks. In fact, any distributed system on top of a shared communication infrastructure usually has to form an overlay network (i.e., its participating sites have to know each other or at least some server) in order to allow its members to exchange information.
A fundamental task in the context of overlay networks is to maintain or adapt its topology to a desired topology, where the desired topology might either be pre-defined or depend on a certain objective function. The problem of reaching a pre-defined topology has been extensively studied in the context of self-stabilizing overlay networks (e.g., [29, 21, 12, 5, 22, 7]), and the problem of adapting the topology based on a certain objective function has been studied in the context of self-adapting and -optimizing overlay networks (e.g., [32, 14, 2, 19, 11, 3, 10, 8]). Many of these approaches are decentralized, and because of that, the work (in terms of number of edge changes) they need to adapt to a desired topology might be far away from the minimum possible work to reach that topology. In fact, no non-trivial results on the competitiveness of decentralized overlay network adaptations are known so far other than handling single join or leave operations, and it is questionable whether any good competitive result can be achieved with a decentralized approach. An alternative approach would be that a server is available for controlling the network adaptations, and this has already been considered in the context of so-called supervised overlay networks.
In a supervised overlay network there is a dedicated, trusted node called supervisor that controls all network adaptations but otherwise is not involved in the functionality of the overlay network (such as serving search requests), which is handled in a peer-to-peer manner. This has the advantage that even if the supervisor is down, the overlay network is still functional. Solutions for supervised overlay networks have been proposed in [24, 15], for example, and the results in [24] imply that, for specific overlay networks, any set of node arrivals and departures can be handled in a constant competitive fashion (concerning the work needed for adding and removing edges) to get back to a desired topology. But no general result is known so far for supervised overlay networks concerning the competitiveness of converting an initial topology into a desired topology. Also, no result is known so far on how to handle the problem that a supervisor could be faulty or even act maliciously.
A malicious supervisor would pose a significant problem for an overlay network since it could easily launch Sybil attacks (i.e., flooding the overlay network with fake or adversarial nodes) or Eclipse attacks (i.e., isolating nodes from other nodes in the overlay network). We thus ask: Can we limit the power of a supervisor such that it cannot launch an eclipse or sybil attack while still being able to convert the overlay network from any connected topology to any other connected topology?
We answer the question to the affirmative by determining a set of graph transformation commands, also called primitives, that only the supervisor may issue to the nodes. These primitives are powerful enough to transform any (weakly) connected topology into any other (weakly) connected topology but still allow the nodes to locally check that applying them does not disconnect the network or introduce a new node into the network. We additionally aim at minimizing the reconfiguration overhead, i.e., the number of commands to be issued (and, related to this, the number of changes to be made to node neighborhoods) to reach a desired topology. Unfortunately, as we will show, this cannot be done efficiently for the set of primitives we consider unless , and we conjecture that this holds for any set of commands that has the aforementioned property of giving the participants the ability to locally check that they cannot be used for eclipse or sybil attacks. However, we are able to give an -approximation algorithm for this problem.
1.1 Model and Problem Statement
We model the overlay network as a graph, i.e., nodes represent participants of the network and if there is a directed edge in the graph, this means that there is a connection from to . Undirected edges model the two connections from to and from to . Since there may be multiple connections between the same pair of participants, the graphs we consider in this work are multigraphs, i.e., edges may appear several times in the (multi-)set of edges. For convenience throughout this work we will use the term “graph” instead of multigraph and refer to “edge sets” even though their elements need not be unique.
We consider the following set of four primitives for the manipulation of directed graphs, first introduced by Koutsopoulos et al. [25] in the context of overlay networks:
Introduction
If a node has a reference of two nodes and with , introduces to if sends a message to containing a reference of while keeping the reference.
Delegation
If a node has a reference of two nodes and s.t. are all different, then delegates ’s reference of if sends a message to containing a reference of and deletes the reference of .
Fusion
If a node has two references and with , then fuses the two references if it only keeps one of these references.
Reversal
If a node has a reference of some other node , then reverses the connection if it sends a reference of itself to and deletes its reference of .
The four primitives are visualized in Figure 1. Note that for the introduction primitive, it is possible that , i.e., introduces itself to . To simplify the description, we sometimes say that a node introduces or delegates the edge if introduces to some other node or delegates ’s reference to some other node, respectively.
The primitives in are known to be universal (c.f. [25]), i.e., it is possible to transform any weakly connected graph into any other weakly connected graph by using only the primitives in . Note that for every edge used in any of the primitives, either still exists after the corresponding primitive is applied, or there is still an (undirected) path from to in the resulting graph. This directly implies that no application of the primitives can disconnect the graph. We assume that all connections are authorized, meaning that both endpoints are aware of the other endpoint of this connection. Thus, if for an edge that is supposed to be transformed into by an application of the reversal primitive, checks that actually was the previous endpoint of the former edge then the primitives cannot be used to introduce new nodes into the graph.
For undirected graphs, consider the set containing only the primitives introduction, delegation and fusion (defined correspondingly). These three primitives, accordingly, are universal on undirected graphs, i.e., any connected undirected graph can be transformed into any other connected undirected graph by applying the primitives in (c.f. [25]).
We make the following observation:
Observation 1**.**
The introduction primitive is the only primitive that can increase the number of edges in a graph. The fusion primitive is the only primitive that can decrease the number of edges in a graph. The delegation primitive is the only primitive that can remove the last edge between two nodes (i.e., an edge of multiplicity one).
A computation is a finite sequence of either directed or undirected graphs, in which each graph is obtained from by the application of a single primitive from or , respectively. The graphs and are called the initial and the final graphs of , respectively. The variable is called the length of the computation.
We define the Undirected Local Graph Transformation Problem (ULGT) as follows: given two connected undirected graphs , find a computation of minimum length whose initial graph is and whose final graph is . The corresponding decision problem k-ULGT is defined as follows: given a positive integer and two connected undirected graphs and , decide whether there is a computation with initial graph and final graph of length at most . Accordingly we define the Directed Local Graph Transformation Problem (DLGT) and k-DLGT, which differ from the according problems in that the graphs are directed.
1.2 Related Work
Graph transformations have been studied in many different contexts and applications, including but not limited to pattern recognition, compiler construction, computer-aided software engineering, description of biological developments in organisms, and functional programming languages implementation (for a more detailed introduction and literature overview, we refer the reader to [4], [20], or [31, 13]). Simply put, a graph transformation (or graph-rewriting) system consists of a set of rules that may be applied to subgraphs isomorphic to of a given graph thus replacing with in . Since changing the labels assigned to a graph (graph relabeling) is also a kind of graph transformation, basically every distributed algorithm can be understood as a graph transformation system (c.f. [13]). The type of graph transformations probably closest related to our work is the area of Topology Control (TC). In simple terms, the goal of TC is to select a subgraph of a given input graph that fulfills certain properties (such as connectivity) and optimizes some value (such as the maximum degree). This problem has been studied in a variety of settings (for surveys on this topic see, e.g., [27], or [6]) and although the usual approach is decentralized, there are also some centralized algorithms in this area (see, e.g., [30]). However, these works only consider the complexity of computing an optimal topology (instead of the complexity of transforming the graph by a minimum number of rule applications). There is one work by Lin [28] proving the -hardness of the Graph Transformation Problem, in which the goal is to find the minimum integer such that an initial graph can be transformed into a final graph by adding and removing at most edges in . Our work differs from that work in that we do not allow arbitrary edge relocations but restrict them to a set of rules that can be applied locally (and we also provide constant-factor approximation algorithms).
Our approximation algorithms use an approximation algorithm for the Undirected Steiner Forest Problem as a black-box (also known as the Steiner Subgraph Problem with edge sharing, or, in generalizations, the Survivable Network Design Problem or the Generalized Steiner Problem). 2-approximations of this problem were first given by Agrawal, Klein, and Ravi [1], and by Goemans and Williamson [16], and later also by Jain [23]. Gupta and Kumar [18] showed a simple greedy algorithm to have a constant approximation ratio and recently, Groß et al. [17] presented a local-search constant approximation for Steiner Forest.
1.3 Our Contribution
The main contributions of this paper are as follows: We prove the Undirected and the Directed Local Graph Transformation Problem to be -hard in Section 2. Furthermore, in Section 3 we show that they belong to , i.e., there exist constant approximation algorithms for these two problems.
2 -hardness results
In this section, we show the -hardness of the Undirected Local Graph Transformation Problem by proving the -hardness of k-ULGT (see Section 2.1). Since k-DLGT’s -hardness is very similar for k-ULGT, we only briefly sketch the differences in Section 2.2. Throughout this section, for any positive integer we use the notation to refer to the set .
2.1 k-ULGT is -hard
We prove k-ULGT’s hardness via a reduction from the Boolean satisfiability problem () which was proven to be -hard by Cook [9] and, independently, by Levin [26]. We briefly recap as follows:
Definition 2.1** ().**
Given a set of Boolean variables and a Boolean formula over the variables in in conjunctive normal form (CNF), decide whether there is a truth assignment that satisfies .
To reduce to k-ULGT, we use the following reduction function:
Definition 2.2** (Reduction function for ).**
Let be a instance, in which is the set of Boolean variables and for clauses . Then in which and and are undirected graphs defined as follows. Without loss of generality, assume that each literal occurs only once in each clause.
We define the following sets of nodes: , and . Then, the set of nodes of and is . For the set of edges, define for every , for every , , , . Both and have the edges in . Additionally, has the edges in and has the edges in .
Intuitively, each variable is mapped to a gadget consisting of the four nodes , and . Also each clause is connected with each literal occurring within it. Lastly, in , each of the is connected with the node , whereas in , each of the and each of the are connected with . Figure 2 shows an example of the output of the reduction function for a given formula in CNF.
We now show that every instance is satisfiable if and only if is a “yes” instance of k-ULGT. We start with the “only if” part for this is the simpler direction:
Lemma 2.3**.**
If a instance as in Definition 2.2 is satisfiable then with is a k-ULGT instance and there is a computation with initial graph and final graph of length at most .
Proof 2.4**.**
Assume there is a satisfying truth assignment of . For every let if or if . We construct the following computation with initial graph and final graph :
For every , delegates the edge to . 2. 2.
For every choose one neighbor (we show below that this exists), and let introduce to . 3. 3.
For every , delegates the edge to .
Obviously, the length of this computation is . To prove the missing part, recall that every is satisfied under , i.e., there is at least one literal in that evaluates to true, i.e., there is an such that if , or if . By definition of , . Thus because occurs in , was a neighbor of during Step 2.
The “if” part is more complex. We begin with the following insight that will prove helpful in the course of this part.
Lemma 2.5**.**
Suppose the nodes in the initial graph of a computation can be decomposed into disjoint sets such that there is no edge for any , , , and throughout none of the nodes in applies a primitive. Then there is no edge for any , , , in any graph of the computation.
Proof 2.6**.**
Assume there is a computation and sets as defined above and assume for contradiction that the claim is not true. We consider the first edge such that , , , . Clearly, it cannot have been created by the application of a fusion primitive. Thus it must have been created by an introduction or delegation primitive applied by a node that knew both and before the application of this primitive. This implies . However, the nodes in do not apply any primitives by assumption, which yields a contradiction.
In the rest of this section, we use the following notation: For a given instance of k-ULGT , we say a computation is feasible if and only if its initial graph is , its final graph is and its length is at most . Furthermore, we say that the edge that is established during the application of an introduction or delegation primitive (the edge in Figure 1(a) and Figure 1(b)) is the result of the introduction or delegation, respectively.
The next lemma we show represents a main building block of the proof of the “if” part.
Lemma 2.7**.**
Let be a instance and let . For every computation with initial graph and final graph of length at most it holds: There are , for every , such that in there are no edges other than and no edge occurs twice in any graph of (where and denote the edge sets of and , respectively).
The general idea of the proof of Lemma 2.7 is the following: To obtain the final graph, for each the edge has to be created and for each the edge has to be created. Each of these creations involves a distinct application of a primitive. Therefore, only applications of primitives are left in a feasible computation. We show that the nodes in each gadget have to apply at least one primitive that does not create one of the above edges. This implies that each gadget may apply no other primitive than to create an edge that is not in the final graph and that the nodes and themselves cannot apply any primitives at all which by Lemma 2.5 means that there are no inter-gadget edges. We use these facts to prove that is used to remove the edge thereby creating either or .
We split the full proof of Lemma 2.7 into three claims, which we prove individually. The first claim we show is the following:
Claim 1**.**
In every feasible computation for every , there is a node that applies a fusion primitive or an introduction or delegation primitive whose result is not in .
Proof 2.8**.**
Assume for contradiction that there is a feasible computation and an such that there is no that applies a fusion primitive or an introduction or delegation primitive whose result is not in . Note that cannot delegate away any of its incident edges or as the result would not be in (for it would be incident to or ). Similarly, and could not delegate away and , respectively. Therefore, the edges and must be kept throughout the computation. Now observe that has an initial degree of three. Since has a degree of two in the final graph, there must be at least one application of a primitive in which ’s degree decreases. Consider the last such application, i.e., the resulting neighborhood of is and (remember that these edges persist throughout the computation). If it was an application of a fusion primitive, then , or must have applied this primitive, yielding a contradiction. Otherwise, it must have been a delegation primitive applied by for no other primitive could reduce ’s degree then. However, the result of this delegation primitive must be an edge incident to or then, i.e., an edge not in yielding a contradiction in this case as well. All in all, we have proven 1.
The second claim we prove is:
Claim 2**.**
For every feasible computation , the following holds:
- (i)
for each the nodes in may apply at most one primitive whose result is not an edge or for , 2. (ii)
the nodes in do not apply any primitives at all, and 3. (iii)
there is no graph in that contains an edge such that and for any such that .
Proof 2.9**.**
For the proof of this claim we distinguish between three types of edges. Edges for some belong to type A. Edges for some belong to type B. Last every edge belongs to type . Note that in order to obtain the final graph, the nodes need to establish edges of type A, edges of type B, and, according to 1, for every , one of the nodes in has to apply a primitive whose result is an edge of type C or which is a fusion primitive. Since there may be at most applications of primitives, no other primitives may be applied. This immediately proves (i). Since cannot create the first instance of an edge of type A or B by itself, cannot apply any primitive at all as this would require more than primitive applications then ( are used to create the type A/B edges and an additional primitives are applied by the nodes from ). For the same reason, the nodes in cannot apply any primitives, which together with the fact that cannot apply any primitives equates to (ii). In addition this implies that the initial graph can be decomposed into with such that there is no edge for any , and , and the nodes in do not apply any primitive at all. Thus, (iii) follows from Lemma 2.5.
The last claim we show is the following:
Claim 3**.**
In every feasible computation, for every there must be a graph containing an edge or .
Proof 2.10**.**
To prove 3, we show that has to delegate to or . We do so by proving that cannot have a neighbor other than , or , which is sufficient because does not apply any primitive according to (ii) of 2. Assume for contradiction that has an edge such that and let be the last such edge that occurs in a graph in the computation. Due to (iii) of 2, . Consider the node that applied an introduction or delegation primitive whose result was the edge . For this to be possible, there must have been an edge when applied the primitive. Since , all for , and all for do not apply any primitives according to (ii) of 2 and because of (iii) of 2, . According to (i) of 2, the computation may not contain another application (than this one) of a delegation / introduction primitive by a node in whose result is not an edge or for (). Since , this edge must be removed by some application of a delegation primitive. Note that since , must apply this primitive. Since is the last edge different from , , and , must be delegated to one of the nodes , , and . If delegates to or , then the result is an edge or , which contradicts (). Thus assume delegates to . Note that after this delegation, the edge exists and does not have a neighbor in any of the subsequent graphs (recall that was the last edge of its kind). Since , and does not apply any primitives according to (ii) of 2, this edge must be delegated to either or yielding an edge or , which contradicts () as well. As mentioned above this proves that has to delegate to or , and, as argued before as well, also implies the claim of the lemma.*
3 gives that during a feasible computation, the edges for all , for all and , for all have to be created. Since each primitive can create at most one of these edges and the length of the computation is at most , this implies the claim of Lemma 2.7.
The rest of the proof of the “if” part, as formalized by the following lemma, is comparably straightforward.
Lemma 2.11**.**
Let be a instance as in Definition 2.2. If with is a k-ULGT instance and there is a computation with initial graph and final graph of length at most , then is satisfiable.
Proof 2.12**.**
Assume that is a k-ULGT instance and there is a feasible computation for . According to Lemma 2.7 there are , for every such that in there are no edges other than . Note that in , for every there is an edge and each such edge must have been the result of an introduction or delegation primitive applied by an , (as throughout , the nodes do not have any other neighbors with an edge to that could possibly create this edge) . Let be the mapping of each to the that applied a primitive that resulted in the edge . Consider the truth assignment such that if and if . Observe that for every . Assume for contradiction that there is a clause in that does not evaluate to true under . Note that must occur in by construction. However, since for some and , we obtain the desired contradiction.
Putting both parts together, Lemma 2.3 and Lemma 2.11 imply , from which we obtain:
Corollary 2.13**.**
k-ULGT* is -hard.*
2.2 k-DLGT is -hard
The proof of the -hardness of k-DLGT is very similar to that of k-ULGT. Therefore, we do not restate the whole proof but point out the differences between the two proofs.
The reduction function is a “directed version” of Definition 2.2, in which each of the edges is assigned as unique direction. Formally, it looks as follows:
Definition 2.14** (Reduction function for ).**
Let be a instance, in which is the set of Boolean variables and for clauses . Then in which and and are undirected graphs defined as follows. Without loss of generality, assume that each literal occurs only once in each clause.
We define the following sets of nodes: , and . Then, the set of nodes of and is . For the set of edges, define for every , for every , , , . Both and have the edges in . Additionally, has the edges in and has the edges in .
An example of the output of this reduction function is depicted in Figure 3. Note that this picture only differs from Figure 2 in that the edges are directed. More specifically, all solid edges are directed “downwards”, the dashed edges are directed “upwards” and all grey nodes are supposed to have an an “upward” edge to in .
We now point out the differences in the proofs for the directed case, in which we refer to the lemmas from Section 2.1. Note that to shorten the description, every edge that appears in the proof for the undirected case should be read as the directed edge unless noted differently.
Lemma 2.3 (the “only if” part of the reduction) directly transfers to the directed case: the same approach described in that proof can be applied in the k-DLGT scenario as well.
For the directed version of Lemma 2.5, the same proof applies where the only additional argument to be mentioned is that the first edge such that not only cannot have been created by the application of a fusion primitive, but also not by the application of a reversal primitive.
For the proof of the counterpart of Lemma 2.7, we consider all three claims used for that lemma individually. The argument showing that the claim of the lemma follows from these three claims is analogous.
1 must be completed such that applied either a fusion primitive or an introduction, delegation or reversal primitive whose result is not in . This set of edges is defined as: . In the proof, the assumption for contradiction includes that none of the applies a reversal primitive whose result is not in . In addition to that cannot delegate away and , we argue that cannot reverse this edge as the result would not be in . These two facts immediately imply that and persist throughout the computation. For the last primitive application that reduces ’s degree to two, we have to take into account that this could also be the application of a reversal primitive. However, in that case, the result of this primitive application would be an edge whose one endpoint is , i.e., an edge not in , yielding a contradiction as well.
In the proof of 2 we need the following additional argument to show that cannot apply any primitives (the previous argument that cannot create the first instance of an edge of type A or B by itself does not suffice if the reversal primitive could also be applied): Since no primitives other than the creating the type A edges, the creating the type edges and the creating the type edges or being a fusion primitive can be applied, there cannot be any edge in any graph of the computation. In particular, there can be no edge for any or for any . Thus, cannot create the first instance of a type A or B edge via a reversal primitive and together with the previous argument we also obtain that cannot apply any primitive at all.
In the proof of 3, in order to show that has to delegate to or , we similarly show prove that cannot have an outgoing neighbor other than , , or . In the directed scenario, however, this is not immediately sufficient because does not apply any primitive. Additionally, we have to consider that cannot simply reverse edge as the resulting edge does not belong to and does not apply any primitive, which would be necessary to remove that edge again. After that, note that the edge such that which we assume to exist for contradiction cannot have been established by the application of a reversal primitive, for such a cannot apply any primitive at all according to Item ii (since follows equally in the directed case). Thus it is feasible to continue with the consideration of the that applied an introduction or delegation primitive whose result was . The claim (*) in the directed case is that the computation may not contain another application (than the one applied by to create ) of a delegation, introduction, or reversal primitive by a node in whose result is not an edge or for . Again, in order to remove , must apply a delegation primitive to remove this edge. In this case, the argument is that cannot reverse the edge because and does not apply any primitive (as argued before). In the last contradiction of the proof, which relies on that , there is not only the option that delegates this edge to or , but also that reverses this edge. This however would yield an edge , which does not belong to and could not be removed, for does not apply any primitives.
The last lemma required is Lemma 2.11, but this is completely analogous. All in all, we obtain as for the undirected case:
Corollary 2.15**.**
k-DLGT* is -hard.*
3 Approximation Algorithms
The main part of this section consists in describing and analyzing a constant approximation algorithm for ULGT (Section 3.1). As it turns out, an algorithm for DLGT can be obtained by a suitable adaptation of this algorithm, as we will elaborate on in Section 3.2.
As an ingredient our algorithms use a 2-approximation algorithm for the following problem:
Definition 3.1** (Undirected Steiner Forest Problem (USF)).**
The Undirected Steiner Forest Problem (USF) is defined as follows: For a given input such that is a graph and is a set of pairs of nodes from , find a forest in with a minimum number of edges such that the two nodes of each pair in are connected by a path in .
As described in Section 1.2, such an approximation algorithm already exists. We will use it as a black box and thus not discuss it any further.
3.1 A Constant Approximation Algorithm for ULGT
We now describe an approximation algorithm for ULGT (Section 3.1.1) and prove it to have a constant approximation ratio (Section 3.1.2).
3.1.1 Algorithm Description
For an initial graph and a final graph , we define the set of additional edges and the set of excess edges . We now describe the algorithm in detail and then summarize its pseudo-code in Algorithm 1. Our algorithm consists of two parts, the first of which deals with establishing all additional edges and the second of which deals with removing all excess edges. In the first part, using an arbitrary 2-approximation algorithm for the USF as a black box, the algorithm computes a 2-approximate solution to the following USF instance: The given graph is , and the set of pairs of nodes is . Note that the result is a forest such that for every edge , and belong to the same tree. For each tree in this forest the algorithm then selects an arbitrary root and connects all nodes in that are incident to an edge in to . The exact details of this will be described when we analyze the length of the resulting computation. In the next step, for every tree , and every such that and belong to , introduces and to each other, thereby creating the edge . After that, the superfluous edges (i.e., those edges that belong neither to nor to ) are deleted in a bottom-up fashion: every node that does not have a descendant with a superfluous edge (in the tree this node belongs to when viewing this tree as rooted by ), fuses all superfluous edges and delegates the last such to its parent in the tree. Note that all superfluous edges in the same tree have as one of their endpoints. The second part of the algorithm is similar to the first, with the following differences: In the fifth step, the USF is approximated for the input . Note that the solution is a subgraph of the graph obtained after the first part of the algorithm. In the sixth step, only one of the two endpoints of an edge from is selected to become connected with the root of the tree the endpoints belong to. In the seventh step (where in the first part the additional edges are created by the nodes), for each edge , the endpoint selected in the sixth step delegates this edge to (resulting in the edge ). These edges can then be delegated and fused in a bottom-up fashion by the endpoints other than in Step 8. In contrast to Step 4, we begin with applying fusions here because the edges superfluous exist twice here (one was created in Step 6, and one in Step 7).
3.1.2 Analysis
In this section we show that Algorithm 1 is a constant-approximation algorithm for ULGT, which proves the following theorem:
Theorem 3.2**.**
.
For convenience we will analyze the two parts of the algorithm individually. Therefore, for a given initial graph and final graph , let be the length of the computation of the first part of the algorithm for this instance, be the length of the computation of the second part, and . Furthermore, let be the length of an optimal solution to ULGT for initial graph and final graph . We also define the intermediate graph . In the course of the analysis we will establish a relationship between and and between and . This will aid us in determining the approximation factor of Algorithm 1 due to the following lemma:
Lemma 3.3**.**
.
Proof 3.4**.**
Let denote the problem equal to ULGT with initial graph and final graph with the additional requirement that the computation must contain and let be the length of an optimal solution to it. Clearly, (note that one could split the optimal solution to at ). We now show that .
Consider a computation whose initial graph is , whose final graph is and whose length is (note that such a computation is an optimal solution to ULGT). We now transform into a computation that represents a solution to . This transformation increases its length by only and thus proves the above claim.
Note that every edge is removed during . This may happen due to the application of a fusion primitive (in case contains another edge; recall that edges may have a multiplicity of more than one) or a delegation primitive. For all edges to which the former case applies, we simply omit that application of a fusion primitive. For all edges to which the latter case applies, we replace each of these applications of delegation primitives by applications of introduction primitives. Altogether, we obtain a new computation of equal length. Note that changing these primitive applications does not make the computation infeasible as this only causes the graph to have additional edges. The final graph of is (recall that ). Next we append by and obtain the computation of length . Note that since transformed to , this second half of , which starts from , has the final graph , i.e., each edge from appears twice in . Thus we extend by fusing each edge from with its double, resulting in a computation of length . Since represents a solution to for initial graph and final graph , this completes the proof.
One might question whether this bound is tight or if it is possible to, e.g., get rid of the additional addend by a more careful analysis. Figure 4 shows that this bound is indeed tight and shows an example where .
In the rest of the analysis we show that (Lemma 3.5) and that (Lemma 3.7). By Lemma 3.3 this implies that (since, clearly, ), which yields the claim of Theorem 3.2. We start with the former claim:
Lemma 3.5**.**
.
Proof 3.6**.**
Let be an optimal solution to the USF with input and recall that is the USF approximation computed in Step 1 of Algorithm 1. Throughout the analysis, and will denote the number of edges in these solutions. In the first part of this proof, we show that . The second part then consists in proving , which together with the observation that yields the claim.
To upper bound , we analyze the number of primitives applied in each of the steps of the first part of the approximation algorithm. In Step 1, no primitive is applied. To keep the number of edges as low as possible (which saves fusion primitives in Step 4), the algorithm for every in connects the desired nodes to in Step 2 in the following way: To simplify the description, we view as rooted at and for a node denote by the set consisting of and all of its descendants in the tree rooted at . We say a node is relevant if contains a node with an endpoint in 111Note that although any tree in that contains nodes that are not relevant for any root could trivially be reduced in size, we have to take into account that such trees exist since we treat the approximation algorithm for USF as a black box.. See Figure 5 for an illustration of these notions. First of all, introduces itself to all relevant children. Then, starting from the second level, we proceed level-wise in the tree: For each level , every node at level checks whether is an endpoint of an edge in . If so, introduces to all relevant children. Otherwise, introduces to all but one of its relevant children (chosen arbitrarily) and delegates to the relevant child it did not introduce to. The result of this procedure is that each node incident to an edge in has an edge to for the tree it belongs to, see Figure 5(a). Note that according to the definition of , for each pair and belong to the same tree . The above procedure increases the number of edges by at most and requires at most applications of primitives (at most one for every edge in ). It is easy to see that Step 3 (c.f. Figure 5(b)) involves exactly applications of primitives. For the length of Step 4 (c.f. Figure 5(c)), note that for every tree at most one delegation has to be applied for every edge in (causing delegations in total) and at most fusions have to be applied for this is the number of superfluous edges created during Step 2. All in all, Step 2, Step 3, and Step 4 involve , , and applications of primitives, respectively. This makes a total of . Since is a 2-approximation of , we obtain .
For the lower bound on , assume for contradiction that there is a computation with initial graph and final graph of length . Let be the sequence of graphs of this computation. For every we iteratively create a path from to in the following way: Begin with . Note that exists in . We iterate through in reverse order and for every graph , if exists in , . Otherwise, since is the result of a single application of a primitive to , there is exactly one edge in that exists in but not in and this edge was created by the application of an introduction or delegation primitive of some node such that and exist in . Thus, let be with replaced by and note that exists in . Eventually, we obtain a path that exists in . For , let (where is the set of all edges on the path ) be a normal set of edges (i.e., not a multiset). Note that can be transformed into a feasible (though not necessarily optimal) solution to the USF with input by removing cycle edges. Therefore, . An example is given in Figure 6.
For an arbitrary , note that : if was obtained from by the application of a fusion primitive, this inequality trivially holds as none of the above paths changes in this case. Otherwise, was obtained from by an application of an introduction or delegation primitive by some node causing at most one edge to exist in that does not exist in . In this case, we further know that and exist in and by the definition of the above paths, for every pair such that contains the edge the path contains as a sub-path instead and for all other pairs , . By the definition of and , this implies also in this case. All in all we obtain that because (note the definition of ). By the assumption that , we obtain , which represents a contradiction.
Lemma 3.7**.**
.
Proof 3.8**.**
The general structure of this proof follows the line of the proof of Lemma 3.5, but differs in the details. Similar to the notation used in that proof, let be an optimal solution for the USF with input and recall that is the USF approximation computed in Step 5 of Algorithm 1. Analogously, and denote the number of edges in these solutions. In the first part of this proof, we show that . The second part then consists in proving , which together with the observation that yields the claim.
To upper bound , we analyze the number of primitives applied in each step of the second part of the approximation algorithm. Of course, no primitive is applied in Step 5. The connections required in Step 6 can be created in a similar fashion as in Step 2, which is described in the proof of Lemma 3.5: For each tree , we proceed top-down in rooted at some arbitrary but fixed node again. Here, each intermediate node checks whether for some . If so, it introduces to all relevant children (here a node is relevant if contains a node such that for some ). Otherwise, it introduces to all but one relevant children and delegates it to the remaining one. In the end, for every edge , has an edge to , the number of edges in the graph has increased by at most , and the process involved at most applications of primitives. In Step 7, clearly exactly edges have to be delegated. Step 8 is similar to Step 4 and for analogous reasons requires at most delegations and at most fusions (recall that up to edges were added in Step 6 and the edges delegated in Step 7 have to be removed as well). All in all, Step 6, Step 7 and Step 8 of the algorithm involve at most , and applications of primitives, respectively, which yields: (since is a 2-approximation of ).
To lower bound the value of , assume for contradiction that there is a computation with initial graph and final graph of length . Let be the sequence of graphs of this computation. Similar to the proof of Lemma 3.5, for every , we create a path from to , but this time we start with and consider the graphs in increasing order: For , if exists in , . Otherwise since is the result of a single application of a primitive to , there is exactly one edge in that exists in but not in and this edge must have been delegated by either or to some node . In the following denote the node that applied the delegation by and denote by the other node from .In , must share an edge with and this edge still exists in (for only one primitive is applied in the transition from to ). Since was delegated by to , the edge exists in . Thus, let be with replaced by and observe that exists in . Eventually, we obtain a path that exists in . Define (where is the set of all edges on the path ) as a normal set of edges (i.e., not a multiset) for every , and note that can be transformed into a feasible (though not necessarily optimal) solution to the USF with input by removing cycle edges. Therefore, . Furthermore, for an arbitrary , note that because there is at most one edge that exists in but not in and thus causes the replacement of by for some fixed node for all paths that contain as a sub-path. This yields that because (note the definition of ). By the assumption that , we obtain , which represents a contradiction.
3.2 A Constant Approximation Algorithm for DLGT
In this subsection we describe how to adapt Algorithm 1 to obtain a constant approximation algorithm for DLGT. The pseudocode of the adapted version of the approximation algorithm is given in Algorithm 2 (with differences to Algorithm 1 highlighted in boldface). In this pseudocode and in the following proof, for a graph , denotes the undirected version of , i.e., each edge in is replaced by . An example of the procedure of Algorithm 2 is illustrated in Figure 7.
Algorithm 2 also has a constant approximation factor, which is stated by the following theorem:
Theorem 3.9**.**
.
Proof 3.10**.**
We begin with establishing a relationship between solutions to DLGT and to ULGT. For arbitrary directed graphs and , let be an optimal solution to DLGT with (directed) initial graph and (directed) final graph (this problem we denote by ) and let be its length. Let be an optimal solution to ULGT with initial graph and final graph , denote its length by , and denote this problem by . Let the computation be obtained from by ignoring all edge directions and removing all applications of reversal primitives from . Note that is a solution to and that its length is thus lower bounded by and upper bounded by (since we only shortened the optimal solution to ). Therefore, for all directed graphs and . We will use this insight to compare the length of the solution computed by Algorithm 2 for initial graph and final graph with the length of the solution computed by Algorithm 1 for initial graph and final graph in order to prove the claim.
In the following, due to the similarities of Algorithm 2 with Algorithm 1, we only describe the changes to the algorithm that require additional explanation (namely, Step 2 and Step 6). The other changes (highlighted in boldface in Algorithm 2) are self-explanatory. Additionally, we analyze the influence of the differences in the algorithms on the length of the computations.
The procedure for the creation of edges in Step 2 is, in general, very similar to that used in Algorithm 1 (described in the proofs of Lemma 3.5). There are three differences, though: First, in order to delegate / introduce edges downwards in a tree , all edges of must be oriented downwards, which is why we reverse all edges oriented into the opposite direction (towards ) first. Let be the set of all these edges of all trees . Then this additionally involes applications of the reversal primitive in total. Second, since we deal with directed edges, we have to clarify that the edges delegated / introduced through the tree must be directed towards the root node. Third, this process creates the additional edges for every incident to an edge in , whereas is desired. Thus, for each such edge, we apply the reversal primitive to turn into , which requires at most applications of primitives. In Step 4, we additionally have to reverse all edges in every tree first in order to be able to delegate upwards in the tree. This involves additional applications of reversal primitives in total. Furthermore, we have to reverse all superfluous edges before we can start the bottom-up procedure. As their number is, again, upper bounded by , we have to apply only that number of reversal primitives. In addition, we afterwards reverse all edges whose orientation does not yet match their orientation in , which totally requires an additional applications of reversal primitives (since these are exactly the edges in that were not reversed in Step 2). Altogether, the additional number of primitives required in comparison to Algorithm 1 is Thus, the length of the computation computed in the first part by Algorithm 2 is at most (in which is the length of the computation of the first part of Algorithm 1 for initial graph and final graph ).
For the second part, note that the creation of edges in Step 6 is generally very similar to that used in Algorithm 1 (described in the proof of Lemma 3.7). Here, for each edge , corresponds to in Algorithm 1. As in Step 2, we have to reverse the edges downwards in the tree first, incuring additional primitive applications. Again, the edges delegated / introduce through the tree must be directed towards the root node. In Step 8, we again have to reverse all edges in each tree, requiring an additional number of primitive applications of . Additionally, we the edges created in Step 7 need to be reversed, which are in total. Last, the edges whose orientation does not match their orientation in (which are those that were not reversed in Step 6) need to be reversed, which requires applications of reversal primitives. All in all, the length of the computation computed in the second part by Algorithm 2 is at most (in which is the length of the computation of the second part of Algorithm 1 for initial graph and final graph ).
Incorporating the arguments and results of the proofs of Lemma 3.5 and Lemma 3.7, we obtain:
[TABLE]
where is defined as in Section 3.1.2 and for being the edge set of .
Let be the length of the computation computed by Algorithm 2 for initial graph and final graph . Building on the above two inequations, we can apply Lemma 3.3 to obtain
[TABLE]
This finishes the proof.
4 Conclusion
We proposed a set of primitives for topology adaptation that a server may use to adapt the network topology into any desired (weakly) connected state but at the same time cannot use to disconnect the network or to introduce new nodes into the system. So far, we only assumed that the server could act maliciously but that the participants of the network are honest and correct, i.e., they refuse any graph transformation commands beyond the four primitives. What, however, if some participants also behave in a malicious manner? Is it still possible to avoid Eclipse or Sybil attacks? It seems that in this case the only measure that would help is to form quorums of nodes that are sufficiently large so that at least one node in each quorum is honest.
Besides these security-related aspects, our results give rise to additional questions: For example, does the NP-hardness apply to any set of local primitives, or is there a set of local primitives that can transform arbitrary initial graphs much faster into arbitrary final graphs than the set considered in this work? Furthermore, is it possible to obtain decentralized versions of the algorithms presented in Section 3, and, if so, what is their competitiveness when compared to the centralized ones?
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Ajit Agrawal, Philip N. Klein, and R. Ravi. When trees collide: An approximation algorithm for the generalized steiner problem on networks. SIAM J. Comput. , 24(3):440–456, 1995. doi:10.1137/S 0097539792236237 . · doi ↗
- 2[2] Susanne Albers, Stefan Eilts, Eyal Even-Dar, Yishay Mansour, and Liam Roditty. On nash equilibria for a network creation game. In Proceedings of the Seventeenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2006, Miami, Florida, USA, January 22-26, 2006 , pages 89–98, 2006.
- 3[3] Noga Alon, Erik D. Demaine, Mohammad Taghi Hajiaghayi, and Tom Leighton. Basic network creation games. SIAM J. Discrete Math. , 27(2):656–668, 2013. doi:10.1137/090771478 . · doi ↗
- 4[4] Marc Andries, Gregor Engels, Annegret Habel, Berthold Hoffmann, Hans-Jörg Kreowski, Sabine Kuske, Detlef Plump, Andy Schürr, and Gabriele Taentzer. Graph transformation for specification and programming. Sci. Comput. Program. , 34(1):1–54, 1999. doi:10.1016/S 0167-6423(98)00023-9 . · doi ↗
- 5[5] James Aspnes and Yinghua Wu. O(logn)-time overlay network construction from graphs with out-degree 1. In Proceedings of the 11th International Conference on Principles of Distributed Systems, (OPODIS ’07) , pages 286–300, 2007.
- 6[6] Azrina Abd Aziz, Y. Ahmet Sekercioglu, Paul G. Fitzpatrick, and Milosh V. Ivanovich. A survey on distributed topology control techniques for extending the lifetime of battery powered wireless sensor networks. IEEE Communications Surveys and Tutorials , 15(1):121–144, 2013. doi:10.1109/SURV.2012.031612.00124 . · doi ↗
- 7[7] Andrew Berns, Sukumar Ghosh, and Sriram V. Pemmaraju. Building self-stabilizing overlay networks with the transitive closure framework. Theor. Comput. Sci. , 512:2–14, 2013.
- 8[8] Davide Bilò, Luciano Gualà, Stefano Leucci, and Guido Proietti. Locality-based network creation games. TOPC , 3(1):6:1–6:26, 2016. doi:10.1145/2938426 . · doi ↗
