Global rigidity of (quasi)-injective frameworks on the line

A realization of a graph G is a pair (G, p) where p maps the vertices of G into Euclidean space Rd. The realization is injective if p is injective and quasi-injective if for each edge of G, p maps the endpoints of the edge to different points in space. The realization is globally rigid if any realization (G, q) in Rd with the same edge lengths is congruent to (G, p). In this paper we characterize graphs that have an injective (quasi-injective, respectively) non-globally rigid realization in R1, and we show that the problem of recognizing these graphs is NP-complete in both the injective and the quasiinjective cases. Our characterizations are based on the notion of NAC-colorings, which have been used previously to investigate similar problems in the plane. We also give an overview of related results and open problems in rigidity theory.


Introduction
A (bar-and-joint) framework in R d is a pair (G, p) where G = (V, E) is a (simple) graph and p : V → R d maps the vertices of G into Euclidean space. We also say that (G, p) is a realization of G. As the naming suggests, the vertices of the framework may be thought of as universal joints and the edges as rigid bars. A framework is rigid if it cannot be deformed continuously while keeping the bar lengths fixed. If this is true for non-continuous deformations as well, so that the bar lengths uniquely determine the configuration of the vertices in R d , then the framework is globally rigid. We can formalize these notions as follows.
Two frameworks (G, p) and (G, q) in R d are equivalent if for every edge uv ∈ E we have p(u) − p(v) = q(u) − q(v) , i.e. the corresponding edge lengths coincide in the two frameworks. If p(u) − p(v) = q(u) − q(v) holds for all pairs of vertices u, v ∈ V , then we say that the frameworks are congruent. A motion of a framework (G, p) in R d is a family of maps p t : V → R d , 0 ≤ t ≤ 1, continuous with respect to t, with p 0 = p and such that (G, p t ) is equivalent to (G, p) for all t. The motion is non-trivial if (G, p t ) and (G, p) are non-congruent for t > 0. If there exists a non-trivial motion of (G, p) then we say that it is flexible; otherwise it is rigid. We say that (G, p) is globally rigid if every equivalent framework (G, q) in R d is congruent to (G, p).
In general, it is NP-hard to decide the rigidity (global rigidity, respectively) of a framework in dimension d ≥ 2 (d ≥ 1, respectively) ( [1], [16]). On the other hand, for generic frameworks, in which the set of coordinates in p(v), v ∈ V is algebraically independent over Q, rigidity and global rigidity is completely determined by the structure of the underlying graph, so that either all generic realizations are rigid in R d (globally rigid in R d , respectively) or none of them are (see [3], [4], [6]). A characterization of graphs with generic (globally) rigid realizations is known in d = 1, 2 dimensions but is a major open problem in d ≥ 3 dimensions.
It is natural to also consider the family of graphs whose realizations in a given dimension are all (globally) rigid. However, if we do not make any non-degeneracy assumptions on the realizations in question, then these families turn out to be rather uninteresting. In particular, if a graph G has a pair of non-neighbouring vertices u, v, then a realization mapping u and v to distinct points and the rest of the vertices to a third point is flexible in R d , d ≥ 2 and non-globally rigid in R d , d ≥ 1. This suggests only considering injective frameworks, in which different vertices are mapped to different points in space. More leniently, we may only require that neighbouring vertices are mapped to different points (in other words, that the edge lengths are non-zero in the framework). We shall call such frameworks quasi-injective.
Thus, we are led to the question of characterizing graphs whose (quasi-)injective realizations in R d are (globally) rigid. In the case of rigidity, this problem can be easily settled in the d = 1 and d ≥ 3 cases 1 , while the d = 2 case is much more difficult. In [7], a combinatorial characterization was given for graphs that have a flexible quasi-injective realization in the plane in terms of the existence of a so-called NAC-coloring of its edges. In the case of injective realizations, only partial results are known. Graphs with no flexible injective realizations in the plane have been called absolutely 2-rigid graphs [14], or non-movable graphs [8]. In the latter paper, the authors give a necessary, but not sufficient, condition for movability that is also based on the notion of NAC-colorings.
Our aim in this paper is to examine the analogous questions regarding global rigidity. Here, the only non-trivial case is when d = 1: for a non-complete graph G with distinct non-neighbouring vertices u, v, we can construct a non-globally rigid injective realization in R d , d ≥ 2 by mapping the vertices other than u and v onto a line injectively, and mapping u and v to distinct points not on this line; then reflecting u through a hyperplane containing the line but not containing v gives an equivalent, non-congruent realization.
The d = 1 case turns out to be related to the planar rigidity case discussed above. In particular, a graph has a non-globally rigid quasi-injective realization in R 1 if and only if it has a flexible quasi-injective realization in R 2 (Theorems 2.1 and 2.2). As an analogue to Theorem 2.2, we also give a characterization of graphs that have a non-globally rigid injective realization in R 1 (Theorem 2.4). 2 This graph family, however, is not the same as the family of movable graphs; in fact, the former is a strict subset of the latter.
We also prove that in both the injective and quasi-injective case, the problem of recognizing such graphs is NP-complete. In the case of injective realizations this is simply done by reformulating the characterization given in Theorem 2.4 as a known NP-complete problem (Corollary 3.1), while in the case of quasi-injective frameworks, we prove that the 3-SAT problem can be polynomially reduced to the problem of deciding whether a graph has a NAC-coloring (Theorem 3.5).
The rest of this paper is laid out as follows. In Section 2 we recall the definition of NAC-colorings, as well as introduce grid-like frameworks and characterize graphs that have a non-globally rigid (quasi)-injective realization in R 1 in terms of these notions. In Section 3 we give the aforementioned hardness proofs. Finally, in Section 4 we consider more generally the type of questions studied in this paper. These questions have the form "which graphs have a non-degenerate realization with a given rigidity property?" A survey of these problems in the case of various non-degeneracy and rigidity notions is given in Tables 1 to 3, with the purpose of highlighting open problems.

NAC-colorings and grid-like frameworks
Let G be a graph. Following [7], we say that a 2-coloring of the edges of G is a NAC-coloring if both colors are used and no cycle has exactly one edge of a given color. We shall always refer to the two colors as red and blue. The name stands for "no almost (unicolored) cycles". As we shall see, NAC-colorings are related to the following, special kind of frameworks. Let us say that a framework (G, p) in R 2 is grid-like if each edge in (G, p) is either vertical or horizontal. We say that a grid-like framework is non-trivial if there is at least one horizontal and at least one vertical edge. More generally, we could define a grid-like realization to be one that uses exactly two directions, or exactly d directions in R d for d ≥ 2. However, a graph that has a grid-like realization in this broader sense also has one in the narrower sense. This follows from the observation that a non-trivial grid-like realization is always flexible: one can "fold" it onto the line (or, in the case of a d-dimensional grid-like realization, into a grid like-realization in R d−1 ).
The following is the main result in [7]. Since we shall use them, we recall the proof of the first two implications, but omit the third (which is the most difficult one). a) G has a NAC-coloring, b) G has a quasi-injective, non-trivial grid-like realization in R 2 , c) G has a quasi-injective realization in R 2 that is not rigid.
formulation, see [10, Theorem B.1]. Thus, our main contribution in the injective case is in clarifying its relationship with the quasi-injective case, as well as with the notions of NAC-colorings and grid-like frameworks.
Proof. a) ⇒ b) : Fix a NAC-coloring of G and let R 1 , ..., R k and B 1 , ..., B l be the vertex sets of the connected components of the subgraph of red and blue edges, respectively. We claim that the framework (G, Without loss of generality we may suppose that it is colored red. Then there cannot be a path of blue edges between u and v, since together with the edge uv this would give a cycle with precisely one red edge. This shows that (G, p) is quasi-injective. It is also clear that each red edge is vertical and each blue edge is horizontal, so that (G, p) is grid-like. Finally, it is non-trivial, since there exists at least one edge of both color classes.
b) ⇒ c) : As we have noted, non-trivial grid-like frameworks are always flexible; for completeness, we give a concrete example of their motion in R 2 . Let (G, p) be a quasi-injective, non-trivial grid-like realization in R 2 and let This preserves the edge lengths of (G, p): horizontal edges are only translated, while vertical edges are translated and rotated throughout the motion. The same observation shows that the angle between horizontal and vertical edges changes during the motion, so it is non-trivial.
The framework (G, p π/2 ) in the previous proof lies on a line in R 2 . We can also fold the framework into R 1 in the other direction via the motion p t , 0 ≥ t ≥ −π 2 . It is not difficult to see that if the grid was non-trivial, then these one-dimensional realizations are non-congruent. Thus we have that graphs with a NAC-coloring have quasi-injective non-globally rigid realizations in R 1 . It turns out that the reverse implication is true as well.
Theorem 2.2. A graph G has a quasi-injective realization in R 1 that is not globally rigid if and only if it has a quasi-injective non-trivial grid-like realization in R 2 .
Proof. ⇒: If G is not connected, then the statement is trivial since we can just draw one connected component of G on a vertical line in R 2 and the rest of the graph on a horizontal line to obtain a non-trivial grid-like realization. Thus, let us suppose that G is connected. Let (G, p) be a quasi-injective framework in R 1 and (G, q) equivalent, but not congruent to (G, p).
Consider the framework (G, p ) in R 2 defined by Let uv ∈ E be an edge. Since (G, p) and (G, q) are equivalent, we have that Moreover, it is non-trivial, since if (for example) every edge was horizontal, then p(u) − p(v) = q(u) − q(v) for all edges uv; but since G is connected, this would uniquely determine q up to translations, so (G, p) and (G, q) would be congruent, contradicting our original assumption. The same reasoning applies in the case when every edge is vertical. Finally, note that (G, p) and (G, p ) are equivalent, so (G, p ) is quasi-injective as well. ⇐: Let (G, p) be a quasi-injective non-trivial grid-like realization in R 2 and let us consider the mappings f, g : We claim that (G, f • p) and (G, g • p) are equivalent but non-congruent quasi-injective frameworks. Note that, using the notation in the proof of Theorem 2.1, f • p = p π/2 and g • p = p −π/2 . Thus, both frameworks are equivalent to (G, p). The fact that they are non-congruent follows from the fact that (G, p) is non-trivial: indeed, this implies the existence of vertices u, v of G with p(u) = (x u , y u ), p(v) = (x v , y v ) and such that x u = x v and y u = y v . Then it is easy to see that so (G, f • p) and (G, g • p) are non-congurent, as desired. We can also use NAC-colorings and grid-like frameworks to give an analogue of Theorem 2.2 for injective frameworks. The first implication in the following proof can be found in [8,Lemma 4.2]. b) ⇒ c): Let (G, p) be an injective non-trivial grid-like realization in R 2 . As in the proof of Theorem 2.2, the frameworks (G, f • p) and (G, g • p) are equivalent and non-congruent; we only need to make sure that (G, f • p) is injective. In other words, we need that x u + y u = x v + y v for any vertices u, v ∈ V with p(u) = (x u , y u ) and p(v) = (x v , y v ). We can ensure this by stretching (G, p) horizontally sufficiently, so that x u + y u = x v + y v implies y u = y v . Then we would have x u = x v as well, contradicting the assumption that (G, p) is injective.
The proof is the same as in Theorem 2.2, noting that if (G, p) is injective in R 1 , then the grid-like framework (G, p ) constructed in that proof is injective as well.
Note that in contrast to the quasi-injective case, Theorem 2.4 does not give a characterization of movable graphs, i.e. ones with an injective flexible realization in R 2 . Indeed, it is well-known that the complete bipartite graph K 3,3 is movable, while it is not difficult to see that it does not have an injective non-trivial grid-like realization in R 2 .

Hardness results
The characterizations given by Corollary 2.3 and Theorem 2.4 leave open the question whether the recognition of graphs with these properties is algorithmically tractable.
To be more precise, we may consider the following decision problems.

Problem. Has NAC-coloring.
Input: a graph G. Output: YES if G has a NAC-coloring, NO otherwise.

Problem. Has grid-like realization.
Input: a graph G. Output: YES if G has an injective non-trivial grid-like realization in R 2 , NO otherwise.
It turns out that both of these problems are NP-complete. In the case of Has gridlike realization, this can be shown by reformulating the problem in the following way. Given two graphs G, H, their Cartesian product, denoted by G H, is the graph on vertex set V (G) × V (H) in which there is an edge between the vertices (u 1 , v 1 ) and (u 2 , v 2 ) precisely if either u 1 = u 2 and v 1 v 2 ∈ E(H) or v 1 = v 2 and u 1 u 2 ∈ E(G). This graph can be visualized as a V (G) × V (H) grid in which each row is a copy of H and each column is a copy of G. The product K n K m is also called the m × n rook's graph. It is immediate from the definitions that for any graphs G and H, G H is a subgraph of the |V (G)| × |V (H)| rook's graph. A subgraph of G H is non-trivial if it is not contained in any row or column. A graph is said to be S-composite if it can be written as a non-trivial subgraph of G H for some graphs G and H; by the previous remark, we can equivalently consider non-trivial subgraphs of K n K m for some n, m ≥ 1. A graph is S-prime if it is not S-composite. The "S" in the name stands for "subgraph". Now a graph is S-composite if and only if it has an injective non-trivial grid-like realization in R 2 . Indeed, by adding all horizontal and vertical edges, any grid-like realization can be augmented to K n K m for some n and m, while the definition of K n K m immediately suggests a grid-like realization on the n × m grid. This gives the following corollary to Theorem 2.4. Thus, Has grid-like realization is equivalent to the following problem, shown to be NP-complete in [9].

Problem. Is S-composite.
Input: a graph G. Output: YES if G is S-composite, NO otherwise.
Corollary 3.3. The recognition of graphs that have a non-globally rigid injective realization in R 1 is NP-complete.
The rest of this section is devoted to showing that Has NAC-coloring is NPcomplete. First off, the following observation implies that this problem is in NP. We shall show that the well-known NP-complete 3-SAT problem can be reduced to Has NAC-coloring:

Problem. 3-SAT.
Input: A boolean formula ϕ in conjunctive normal form in which each clause contains at most three literals.
Output: YES if ϕ is satisfiable, NO otherwise.
Essentially the same reduction works for any boolean formula in conjunctive normal form, regardless of the number of literals in each clause. Proof. Given a 3-SAT instance ϕ with variables x 1 , ...x n and clauses L 1 , ..., L k , we shall construct a graph G ϕ of size O(n + k) such that ϕ is satisfiable if and only if G ϕ has a NAC-coloring. During the construction we shall label the edges of G ϕ with the literals x i and x i , as well as the true literal t and false literal f , in such a way that if two edges have the same label, then in any NAC-coloring of G ϕ they must have the same color. First, we shall create a number of disjoint edges and cycles, and then we connect some triplets of edges by gluing onto them a connecting element in a particular way. In the following, we will use the notation The construction goes as follows. First, take 2n + 2 disjoint edges with the labels t, f, x i , x i , i = 1, . . . , n; we shall refer to the edge with label x ε i i , ε i ∈ {−1, 1} as the terminal of the literal x ε i i ; similarly, the edges with labels t and f will be referred to as the true terminal and false terminal, respectively. Then for each variable x i we create two cycles A i and B i of lengths 5 and 4, respectively. We label the edges of A i with t, x i , x i , x i , x i in order and the edges of B i with t, f, x i , x i . Also, for each clause L i = {x ε 1 1 , x ε 2 2 , x ε 3 3 } we create a cycle C i of length 7 with edge labels t, x ε 1 1 , x ε 1 1 , x ε 2 2 , x ε 2 2 , x ε 3 3 , x ε 3 3 . Let G 0 denote the union of the cycles A i , B i , i = 1, ..., n and C j , j = 1, . . . , k.
Finally, we connect each edge in G 0 with the corresponding terminal via connecting elements, graphs isomorphic to the one depicted in Figure 1. Let e ∈ E(G 0 ) be an edge and let l denote the literal with which e is labeled. We attach a connecting element so that its bottom edge (as drawn in the figure) is e, its top edge is the terminal corresponding to l, and its left-most edge is the terminal corresponding to l (the negation of the literal). We shall refer to these three edges as the ends of the connecting element. We do this for each edge separately in G 0 . Denote the graph obtained in this way by G ϕ . Figure 1: (a) A connecting element, made up of a "prism graph" with three copies of K 4 attached to it. We shall refer to the labeled edges as the ends of the connecting element. (b) In a coloring of a connecting element with no almost unicolored cycles, each of the solid edges and each of the dotted edges must have the same color. In particular, if one of the edges has a given color, then either the top end or the left end has that color as well.
We would like to show that G ϕ has a NAC-coloring if and only if ϕ is satisfiable. Suppose first that there is a NAC-coloring δ : E(G ϕ ) → {blue, red} of G ϕ . We may assume that the true terminal is colored blue. Note that the construction of the connecting elements ensures that each edge labeled with the literal l must have the same color as the terminal corresponding to l (see Figure 1b). Now from the cycles A i , B j , C l we have the following properties of δ. c) Similarly, if the false terminal is colored red, then for each variable x i , the terminals of x i and x i must have different colors. d) Finally, in each clause L j there must be a literal x ε i i such that its terminal is colored blue, since otherwise C j would contain only one blue edge.
By definition, there must be at least one red edge in G ϕ . Note that each edge is contained in some connecting element, so, as shown in Figure 1b, one of the terminals must be red as well. Then a) and b) in the previous claim imply that the false terminal must be colored red. Now from c) it follows that the terminals of x i and x i have different colors. Consider the truth assignment in which x i is true if and only if its terminal has color blue under δ; claim d) implies that this truth assignment satisfies ϕ, as needed.
Now we work in the other direction. Given a truth assignment satisfying ϕ, we construct a coloring δ of G ϕ by coloring the terminals labeled with true literals (including t) blue and the rest of the terminals red, and then coloring the edges in each connecting element according to the colors of its end terminals as in Figure 1b. We claim that this is a NAC-coloring of G ϕ . To the contrary, suppose that there is an almost unicolored cycle C in G ϕ . For convenience, orient the edges of C cyclically.
It is immediate from the construction that δ is a NAC-coloring of each cycle A i , B j , C k and each connecting element, so C cannot be contained in either of these subgraphs. It follows that C must enter some connecting element K in the sense that there is an end uv of K and a vertex w not in K such that wu is an oriented edge of C. Now C must exit K through some vertex of an end of K. If it exits through v, then we can shortcut C through uv without destroying the almost unicolored property. Thus, we may assume that C enters and exits K at different ends. Then C must either enter and exit K twice, or enter and exit another connecting element as well. But a path that enters and exits a connecting element through different ends must contain edges of both colors, so the existence of two such (disjoint) paths contradicts the assumption that C is almost unicolored.
Corollary 3.6. The recognition of graphs that have a non-globally rigid quasi-injective realization in R 1 is NP-complete.

Concluding remarks
In this section we survey more generally the type of questions considered in this paper. These questions have the following general form: which graphs are such that, in a given dimensions, all realizations subject to a given non-degeneracy condition have a given rigidity property? Similarly, which graphs have, in a given dimension, a non-degenerate realization with a given rigidity property? In this paper we encountered three such non-degeneracy conditions (genericity, injectivity and quasi-injectivity), but there are other natural choices as well. One that has been considered in the literature before is general position: a framework in R d is in general position if no k + 1 points in it lie on an affine (k − 1)-dimensional subspace for all 1 ≤ k ≤ d. Note that in R 1 this notion coincides with injectivity.
These questions and their answers, where known, are catalogued in Table 1 in the case of rigidity and Table 2 in the case of global rigidity. The results without citations are either simple constructions, considered folkore, or can be found in this paper.
There is also a third rigidity notion, universal rigidity, which has received considerable attention in recent years. A framework in R d is universally rigid if it is globally rigid when viewed as a framework in R D for all D ≥ d. This form of rigidity is less wellbehaved than those considered in this paper in that the existence of a generic universally rigid realization of a graph G does not guarantee that every generic realization of G in the same dimension is universally rigid. Indeed, the former of these conditions is shown to be equivalent to G being globally rigid in [5]; on the other hand, no characterization is known for graphs that are "generically universally rigid", even in R 1 . See [12] for a discussion of this problem and several related conjectures. Questions related to universal rigidity are summarized in Table 3.  ∃ globally rigid generic realization ⇐⇒ ∀ generic realization is globally rigid 2-connected 3-connected and redundantly rigid [11] OPEN ∀ general position realization is globally rigid S-prime (co-NP-complete) OPEN ∀ injective realization is globally rigid S-prime (co-NP-complete) complete graph ∀ quasi-injective realization is globally rigid NAC-coloring (co-NP-complete) complete graph ∀ realization is globally rigid complete graph