DeepAI
Log In Sign Up

Simultaneous Visibility Representations of Undirected Pairs of Graphs

We consider the problem of determining if a pair of undirected graphs ⟨ G_𝖵, G_𝖧⟩, which share the same vertex set, has a representation using opaque geometric shapes for vertices, and vertical/horizontal visibility between shapes to determine the edges of G_𝖵/G_𝖧. While such a simultaneous visibility representation of two graphs can be determined efficiently if the direction of the required visibility for each edge is provided (and the vertex shapes are sufficiently simple), it was unclear if edge direction is critical for efficiency. We show that the problem is 𝖭𝖯-complete without that information, even for graphs that are only slightly more complex than paths. In addition, we characterize which pairs of paths have simultaneous visibility representations using fixed orientation L-shapes. This narrows the range of possible graph families for which determining simultaneous visibility representation is non-trivial yet not 𝖭𝖯-hard.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

01/17/2020

On Visibility Graphs of Convex Fans and Terrains

For two points in the closure of a simple polygon P, we say that they se...
08/21/2017

3D Visibility Representations of 1-planar Graphs

We prove that every 1-planar graph G has a z-parallel visibility represe...
04/13/2018

Recognizing Visibility Graphs of Polygons with Holes and Internal-External Visibility Graphs of Polygons

Visibility graph of a polygon corresponds to its internal diagonals and ...
07/03/2018

Ortho-polygon Visibility Representations of 3-connected 1-plane Graphs

An ortho-polygon visibility representation Γ of a 1-plane graph G (OPVR ...
02/16/2020

Computing Boundary Cycle of a Pseudo-Triangle Polygon from its Visibility Graph

Visibility graph of a simple polygon is a graph with the same vertex set...
01/24/2021

Recognizing Visibility Graphs of Triangulated Irregular Networks

A Triangulated Irregular Network (TIN) is a data structure that is usual...
08/23/2017

Limited Visibility Cops and Robbers

We consider a variation of the Cops and Robber game where the cops can o...

1 Introduction

A visibility representation of a graph is a set of disjoint geometric objects representing vertices chosen from a family of allowed objects (e.g., axis-aligned rectangles in the plane) where sees if and only if . Typically, the meaning of “sees” is that there exists a line segment (perhaps axis-aligned, perhaps positive width) from to that does not intersect for any other ; such a line segment is called a line-of-sight. Many different classes of visibility representations may be defined by changing the family of allowed objects and the meaning of “sees.” For example, bar visibility representations (BVRs) use horizontal line segments as vertices and vertical lines-of-sight for edges [9, 11, 21, 20, 7, 14, 15]; rectangle visibility representations (RVRs) use (solid) axis-aligned rectangles as vertices and axis-aligned lines-of-sight for edges [8, 22, 18, 2, 5, 16]; and unit square visibility representations (USVRs) use axis-aligned unit squares and axis-aligned lines-of-sight for edges [4]. The popularity of this type of graph representation lies partly in its potential applicability to problems in VLSI design and the production of readable representations of planar and non-planar graphs. Determining which graphs or families of graphs have visibility representations of a particular type is a fascinating area of research.

(a)
(b)
Figure 1: Left: A pair of graphs on the same vertex set. Red (light) edges are those of , while blue (darker) are those of . Right: A simultaneous visibility representation of using rectangles.

Our focus in this work is on the simultaneous visibility representation of pairs of graphs that share the same vertex set (see Fig. 1). A simultaneous visibility representation (SVR) of and is a visibility representation that, using vertical lines-of-sight, represents and, using horizontal lines-of-sight, represents . Streinu and Whitesides [19] describe a beautiful connection between a pair of directed planar graphs and their planar duals that determines if the pair has a directed simultaneous visibility representation using rectangles (a directed RSVR) , where an edge directed from to in or is realized by a low-to-high or left-to-right, respectively, line-of-sight from to . Evans et al. [13] extended this to the family of geometric objects called L-shapes, which are the union of two axis-aligned segments in the plane that share a common endpoint and come in four orientations: . They gave a polynomial time algorithm for determining if a pair of directed graphs has a directed simultaneous visibility representation using L-shapes, , in which the orientation of is given by (a directed -LSVR).

The complexity of determining if a pair of undirected graphs has a simultaneous visibility representation using L-shapes was stated as an open problem [13]. In this paper, we show (Section 3) that the problem is -complete. What is surprising about this result is the simplicity of the graphs for which the problem is hard: For L-shapes (and many other families of shapes including rectangles), one graph can be a set of disjoint paths and the other a set of disjoint copies of a tree with 3 leaves connected to a root by paths of length 2 (). For unit squares (and for translates of any specified connected shape with positive width and height), one graph can be a set of disjoint paths and the other a set of disjoint claws ().

This limits the families of graphs for which we can reasonably hope to efficiently determine a simultaneous visibility representation. We describe a linear time algorithm (Section 4) that can determine if a pair of undirected paths has a simultaneous visibility representation using L-shapes, all with the same orientation (an LSVR). The algorithm is quite simple but relies on characterizing those pairs of paths for which such a representation is possible. Note that determining the same question for representations using rectangles, unit squares, and L-shapes with more than one orientation is easy.

Our work has aspects of both visibility representation and simultaneous geometric graph embedding (SGE). SGE is the problem of deciding, given a set of planar graphs on the same set of vertices, whether the vertices can be placed in the plane so that each graph has a straight-line drawing on the placed vertices. As in our problem, SGE, which is -hard [12], asks to represent several specified graphs using one common vertex set representation. However, the hardness result for SGE does not directly imply hardness of deciding simultaneous visibility representation. Similarly, deciding if a graph has an RVR [18] or a USVR [4] is -hard, but since the input does not specify which edges should be realized as vertical versus horizontal lines-of-sight, the problems are quite different. Choosing how the graph should be split into vertical and horizontal parts is an additional opportunity (or burden) for deciding if these representations exist.

Rather than requiring the visibility representation to partition the edges of the graph in a prescribed manner between vertical and horizontal visibilities, Beidl et al. [1] require that the visibility edges (lines-of-sight) obey the same embedding as a prescribed embedding of the original graph, which may include edge crossings. They can decide if such a restricted RVR exists in polynomial time, and in linear time if the graph is 1-planar. Di Giacomo et al. [10] show that deciding if a similarly restricted ortho-polygon111a polygon whose edges are axis-aligned. visibility representation exists for a given embedded graph takes polynomial time as well.

2 Preliminaries

In this paper, we will assume that vertex shapes are connected and closed (rather than open) sets in the plane, and that lines-of-sight are 0-width (rather than positive-width) and exist between two shapes if and only if the corresponding vertices are connected by an edge. This implies that and must have strong-visibility representations [20] to have a simultaneous visibility representation. For visibility graphs, these choices make a difference since, for example, can be represented if lines-of-sight are positive-width (an -visibility representation) but does not have a strong-visibility representation [20]. However, for our results, we could adopt either model with only minor modifications to our proofs.

Let be an SVR of . Given a subset , we let . For a vertex , let and be the orthogonal projections of onto the -axis and -axis respectively. For a set of vertices , let and . Set , , , and . We write if , and similarly, if . We also use the shorthand for . What follows are three basic properties of visibility representations. See Fig. (a)a for an illustration of Property 2.

Note: For brevity, the following properties are stated for vertical visibility representations only but also hold for horizontal visibility representations by symmetry.

Property 1

In a (vertical) visibility representation of a graph , for any and any there exists a path in from to for some and such that for all .

Proof

Consider the intersection of and the infinite vertical line . Since this line intersects both and , there must be two vertices and such that and both intersect the line. Let be the sequence of vertices in that intersect the line in order along the line from to . and have an unblocked vertical visibility segment between them for all , which implies a path between and that connects and in .

Property 2

In a (vertical) visibility representation of a graph , if an endpoint of is strictly contained in and for , then there is a cycle in .

Proof

Since an endpoint of is strictly contained in , there exists and such that . By Property 1, there exists a path from to (following the vertical line through ) that, since , contains , and a path from to (following the vertical line through ) that does not contain . The union of these two paths contains a cycle.

Property 3

In a (vertical) visibility representation of a graph , if is the only path from to in and and are both above or both below for , then .

Proof

If , then by Property 1, there exists a path from to (following the vertical line through ) that, since and are both above or both below , does not include , a contradiction.

3 Hardness

In this section, we study the complexity of determining if a pair of undirected graphs has a simultaneous visibility representation. We consider two variants of this problem: (i) using unit squares (Section 3.1) and (ii) using rectangles (Section 3.2). Our techniques easily generalize to other connected shapes. In the case of L-shapes, our results settle an open question of Evans et al. [13].

To begin, we state two lemmas common to Sections 3.1 and 3.2 (see Fig. 2). We will use these lemmas to characterize how the gadgets used in our hardness proofs can be drawn.

(a)
(b)
Figure 2: Illustrations of Lemma 1 and 2 (Fig. (a)a and (b)b respectively). Lemma 1 says that a cut vertex will not nest222 is nested in if  at most two components induced by its removal. Lemma 2 states that disjoint subgraphs must not overlap.
Lemma 1

Let be a connected graph with a (vertical) visibility representation . If is a cut vertex whose removal from creates components then for at most two components .

Proof

Since is connected, intersects and if in addition , then since is connected, is a contiguous interval that strictly contains an endpoint of . If three components have this property then for two of them, say and , and strictly contain the same endpoint and thus contain a point . By Property 1, contains a path (following the vertical line through ) between and that does not contain , a contradiction.

Lemma 2

Let be a graph with a (vertical) visibility representation . If and are two components in then either 333 means for all and , or vice versa.

Proof

Since each component is connected, its -projection forms a contiguous interval. And yet since and are disconnected in , by Property 1, . Thus either , or vice versa.

3.1 USSVR recognition

In this section, we prove that determining if a pair of undirected graphs has a simultaneous visibility representation using unit squares (USSVR) is -complete. We reduce from the well-known -complete problem of Monotone Not-All-Equal 3SAT [17]. In this variant of 3SAT, every clause has three positive literals of which exactly one or two must be satisfied.

The main result of this section can be summarized as follows.

Theorem 3.1

Deciding if a pair of undirected graphs has a USSVR is -complete.

Figure 3: (red) and (blue) for Monotone Not-All-Equal 3SAT instance and a USSVR of . This USSVR encodes the truth assignment and , or vice-versa.

Construction. Let be an instance of Monotone Not-All-Equal 3SAT with clauses and variables . For convenience, let us denote the variables appearing in clause as and the corresponding literals as . We construct a pair of graphs and such that admits a USSVR if and only if is satisfiable.

Order and its literals according to the order in which they appear in . For each clause , we create a clause vertex and three literal vertices . Our reduction relies on two types of gadgets which we describe below.

Satisfiability Gadgets. For each clause , we construct a satisfiability gadget, denoted , by introducing edges for .

Consistency Gadgets. For each variable with corresponding literals (in order), we construct a variable consistency gadget, denoted , by introducing edges for all . Similarly, if are the clauses of (in order), we construct a clause consistency gadget, denoted , by introducing edges for all .

Intuitively, the satisfiability gadgets allow us to encode local constraints on the literals for each clause. We use this to enforce “not-all-equal” satisfiability. By contrast, the consistency gadgets allow us to encode global constraints that span multiple clauses; i.e., relating literals that correspond to the same variable. This completes our construction of ; see Fig. 3 for an example.

Correctness. Lemmas 3 and 4 establish the correctness of our reduction. Hence, since our construction of requires time, USSVR recognition is -hard. Note that every USSVR can be redrawn on an grid such that its visibilities are not changed by preserving the order of the endpoints in the and -projections of its unit squares [4]. This gives a certificate using polynomially-many bits that can be readily verified in polynomial time. Thus, USSVR recognition is -complete.

Lemma 3

If admits a USSVR, then is satisfiable.

Proof

Let be a USSVR for . We construct a truth assignment as follows. For every variable , we define

We claim that satisfies . To see this, let us consider any clause . By construction, is a cut vertex whose removal from creates three components, each containing one literal vertex that is adjacent to . Then by Lemma 1, for at least one such vertex, say , . But in fact, since is a USSVR, we have . Hence, for every , .

Applying Property 3, we see that and must not be both above or both below . Moreover, since every consistency gadget in our construction is a component of , Lemma 2 implies that for all variables , either , or vice versa. Therefore, either for , implying that satisfies exactly one literal in , or , implying that satisfies exactly two. By repeating this argument for all clauses in , we see that satisfies .

Lemma 4

If is satisfiable, then admits a USSVR.

Proof

Let be a truth assignment satisfying . To construct a USSVR for , we first represent and as two sets of intervals on the and -axes respectively. The construction of these intervals is as follows.

Suppose are the clauses of in order. For each clause , since satisfies exactly one or two of its literals, there must be one, say , that attains a unique truth value. We represent both and on the -axis by the interval . Moreover, assuming and are in order, we represent their corresponding literal vertices on the -axis as the intervals and respectively, for some positive but small .

Let be a bijection satisfying if and only if for each . For each variable consistency gadget , we represent its vertices on the -axis by the interval . We also represent the clause consistency gadget similarly, replacing with .

Observe that each vertex in is represented by two unit intervals, one on the -axis and one on the -axis. Thus, for each , we can define to be the Cartesian product of its two corresponding intervals. To see that this gives a valid USSVR for , we make three observations.

  1. Every gadget in (resp., occupies a contiguous interval on the -axis (resp., -axis) that is disjoint from the intervals of other gadgets.

  2. Every satisfiability gadget in for a clause is drawn such that blocks vertical visibility between and for .

  3. Every consistency gadget in is drawn as a horizontal stack of unit squares (in order from left to right) that share a -projection.

The first observation implies that no two gadgets in (resp., ) share an (unwanted) visibility. The next two observations mean that the implied visibilities for each gadget in and are realized exactly. Therefore, is indeed a valid USSVR for . See Fig. 3 for an example construction.

3.2 RSVR recognition

In this section, we present an alternate reduction to prove that determining if a pair of undirected graphs has a simultaneous visibility representation using rectangles (RSVR) is -complete. In contrast to the proof given in Section 3.1, here, we reduce from the well-known -complete problem of 3SAT [6].

A new reduction is needed since every pair of edge-disjoint caterpillar forests (as produced for the reduction in Section 3.1) has an RSVR due to Theorem 5 by Bose et al. [2].

Our modified construction is not much more complicated than before: one graph remains a set of disjoint paths while the other is a set of disjoint trees with 3 leaves connected to a root by paths of length 2. This slight modification allows us to prove the following theorem.

Theorem 3.2

Deciding if a pair of undirected graphs has an RSVR is -complete.

Figure 4: (red) and (blue) for 3SAT instance and an RSVR of . This RSVR encodes the truth assignment and .

Construction. Let be an instance of 3SAT with clauses and variables . As before, we denote the variables appearing in clause as and the corresponding literals as .

We adapt the gadgets used in Section 3.1 to this setting as follows. For each clause , we create three additional negated literal vertices and augment by introducing three edges for . Also, for each variable with corresponding literals (in order), we construct a negated variable consistency gadget, denoted , by introducing edges for all . See Fig. 4 for an example.

Correctness. Lemmas 5 and 6 establish the correctness of our reduction. Thus, by a similar argument to the one found in Section 3.1, RSVR recognition is -complete.

Lemma 5

If admits an RSVR, then is satisfiable.

Proof

Let be an RSVR for . If, for some variable , we have , or vice versa, we say that is positively-arranged in . We construct a truth assignment as follows. For each variable , we define

We claim that satisfies . To see this, let us consider any clause . By construction, is a cut vertex whose removal from creates three components, each containing one literal vertex and its negated counterpart. Then by Lemma 1, for at least one literal, say , we have . Hence, .

Applying Property 3, we see that and must not be both above or both below . Moreover, since the consistency gadgets in our construction are components of , Lemma 2 implies that their -projections must form disjoint intervals. Therefore, either , or vice versa. Thus, if (i.e., is positive), then is positively-arranged in ; otherwise, implies that is not positively-arranged in . In either case, satisfies . By repeating this argument for all clauses in , we see that satisfies .

Lemma 6

If is satisfiable, then admits an RSVR.

Proof

Let be a truth assignment satisfying . To construct an RSVR for , we first represent and as two sets of intervals on the and -axes respectively. The construction of these intervals is as follows.

Suppose are the clauses of in order. For each clause , we represent on the -axis by the interval . Next, for one of the satisfied literals in , say , we represent both and on the -axis by the interval . Finally, assuming that and are in order, we represent and on the -axis by the intervals and respectively, for some positive but small . Similarly, we represent and by the intervals and respectively.

Now, suppose are the variables of in an arbitrary order. For each variable , if , we represent the vertices in and on the -axis by the intervals and . Otherwise, if , we simply swap the intervals and proceed as before. Finally, we represent every vertex in on the -axis by the interval .

Observe that each vertex in is represented by two (nonempty) intervals, one on the -axis and one on the -axis. Thus, for every , we can define to be the Cartesian product of its two corresponding intervals. To see this gives a valid RSVR for , we make three observations.

  1. Every gadget in (resp., ) occupies a contiguous interval on the -axis (resp., -axis) that is disjoint from the intervals of other gadgets.

  2. Every satisfiability gadget in for a clause