# Retracting Graphs to Cycles

We initiate the algorithmic study of retracting a graph into a cycle in the graph, which seeks a mapping of the graph vertices to the cycle vertices, so as to minimize the maximum stretch of any edge, subject to the constraint that the restriction of the mapping to the cycle is the identity map. This problem has its roots in the rich theory of retraction of topological spaces, and has strong ties to well-studied metric embedding problems such as minimum bandwidth and 0-extension. Our first result is an O(mink, sqrtn)-approximation for retracting any graph on n nodes to a cycle with k nodes. We also show a surprising connection to Sperner's Lemma that rules out the possibility of improving this result using natural convex relaxations of the problem. Nevertheless, if the problem is restricted to planar graphs, we show that we can overcome these integrality gaps using an exact combinatorial algorithm, which is the technical centerpiece of the paper. Building on our planar graph algorithm, we also obtain a constant-factor approximation algorithm for retraction of points in the Euclidean plane to a uniform cycle.

## Authors

• 2 publications
• 1 publication
• 5 publications
• 21 publications
• 6 publications
• 3 publications
12/24/2018

### Planar graphs without pairwise adjacent 3-,4-,5-, and 6-cycle are 4-choosable

Xu and Wu proved that if every 5-cycle of a planar graph G is not simult...
08/04/2017

### Geometric Embedding of Path and Cycle Graphs in Pseudo-convex Polygons

Given a graph G with n vertices and a set S of n points in the p...
10/16/2017

### Longer Cycles in Essentially 4-Connected Planar Graphs

A planar 3-connected graph G is called essentially 4-connected if, for e...
07/07/2019

### Complexity of planar signed graph homomorphisms to cycles

We study homomorphism problems of signed graphs. A signed graph is an un...
10/18/2021

### Planar Median Graphs and Cubesquare-Graphs

Median graphs are connected graphs in which for all three vertices there...
04/21/2021

### The 1-1 algorithm for Travelling Salesman Problem

The Travelling Salesman Problem (TSP), finding a minimal weighted Hamilt...
04/29/2019

### The graphs behind Reuleaux polyhedra

This work is about graphs arising from Reuleaux polyhedra. Such graphs m...
##### 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

Originally introduced in 1930 by K. Borsuk in his PhD thesis [10], retraction is a fundamental concept in topology describing continuous mappings of a topological space into a subspace that leaves the position of all points in the subspace fixed. Over the years, this has developed into a rich theory with deep connections to fundamental results in topology such as Brouwer’s Fixed Point Theorem [30]. Inspired by this success, graph theorists have extensively studied a discrete version of the problem in graphs, where a retraction is a mapping from the vertices of a graph to a given subgraph that produces the identity map when restricted to the subgraph (i.e., it leaves the subgraph fixed). For a rich history of retraction in graph theory, we refer the reader to [28]. Define the stretch of a retraction to be the maximum distance between the images of the endpoints of any edge, as measured in the subgraph. We use stretch- retraction to mean a retraction whose stretch is ; in particular, a stretch- retraction is a mapping where every edge of the graph is mapped to either an edge of the subgraph, or both its ends are mapped to the same vertex of the subgraph111In the literature, a stretch-1 retraction is often simply referred to as a retraction or a retract [28]. Also, in many studies, a (stretch-1) retraction requires that the two end-points of an edge in the graph are mapped to two end-points of an edge in the subgraph. These studies differentiate between the case where the subgraph being retracted to is reflexive (has self-loops) or irreflexive (no self-loops). In this sense, our notion of graph retraction corresponds to their notion of retraction to a reflexive subgraph..

In this paper, we study the algorithmic problem of finding a minimum stretch retraction in a graph. This problem belongs to the rich area of metric embeddings, but somewhat surprisingly, has not received much attention in spite of the deep but non-constructive results in the graph theory literature. The graph retraction problem has a close resemblance to the well-studied -extension problem [11, 32, 34] (and its generalizations such as metric labeling [37, 13]), which is also an embedding of a graph to a metric over a subset of terminals with the constraint that each vertex in maps to itself. The two problems differ in their objective: whereas -extension seeks to minimize the average stretch of edges, graph retraction minimizes the maximum

stretch. The different objectives lead to significant technical differences. For instance, a well-studied linear program called the earthmover LP has a nearly logarithmic integrality gap for

-extension. In contrast, we show that a corresponding earthmover LP for graph retraction has integrality gap . A well-studied problem in the metric embedding literature that considers the maximum stretch objective is the minimum bandwidth problem, where one seeks an isomorphic embedding of a graph into a line (or cycle) that minimizes maximum stretch. In contrast, in graph retraction, we allow homomorphic maps222A homomorphic map is one where an image can have multiple pre-images, while an isomorphic map requires that every image has at most one pre-image. but additionally require a subset of vertices (the anchors) to be mapped to themselves.

From an applications standpoint, our original motivation for studying minimum-stretch graph retraction comes from a distributed systems scenario where the aim is to map processes comprising a distributed computation to a network of servers where some processes are constrained to be mapped onto specific servers. The objective is to minimize the maximum communication latency between two communicating processes in the embedding. Such anchored embedding problems can be shown to be equivalent to graph retraction for general subgraphs, and arise in several other domains including VLSI layout, multi-processor placement, graph drawing, and visualization [27, 26, 41].

### 1.1 Problem definition, techniques, and results

We begin with a formal definition of the minimum stretch retraction problem.

Given an unweighted guest graph and a host subgraph of , a mapping is a retraction of to if for all . For a given retraction of to , define the stretch of an edge to be , where is the distance metric induced by , and define the stretch of to be the maximum stretch over all edges of graph . The goal of the minimum-stretch graph retraction problem is to find a retraction of to with minimum stretch. We refer to the vertices of as anchors.

The graph retraction problem is easy if the subgraph is acyclic (see, e.g., [39]); therefore, the first non-trivial problem is to retract a graph into a cycle. Indeed, this problem is NP-hard even when is just a 4-cycle [20]. Given this intractability result, a natural goal is to obtain an algorithm for retracting graphs to cycles that approximately minimizes the stretch of the retraction. This problem is the focus of our work. While there has been considerable interest in identifying conditions under which retracting to a cycle with stretch 1 is tractable [25, 28, 48], there has been no work (to the best of our knowledge) on deriving approximations to the minimum stretch333One direct implication of the NP-hardness proof is that approximating the maximum stretch to a multiplicative factor better than two is also NP-hard..

We consider the following lower bound for the problem: if anchors and are distance in , and there exists a path of vertices in between and , then every retraction has stretch at least . This lower bound turns out to be tight when is acyclic, which is the reason retraction to acyclic graphs is an easy problem. However, this lower bound is no longer tight when is a cycle. For example, consider a grid graph where is the border of the grid. The lower bound given above says that any retraction has stretch at least . However, using the well-known Sperner’s lemma, we show that the optimal retraction has stretch at least .

Using just the simple distance based lower bound, we show that the gap on the grid is in fact the worst possible by giving a -approximation for the problem, where is the number of vertices of . Our algorithm works by first mapping vertices of the graph into a grid, then projecting vertices outward to the border from the largest hole in the grid, which is the largest region containing no vertices.

There is a deterministic, polynomial-time algorithm that computes a retraction of a graph to a cycle with stretch at most times the optimal stretch, where and are respectively number of vertices in the graph and cycle.

Our results for retracting a general graph to a cycle appear in Section 2. We also give evidence that the gap induced by Sperner’s lemma on a grid graph is fundamental, showing an integrality gap for natural linear and semi-definite programming relaxations of the problem. To overcome this gap, we focus on the special case of planar graphs, of which the grid is an example. Retraction in planar graphs has been considered in the past, most notably in a beautiful paper of Quilliot [40] who uses homotopy theory to characterize stretch-1 retractions of a planar graph to a cycle. Quillot’s proof, however, does not yield an efficient algorithm. In Section 3, we provide an exact algorithm for retraction in planar graphs by developing the gap induced by Sperner’s lemma on a grid into a general lower bound on the optimal stretch for planar graphs.

There is a deterministic, polynomial-time algorithm that computes a retraction of a planar graph to a cycle with optimal stretch.

Unfortunately, our techniques rely heavily on the planarity of the graph, and do not appear to generalize to arbitrary graphs. While we leave the question of obtaining a better approximation for general graphs open, we provide a more sophisticated linear programming formulation that captures the Sperner lower bound on general graphs as a possible route to attack the problem.

We also study natural special cases and generalizations of the problem, all of which are presented in the appendix due to space limitations. First, we consider a geometric setting, where a set of points in the Euclidean plane has to be retracted to a uniform cycle of anchors. By a uniform cycle of anchors we mean a set of anchors which are distributed uniformly on a circle in the plane. We obtain a constant approximation algorithm for this problem, by building on our planar graph algorithm, in Appendix C. We next consider retraction of a graph of bounded treewidth to an arbitrary subgraph, and obtain a polynomial-time exact algorithm in Appendix D. Finally, we apply the lower bound argument of [32] for -extension to show in Appendix E that a general variant of the problem that seeks a retraction of an arbitrary weighted graph to a metric over a subset of the vertices of is hard to approximate to within a factor of for any .

### 1.2 Related work

List homomorphisms and constraint satisfaction. The graph retraction problem is a special case of the list homomorphism problem introduced by Feder and Hell [20], who established conditions under which the problem is NP-complete. Given graphs , and for each , a list homomorphism of to with respect to is a homomorphism with for each .

Several special cases of graph retraction and variants of list homomorphism have been subsequently studied (e.g., [19, 28, 47, 48]). These studies have established and exploited the rich connections between list homomorphism and Constraint Satisfaction Problems (CSPs). Though approximation algorithms for CSPs and related problems such as Label Cover have been extensively studied, the objective pursued there is that of maximizing the number of constraints that are satisfied. For our graph retraction problem, this would correspond to maximizing the number of edges that have stretch below a certain threshold. Our notion of approximation in graph retraction, however, is the least factor by which the stretch constraints need to be relaxed so that all edges are satisfied.

-extension, minimum bandwidth, and low-distortion embeddings. From an approximation algorithms standpoint, the graph retraction problem is closely related to the -extension and minimum bandwidth problems [21, 8, 23, 46, 15, 43]. In the -extension problem, one seeks to minimize the average stretch, which can be solved to an approximation using a natural LP relaxation [11, 18]. In contrast, we give polynomial integrality gaps for the graph retraction problem. In the minimum bandwidth problem, the objective is to find an embedding to a line that minimizes maximum stretch, but the constraint is that the map must be isomorphic rather than that the anchor vertices must be fixed. In a seminal result [21], Feige designed the first polylogarithmic-approximation using a novel concept of volume-respecting embeddings. A slightly improved approximation was achieved in [16] by combining Feige’s approach with another bandwidth algorithm based on semidefinite-programming [8]. Interestingly, the minimum bandwidth problem is NP-hard even for (guest) trees, while graph retraction to (host) trees is solvable in polynomial time. Conversely, the bandwidth problem is solvable in time for bandwidth graphs [24], while graph retraction to a cycle is NP-complete even when the host cycle has only four vertices. Nevertheless, it is conceivable that volume-respecting embeddings, in combination with random projection, could lead to effective approximation algorithms for graph retraction to a cycle in a manner similar to what was achieved for VLSI layout on the plane [46].

Also related are the well-studied variants of linear and circular arrangements, but their objective functions are average stretch, as opposed to maximum stretch. Finally, another related area is that of low-distortion embeddings (e.g., [31]), where recent work has considered embedding one specific -point metric to another -point metric [36, 38, 5] similar to the graph retraction problem. But low-distortion embeddings typically require non-contracting isomorphic maps, which distinguishes them significantly from the graph retraction problem.

A related recent work studies low-distortion contractions of graphs [7]. Specifically, the goal is to determine a maximum number of edge contractions of a given graph such that for every pair of vertices, the distance between corresponding vertices in the contracted graph is at least a given affine function of the distance in . Several upper bounds and hardness of approximations are presented in [7] for many special cases and problem variants. While graph retraction and contraction problems share the notion of mapping to a subgraph, the problems are considerably different; for instance, in the graph retraction problem the subgraph is part of the input, and the objective is to minimize the maximum stretch.

## 2 Retracting an arbitrary graph to a cycle

In this section, we study the problem of retracting an arbitrary graph to a cycle over a subset of vertices of the graph. Let denote the guest graph over a set of vertices, with shortest path distance function . Let denote the host cycle with shortest path distance function over a subset of anchors.

Arguably, the simplest lower bound on the optimal stretch is the distance-based bound , since every retraction places a path of length in on a path of length at least in .

We now present our algorithm (Algorithm 1), which achieves a stretch of . Here, we give a high level overview of the algorithm. The first step of algorithm is to embed the input graph into a grid of size subject to some constraints. The second step is to find the largest empty sub-grid such that no point is mapped inside of and center of is within a desirable distance from center of grid . And final step is to project the points in grid to its boundary with respect to center of sub-grid .

We now show how to implement the first step of Algorithm 1. Our goal is to embed each vertex to some point in a grid such that for every , we have the following inequality, where denotes the distance between and . (That is, for two points and , .)

 d∞(g(u),g(v))≤ℓ(G,H)dG(u,v) (1)

Additionally, we require that is embedded to the boundary of the grid, such that adjacent anchors lie on adjacent grid points.

For every , we can find an embedding satisfying inequality 1.

###### Proof.

We incrementally construct the embedding . Initially, we place the anchors on the boundary of the grid so that the boundary is isometric to . (This can be done since is a cycle.) Since and , inequality 1 holds for all anchors and in .

We next inductively embed the remaining vertices of . Suppose we need to embed vertex , and vertices have already been embedded. Assume inductively that the embedding of the vertices of satisfies inequality 1 for the vertices in .

Let denote the ball around with radius (note that these balls are axis-aligned squares). Let be any point in . If we set , then inequality 1 holds for all points in . We now show that this intersection is nonempty (it is straightforward to find an element in the intersection). The set of axis aligned squares has Helly number 2444A family of sets has Helly number if any minimal subfamily with an empty intersection has or fewer sets in it.; therefore it is enough to show that for every , and intersect. Otherwise,

 d∞(g(u),g(u′))>ℓ(G,H)(dG(u,vi)+dG(u′,vi))≥ℓ(G,H)dG(u,u′).

This contradicts our induction hypothesis that the set of vertices in satisfies inequality 1, and completes the proof of the lemma. ∎

In the following lemma, we analyze the projection embedding step of the algorithm.

Suppose is the side length of the largest empty square inside . Then for any vertices and in , is at most .

###### Proof.

For any point , let denote the intersection of the boundary of and the ray from the center of passing through . Note that for any vertex in , is the anchor in nearest in clockwise direction to . We show that for any , the distance between and along the boundary of is at most .

We first argue that it is sufficient to establish the preceding claim for points on the boundary of , at the loss of a factor of . Let and be two arbitrary points in but not in the interior of . Let (resp., ) denote the intersection of (resp., ) and the boundary of . From elementary geometry, it follows that , where is the Euclidean distance; since and , we obtain . Since and , establishing the above statement for and implies the same for and , up to a factor of .

Consider points and on the boundary of . We consider three cases. In the first two cases, and are on the same side of . In the first case (Figure 0(a)), and are on the same side of the boundary of and segment is parallel to segment ; then, by similarity of triangle formed by , , and and the one formed by , and , we obtain that the distance between and is at most . In the second case (Figure 0(b)), and are on same side of the boundary of , and segment is orthogonal to segment . In this case, w.l.o.g. assume that is closer to center than with respect to distance. Let point be a point on segment such that segments and are parallel. From center extend a line parallel to segment until it hits the side of on which and are. Let be the intersection. Using elementary geometry and similarity argument, we have the following:

 |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯π(x)π(y)||¯¯¯¯¯¯¯¯¯¯¯¯¯zπ(y)|=|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯π(x)w||¯¯¯¯¯¯cw|≤k/4k/16=4 and % ¯¯¯¯¯¯¯¯¯¯¯¯¯zπ(y)¯¯¯¯¯¯xy=¯¯¯¯¯¯¯¯¯¯¯¯¯¯π(y)wr≤k4r

We thus obtain . For the third case (Figure 0(c)), we observe that is at least half the shortest path between and that lies within the boundary of . This latter shortest path consists of at most five segments, each residing completely on one side of the boundary of . We apply the argument of the first and second case to each of these segments to obtain that the distance between and is at most .

To complete the proof, we note that distance between anchor nearest (clockwise) to and anchor nearest (clockwise) to is at most one plus the distance between and . Therefore, the is at most . ∎

Algorithm 1 computes a retraction of to the cycle with stretch at most the minimum of and times the optimal stretch.

###### Proof.

By Lemma 2, the embedding satisfies inequality 1 for every and in . By a straightforward averaging argument, there exists a square of side length whose center is at distance at most from the center of and which does not contain for any in . By Lemma 2, the projection embedding ensures that for any and in , is at most . Since the distance in cannot exceed , the claim of the theorem follows. ∎

The Sperner bottleneck. Unfortunately, we cannot improve on the approximation ratio in Theorem 2 using only the distance-based lower bound. Consider the following instance: the guest graph is the grid, and the host is the cycle of formed by the vertices on the outer boundary of . It is easy to see that the distance-based lower bound has a value of on this instance. On the other hand, using Sperner’s Lemma from topology, we show that a stretch of is ruled out: The optimal stretch achievable for an -vertex grid is at least .

###### Proof.

Suppose we triangulate the grid by adding northwest-to-southeast diagonals in each cell of the grid. Consider the following coloring of the boundary with 3 colors. Divide into three segments, each consisting of a contiguous sequence of at least vertices; all vertices in the first, second, and third segment are colored red, green, and blue, respectively. Let be any retraction from to . Let denote the following coloring for : the color of is the color of . By Sperner’s Lemma [45], there exists a tri-chromatic triangle. This implies that there are two vertices within distance at most two in that are at least apart in the retraction , resulting in a stretch of at least . ∎

Note that in this instance, so the above lemma also rules out an approximation using the distance-based lower bound. A natural approach to improving the approximation factor is to use an LP or SDP relaxation for the problem. Indeed, the so-called earthmover LP used for the closely related -extension problem [32, 12] can be easily adapted to our minimum stretch retraction problem. Similarly, SDP relaxations previously used for minimum bandwidth and related problems [8, 44] can also be adapted to our problem. However, these convex relaxations also have an integrality gap of for precisely the same reason: they capture the distance-based lower bound but not the one from Sperner’s lemma on the grid (see Appendix A for a detailed discussion of these LP/SDP relaxations and integrality gaps).

In spite of these gaps, we show that the grid is not a particularly challenging instance of the problem. In fact, in the next section, we give an exact algorithm for retraction in planar graphs, of which the grid is an example. Retraction of planar graphs to cycles has been considered in the past, and non-constructive characterizations of stretch- embeddings were known [40]. Our constructive result, while using planarity extensively, suggests that there might be a general technique for addressing the Sperner bottleneck described above. Indeed, we give a candidate LP relaxation in Appendix A that captures the Sperner bound on the grid. Rounding this LP to obtain a better approximation ratio, or showing an integrality gap for it, is an interesting open question.

## 3 Retracting a planar graph to a cycle

The main result of this section is the following theorem. Let be a planar graph and a cycle of . Then there is a polynomial time algorithm that finds a retraction from to with optimal stretch. We begin by presenting some useful definitions and elementary claims in Section 3.1. We then present an overview of our algorithm in Section 3.2. Finally, we present the algorithm and its analysis, leading to the proof of Theorem 3.

### 3.1 Preliminaries

We begin with a simple lemma that reduces the problem of finding a minimum-stretch retraction to the problem of finding a stretch-1 retraction, in polynomial time. Formally, suppose we have an algorithm that, given graphs and either finds a stretch-1 retraction from to , or proves that no such retraction exists. Then, we can use this algorithm to find the minimum stretch embedding of into , using Lemma 3.1 below, whose straightforward proof is deferred to Appendix B. Let be the graph where we replace each edge with a path of edges. Clearly, can be computed in polynomial time. can be retracted to with stretch if and only if can be retracted in with stretch-1. The following lemma, proved in Appendix B, implies that degree-1 vertices can be eliminated. Without loss of generality, we can assume is 2-vertex connected.

Lemmas 3.1 and 3.1 apply to general graphs. In the rest of this subsection, we focus our attention on planar graphs. We note that all the transformations in Lemmas 3.1 and 3.1 preserve planarity of the graph. In 2-connected planar graph, every face of a plane embedding is bordered by a simple cycle. Finally, we can assume that there is a planar embedding of with bordering the outer face. If this is not the case, contains at least two connected components, which can each be retracted independently.

Next, we give some definitions related to planar graphs. We call triangulated if it is maximally planar, i.e., adding any edge results in a graph that is not planar. Equivalently, is triangulated if every face of a plane embedding (including the outer face) of has 3 edges. We will make use of the Jordan curve theorem, which says that any closed loop partitions the plane into an inner and outer region (see e.g. [2]). In particular, this implies that any curve crossing from the inner to the outer region intersects the loop. For some cycle in and a plane embedding of , we denote the subset of surrounded by as (including the intersection with itself). We say that is inside cycle of for a plane embedding if . If is inside , we also say that surrounds . In a slight abuse of notation, we say surrounds subgraph of for some fixed plane embedding, if surrounds the subset of on which is drawn in the plane embedding.

### 3.2 Overview of our algorithm

Consider some plane embedding of graph such that is the subgraph of bordering ’s outer face. We give a polynomial-time algorithm that finds a stretch-1 retraction from to or proves that none exists. Using Lemma 3.1, this immediately yields an algorithm that finds a minimum stretch retraction from to .

Fix a planar embedding of , let be defined as above, and let be a bounded face of . A key component of our algorithm is to find a suitable set of curves connecting to . Our aim is to find a set of curves in such that the following hold.

• Each curve begins at a distinct vertex of and ends at a distinct vertex of .

• The curves do not intersect each other.

• A curve that intersects an edge of either contains the edge, or intersects the edge only at its vertices.

• Each curve lies totally in .

We call curves with these properties valid with respect to . We argue that the curves partition (up to their boundaries being duplicated) into a set of regions. Each of these regions is defined by the subset of surrounded by the closed loop made up of two of the aforementioned curves, a single edge of , and a path on the boundary of .

Given a face and a set of curves valid with respect to , we can give a stretch-1 retraction from to . In essence, the curves partition the graph into regions such that all vertices in a particular region map to one of two end-points of a particular edge of . See Figure 2 for an illustration.

Of course, it is not obvious that a valid set of curves exists for a given face, and, if it does, how to compute it. We show that if the graph has a stretch-1 retraction, then there is some face with valid curves, and that we can efficiently compute them. Our algorithm (Algorithm 2) iterates over all faces in the graph, in each case finding the maximum number of valid curves it can with respect to that face. The number of valid curves we can find is the length of the shortest cycle surrounding . If the shortest cycle surrounding has length , then it is impossible to find more than valid curves with respect to : By the Jordan curve theorem, each curve must intersect , and by the definition, valid curves do not intersect each other and can intersect only at its vertices. Our construction of the valid curves shows that this is tight (i.e. we can always find curves). We show that if a stretch-1 retraction exists, then there is some face for which . Algorithm 2 gives an outline of the algorithm.

### 3.3 Algorithm and analysis

This section gives the details of various components of Algorithm 2, and provides a proof of correctness. The following is an outline of the rest of the section:

1. Lemma 3.3 shows how to compute a stretch-1 retraction using the valid curves in line 4 of Algorithm 2.

2. Next, Lemma 3.3 shows that if a stretch-1 retraction exists, there must be some face in the graph such that the smallest cycle surrounding has length .

3. Finally, Lemma 3.3 gives a construction of largest set of valid curves for a given face from line 2, and shows that the number of curves computed equals the length of the smallest cycle surrounding .

We begin by showing in Lemma 3.3 a somewhat obvious fact: A set of valid curves partition , and each region of the partition contains a single edge of . We then show in Lemma 3.3 that this partition can be used to produce a stretch-1 embedding. See Figure 2 for pictorial presentation of these two lemmas.

Let be a set of curves that are valid with respect to . Let denote the set of faces of excluding the outer face and . Then, each face is bordered by exactly 1 edge of , and every vertex of is in a unique face of .

###### Proof.

Consider the faces of . and still define faces since the paths fall in . Let be an edge of , and consider where is the path containing , is the path containing , and is the path on the boundary of between the vertices where and meet such that is not contained in . If and are both degenerate (i.e., each is empty), then . Otherwise is a simple cycle. We claim that defines a face. In particular, we show that the path contains no other vertex of path for all . Suppose it does and let be that vertex. Let be the vertex adjacent to on . Then , and so . The other end of path , call it vertex , is in , but . By the Jordan curve theorem, must cross . Since the graph is planar, must contain a vertex of , or . Any of these outcomes leads to a contradiction. ∎

Given a non-outer face and a set of curves that are valid with respect to , we can construct a stretch-1 retraction from to in polynomial time.

###### Proof.

Let be as defined in Lemma 3.3. For each vertex on , map to the unique vertex . Otherwise, map to or , where is the unique edge of contained in the same face of as . Fix a face of . Let be the unique edge of contained in . Any edge contained in also has , and so and are each mapped to either or . Thus, this retraction to has stretch 1. ∎

As mentioned earlier, we will show that our construction produces valid curves for face , where is the minimum length cycle surrounding . So we must show that if a stretch-1 retraction exists, there is some such that every cycle surrounding has length at least .

Fix a plane embedding of where defines the outer face of the embedding and suppose there is a stretch-1 retraction to . Then there exists a non-outer face such that every cycle surrounding has length at least .

###### Proof.

We prove a related claim that implies the statement in the lemma. Fix some stretch-1 retraction of to . Then there exists a non-outer face such that for every cycle in the set of cycles surrounding , and for each vertex , there is some vertex of mapped to . This implies that each of these cycles has length at least , since the statement says that vertices of are mapped to vertices of .

The claim is very similar to Sperner’s lemma, and the proof is similar as well. Let denote the retraction. We associate a score with each cycle of the graph: Order the vertices of the cycle in clockwise order, denoted . Consider the sequence . Let the score of be 0 to start. For each pair , we have: either , or and are adjacent in . If is clockwise of (i.e. if they are in the same order as on ), add 1 to the score of . If they are in counterclockwise order, subtract 1. If they are the same vertex, the score remains the same. If does not contain every vertex on the outer cycle, the score of must be 0, since each edge along the path is traversed exactly the same number of times in each direction. On the other hand, a cycle with a non-zero score must have a score that is divisible by .

Next, we claim that the score of cycle is the same as the sum of the scores of the cycles defining the faces contained in . To see this, consider the total contribution to the scores of these cycles from any fixed edge. If the edge is not in cycle , it is a member of exactly 2 faces contained in , and contributes either 0 to both faces, or to one and to the other. Edges in are each a member of just one face surrounded by . Therefore, the score of cycle is the same as the sum of scores of its surrounded faces. Since the score of cycle is , there must be some face that has non-zero score.

Finally, we show that there is some face with nonzero score such that every cycle surrounding the face also has nonzero score. Suppose this is not the case. Then, every face with a non-zero score is surrounded by a cycle with score 0, which implies that the sum of all scores of faces with non-zero scores is 0. This is a contradiction, since it implies that the sum of scores of all internal faces in the graph is 0. ∎

We complete the section by giving a construction of the largest set of valid curves with respect to some face , and show that the number of curves equals the length of the shortest cycle surrounding . Our curves will be disjoint paths in a supergraph of . It is necessary to relate the maximum number of disjoint paths to the length of the shortest cycle surrounding . The following lemma, proved in Appendix B, establishes this connection. We believe this lemma should be known, but cannot find it in the relevant literature.

Let be a triangulated graph. The graph induced by any minimum - vertex cut is the shortest simple cycle separating and .

If was already triangulated, we could compute a set of vertex disjoint paths from to (note that a set of vertex disjoint paths yields a set of valid curves). By Menger’s theorem and Lemma 3.3, we would find paths, where is the shortest cycle surrounding . may not be triangulated, so instead we could first triangulate and then compute the paths. However, the number of paths we find in this case is the length of the shortest cycle surrounding in the triangulation of , which may be smaller than . We prevent this from happening by producing a triangulation that adds vertices as well as edges.

Fix a planar embedding of with as the outer face, and let be other face. Then we can compute valid curves in polynomial time, where is the length of the shortest cycle surrounding .

###### Proof.

We build a triangulated graph from the planar embedding of . First, add vertices and edges to every face of , excluding the outer face and . We do this such that (1) every face except and the outer face is a triangle, and (2) the distance between any is preserved. From each face with more than 3 edges, we create one new face that has one fewer edge. One step of this iterative construction is shown in Figure 3.

Note that distances are preserved inductively, and we make progress by reducing the size of some face. The graph we produce has 3 edges bordering each face, except for the outer face and . In all, the number of vertices and edges added to each face of is polynomial in the number of edges bordering the face.

Finally, we add vertices and , and edges from to each vertex of and from to each vertex of . The resulting graph is triangulated, and we call this graph .

At this point, we can find the maximum set of vertex disjoint paths between and in , by setting vertex capacities to 1 and computing a max flow between and . Because we have preserved distances between vertices of in our construction of , the length of the minimum cycle surrounding must be . Therefore, the number of disjoint paths we find must also be . Finally, we claim that this set of disjoint paths from to in is a set of valid curves for . This is because is a subgraph of , and therefore the criteria for valid curves are still met after removing the vertices and edges of . ∎

We conclude by tying together the pieces of the section to show we proved Theorem 3.

###### Proof of Theorem 3.

Fix a face . By Lemma 3.3, we determine the set of disjoint paths from to where the surrounding minimum cycle is of length . By Lemma 3.3, there is a stretch-1 retraction only if there exists a face whose surrounding min-cycle is of length . So if there is no stretch-1 retraction, we find disjoint paths for all faces, and our algorithm returns “no”. Otherwise, there exists a face for which the surrounding min-cycle is of length , and this gives a set of valid paths. Then, by Lemma 3.3, the retraction that we construct has stretch 1. ∎

## 4 Open problems

Our work leaves several interesting directions for further research. First, we would like to determine improved upper and/or lower bounds on the best approximation factor achievable for retracting a general graph to a cycle. Second, we would like to explore extending our approach for planar graphs (Section 3) and Euclidean metrics (Appendix C) to more general graphs and high-dimensional metrics. Another open problem is that of finding approximation algorithms for retracting a general guest graph to an arbitrary host graph over a subset of anchor vertices, for which we have presented a hardness result in Appendix E.

## References

• [1] A.Y. Alfakih, A. Khandani, and H. Wolkowicz. Solving euclidean distance matrix completion problems via semidefinite programming. Comput. Opt. Appl., 12:13–30, 1999.
• [2] Mark Anthony Armstrong. Basic Topology. Springer Science & Business Media, 2013.
• [3] Sanjeev Arora, Carsten Lund, Rajeev Motwani, Madhu Sudan, and Mario Szegedy. Proof verification and the hardness of approximation problems. Journal of ACM, 45(3):501–555, 1998.
• [4] James Aspnes, David Kiyoshi Goldenberg, and Yang Richard Yang. On the computational complexity of sensor network localization. In Algorithmic Aspects of Wireless Sensor Networks: ALGOSENSORS, pages 32–44, 2004.
• [5] Mihai Badoiu, Kedar Dhamdhere, Anupam Gupta, Yuri Rabinovich, Harald Räcke, R. Ravi, and Anastasios Sidiropoulos. Approximation algorithms for low-distortion embeddings into low-dimensional spaces. In SODA, pages 119–128, 2005.
• [6] A. Barvinok. Problems of distance geometry and convex properties of quadratic maps. Discrete Computational Geometry, 13:189–202, 1995.
• [7] Aaron Bernstein, Karl Däubel, Yann Disser, Torsten Mütze Max Klimm, and Frieder Smolny. Distance-preserving graph contractions. In ITCS, 2018.
• [8] A. Blum, G. Konjevod, R. Ravi, and S. Vempala. Semi-definite relaxations for minimum bandwidth and other vertex-ordering problems. Theoretical Computer Science, 235(1):25 – 42, 2000.
• [9] Hans L. Bodlaender. A linear time algorithm for finding tree-decompositions of small treewidth. In STOC, pages 226–234, 1993.
• [10] Karol Borsuk. On retractions and related sets. PhD thesis, University of Warsaw, 1930.
• [11] G. Calinescu, H. Karloff, and Y. Rabani. Approximation algorithms for the -extension problem. SIAM Journal on Computing, 34(2):358–372, 2004.
• [12] Chandra Chekuri, Sanjeev Khanna, Joseph Naor, and Leonid Zosin. A linear programming formulation and approximation algorithms for the metric labeling problem. SIAM Journal on Discrete Math., 18:608–625, 2004.
• [13] J. Chuzhoy and J. S. Naor. The hardness of metric labeling. SIAM Journal on Computing, 36(2):498–515, 2006.
• [14] Julia Chuzhoy and Joseph (Seffi) Naor. The hardness of metric labeling. SIAM Journal on Computing, 36(5):1376–1386, 2006.
• [15] Chandan K. Dubey, Uriel Feige, and Walter Unger. Hardness results for approximating the bandwidth. Journal of Computer and System Sciences, 77(1):62–90, 2011.
• [16] John Dunagan and Santosh Vempala. On euclidean embeddings and bandwidth minimization. In APPROX-RANDOM, pages 229–240, 2001.
• [17] Tolga Eren, David Kiyoshi Goldenberg, Walter Whiteley, Yang Richard Yang, A. Stephen Morse, Brian D. O. Anderson, and Peter N. Belhumeur. Rigidity, computation, and randomization in network localization. IEEE INFOCOM, 4:2673–2684, 2004.
• [18] Jittat Fakcharoenphol, Chris Harrelson, Satish Rao, and Kunal Talwar. An improved approximation algorithm for the 0-extension problem. In SODA, pages 257–265, 2003.
• [19] T. Feder, P. Hell, P. Jonsson, A. Krokhin, and G. Nordh. Retractions to pseudoforests. SIAM Journal on Discrete Mathematics, 24(1):101–112, 2010.
• [20] Tomas Feder and Pavol Hell. List homomorphisms to reflexive graphs. Journal of Combinatorial Theory, 72(2):236 – 250, 1998.
• [21] Uriel Feige. Approximating the bandwidth via volume respecting embeddings. Journal of Computer and System Sciences, 60(3):510 – 539, 2000.
• [22] J. Graver, B. Servatius, and H. Servatius. Combinatorial rigidity. AMS, 1993.
• [23] Anupam Gupta. Improved bandwidth approximation for trees. In SODA, pages 788–793, 2000.
• [24] Eitan M. Gurari and Ivan Hal Sudborough. Improved dynamic programming algorithms for bandwidth minimization and the mincut linear arrangement problem. Journal of Algorithms, 5(4):531–546, 1984.
• [25] Geňa Hahn and Claude Tardif. Graph homomorphisms: structure and symmetry, pages 107–166. Springer Netherlands, 1997.
• [26] Mark D. Hansen. Approximation algorithms for geometric embeddings in the plane with applications to parallel processing problems. In FOCS, pages 604–609, 1989.
• [27] Stephan Held, Bernhard Korte, Dieter Rautenbach, and Jens Vygen. Combinatorial optimization in VLSI design. In Combinatorial Optimization - Methods and Applications, pages 33–96. 2011.
• [28] P. Hell and J. Nesetril. Graphs and Homomorphisms. Oxford Lecture Series in Mathematics and Its Applications. Oxford University Press, 2004.
• [29] Bruce Hendrickson. Conditions for unique graph realizations. SIAM Journal on Computing, 21(1):65–84, 1992.
• [30] J.G. Hocking and G.S. Young. Topology. Addison-Wesley series in mathematics. Dover Publications, 1961.
• [31] Matoušek J. Embedding finite metric spaces into normed spaces. volume 212. Springer, 2002.
• [32] H. Karloff, S. Khot, A. Mehta, and Y. Rabani. On eathmover distance, metric labeling, and -extension. SIAM Journal on Computing, 39(2):371–387, 2009.
• [33] Howard Karloff, Subhash Khot, Aranyak Mehta, and Yuval Rabani. On earthmover distance, metric labeling, and 0-extension. SIAM Journal on Computing, 39(2):371–387, 2009.
• [34] A. V. Karzanov. Minimum 0-extension of graph metrics. European Journal of Combinatorics, 19:71–101, 1998.
• [35] J. Mark Keil and Carl A. Gutwin. Classes of graphs which approximate the complete euclidean graph. Discrete Computational Geometry, 7(1):13–28, 1992.
• [36] Claire Kenyon, Yuval Rabani, and Alistair Sinclair. Low distortion maps between point sets. SIAM Journal on Computing, 39(4):1617–1636, 2009.
• [37] J. Kleinberg and É Tardos. Approximation algorithms for classification problems with pairwise relationships. Journal of the ACM, 49:616–639, 2002.
• [38] Jiří Matoušek and Anastasios Sidiropoulos. Inapproximability for metric embeddings into . In FOCS, pages 405–413, 2008.
• [39] R. Nowakowski and I. Rival. A fixed edge theorem for graphs with loops. Journal of Graph Theory, 3:339–350, 1979.
• [40] Alain Quilliot. A retraction problem in graph theory. Discrete Mathematics, 54(1):61 – 71, 1985.
• [41] Daniel Rotter and Jens Vygen. d-dimensional arrangement revisited. Information Processing Letters, 113(13):498–505, 2013.
• [42] Andreas Savvides, Chih-Chieh Han, and Mani B. Strivastava. Dynamic fine-grained localization in ad-hoc networks of sensors. In Mobile Computing and Networking (Mobicom), pages 166–179, 2001.
• [43] James B. Saxe. Dynamic-programming algorithms for recognizing small-bandwidth graphs in polynomial time. SIAM on Journal Matrix Analysis Applications, 1:363–369, 1980.
• [44] Anthony Man-Cho So and Yinyu Ye. Theory of semidefinite programming for sensor network localization. Mathematical Programming, 109(2-3):367–384, 2007.
• [45] E. Sperner. Neuer beweis für die invarianz der dimensionszahl und des gebietes. Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg, 6(1):265–272, 1928.
• [46] Santosh Vempala. Random projection: A new approach to VLSI layout. In FOCS, pages 389–395, 1998.
• [47] Narayan Vikas. Compaction, retraction, and constraint satisfaction. SIAM Journal on Computing, 33(4):761–782, 2004.
• [48] Narayan Vikas. A complete and equal computational complexity classification of compaction and retraction to all graphs with at most four vertices and some general results. Journal of Computer and System Sciences, 71(4):406 – 439, 2005.

## Appendix A Proofs for Section 2

### a.2 The Sperner bottleneck

In this section, we elaborate on the Sperner bottleneck and establish that natural LP and SDP relaxations for minimum-stretch retraction to cycles suffer from an integrality gap on this instance. Recall the definition of the Sperner bottleneck instance: the guest graph is the grid, and the host is the cycle of formed by the vertices on the outer boundary of . In Lemma 1, we used Sperner’s Lemma to show that the optimal stretch achievable for this instance is .

We now consider natural linear and semi-definite programming relaxations for the retraction problem, and show that each incurs an integrality gap of for the Sperner bottleneck.

Integrality gap of LP relaxation. A natural LP relaxation for graph retraction is the earthmover LP, which has the same constraints as the corresponding LP extensively studied for the -extension problem, but with a different objective of taking the maximum stretch, as opposed to the sum or the average of the stretches [32, 12]. For any

, we have a vector variable

, which is a probability distribution over the set of anchors (in

). The stretch of an edge is given by the earthmover distance between and , which can be computed as the minimum cost incurred in sending a unit flow from to in the metric . Here is the earthmover LP relaxation for the minimum-stretch retraction from to .

 min s xuj−xvj+∑i∈H((fuv)ij−(fuv)ji) = 0∀(u,v)∈E(G),∀j∈H ∑j∈Hxuj = 1∀u∈V ∑i∈H∑j∈HdH(i,j)(fuv)ij ≤ s∀(u,v)∈E x,f ≥ 0

We now show that the above LP has objective function value for the given instance. We partition the vertices of the grid into groups: for , the group denotes the set of vertices in the th square at distance from the geometric center of the grid. For any in , we set to be distributed evenly across a segment in the boundary of length . Thus, for instance, every vertex in is mapped to a segment of length , and every vertex in the boundary (which is ) is mapped to a segment of length 1 (i.e., to itself). The segments that the vertices in a specific group are mapped to are spaced out evenly across the boundary.

We establish that the earthmover distance between and for any neighbors and of the grid is . First, suppose and are in the same group. In this case, the minimum-cost flow that defines the earthmover distance involves sending a flow from vertices in one segment across the length of the segment to the same number of vertices in the other segment; since the distribution of and across their respective segments is even, this yields a cost of . A similar argument holds for edges where and are in adjacent groups.

Integrality gap of SDP relaxation. We now introduce an SDP relaxation, partly inspired by similar relaxations for bandwidth and related problems [8, 44]. Number the vertices of from to so that the vertices of are numbered through . Let denote an -dimensional vector representing vertex . For , let . Our SDP places the points on a sphere of radius (second constraint) such that the stretch of every edge is bounded (third constraint) and the vertices of all reside on a cycle (fourth constraint). The vertices of are forced to lie on a cycle using distance constraints, owing to the following elementary geometry claim that captures the rigidity of the cycle. It is used to show that if we fix the location of 3 points in a cycle on the plane, then every point on the cycle is uniquely specified by the distances to these 3 points. This ensures that the SDP is a valid relaxation of the problem of retracting to a cycle. Suppose we are given reals for all such that there exist points in , satisfying the property that is the distance between and , . Then, if , , and are not collinear, any sequence , of points in , for any , which satisfy the same distance properties must all lie on the same plane as , , and . And this point set is congruent to ’s.

###### Proof.

Since the distance of each point is defined relative to only three of the points , we can prove the uniqueness of existence of each for all with respect to independently. Thus, we only need to prove the following statement: Suppose we have three non-collinear points with -dimensional coordinates which lie on a 2-D plane and there is a point also in such that its distance from is . Then any point in -dimensional space with distance from is congruent to .

W.l.o.g, we assume that , , , and . The following equations hold:

 d21=(a1−x1)2+(a2−x2)2=(a1−y1)2+(a2−y2)2+y23+...+y2n (2) d22=(b1−x1)2+(b2−x2)2=(b1−y1)2+(b2−y2)2+y23+...+y2n d23=(c1−x1)2+(c2−x2)2=(c1−y1)2+(c2−y2)2+y23+...+y2n

Then we have:

 x1(b1−a1)+x2(b2−a2) = y1(b1−a1)+y2(b2−a2) x1(c1−a1)+x2(c2−a2) = y1(c1−a1)+y2(c2−a2)

Since we know coordinates of , are fixed. We thus obtain two lines.

 l1:(x1−y1)k1+(x2−y2)k2=0 l2:(x1−y1)k3+(x2−y2)k4=0

Note that and are two lines that have at least one common point . These equations have infinite solutions if the slopes of and are also the same; this would mean that , but then points would be collinear, contradicting our assumption in the lemma. This implies that for any point with distance from , and . Using equation 2, we obtain that , completeing the proof of the lemma. ∎

Here is an SDP LP relaxation for minimum-stretch retraction from to .

 min s vi⋅vj ≥ 0∀i,j∈{1,2,…,n} |vi| = k∀i∈{1,2,…,n} |vi−vj| ≤ s∀(i,j)∈E(G) |vi−vj| = 2ksin(πd(i,j)/k)∀i∈{1,2,3},j∈{1,2,…,k}

We now establish an integrality gap for the above SDP. The value of the SDP is since the grid can be embedded with constant distortion on the surface of a 3-dimensional hemisphere, with the boundary forming the great circle at the base of the hemisphere. The locations of the vertices in the 3-dimensional hemisphere yield the vectors that form a valid solution to the SDP, with stretch being the maximum distortion of the embedding, which is .

Lower bound on approximation ratio of Algorithm 1. We now show that for a variant of the grid instance, Algorithm 1 incurs stretch away from that of the optimal. Let denote the graph obtained after removing all interior column edges from a grid. We observe that there exists a retraction of to the cycle in the boundary with stretch 2. Each row of vertices of length can be mapped to the shorter of the two segments of the boundary connecting the end vertices of the row; this ensures no edge is stretched by more than a factor of 2. On the other hand, Algorithm 1 will find the largest empty square to be square of length 1, and any projection embedding from the center of such a square will map two neighbors in the square distance away from one another.

An alternative approach to overcoming the Sperner bottleneck. We now present a different linear programming based lower bound for minimum-stretch retraction that incorporates the topological aspects of retraction as captured by Sperner’s Lemma. The key idea behind the lower bound is that if there is a stretch- retraction from to a cycle of length , then no cycle in of length less than must “loop around” in . Formally, every -vertex cycle corresponds to a walk along . If , then since stretch of is at most , the length of this walk is less than , implying that the walk does not loop around .

We now formalize the above intuition in the following linear program. Let be an integer. Fix a direction for the undirected cycle , and refer to the directed cycle has . Fix one direction for each edge , such that edges in have all same direction as that of ; we use to refer to the directed edge. We also fix a direction for each cycle , and refer to the directed cycle as . Below, we use the notation to mean that is in the cycle and has the same direction as , and the notation to mean that the reverse of is in .

For any pair of the vertices and in , let denote the length of the unique path from to in . We define the directed distance from to to be , if ; and , otherwise. Note that the directed distance for any pair is in . Let denote the collection of all directed cycles with less than edges. Let represent the following linear program.

 x→e = 1∀→e∥→H ∑→e:→e∈→C,→e∥→Cx→e−∑→e:→e∈→C,→e∦→Cx→e = 0∀→C∈Cℓ

If there is a stretch- retraction from to a cycle in , then is feasible.

###### Proof.

Let be a stretch- retraction from to . For any edge , we set to be the directed distance from to . Then, for any edge in along the same direction as , we have , as required by the linear program. Consider any cycle in . Since the stretch of is , the total distance in the walk on induced by and is strictly less than . Since the walk returns to its starting point, it must be the case that the total directed distance in the walk equals 0. Therefore,

 ∑→e:→e∈→C,→e∥→Cx→e−∑→e:→e∈→C,→e∦→Cx→e=0∀→C∈Cℓ,

satisfying the remaining constraint of the linear program, and thus guaranteeing its feasibility. ∎

By Lemma A.2, the largest such that is infeasible is a lower bound on the optimal stretch achievable. It is easy to see that for the Sperner bottleneck instance, the largest such that is infeasible is , hence asymptotically matching the Sperner’s Lemma lower bound.

We now show that for any , can be solved in polynomial time, by providing a suitable separation oracle. The oracle would simply be one of the cycles of length less than for which the corresponding constraint is violated. We construct graph , which has the same set of vertices as and, for each edge in , have an edge between and in each direction. We set the weight for each directed edge in to be . If is the reverse of , then we set .

Let be a solution to the LP. Fix an edge