On Visibility Graphs Joan P. Hutchinson Macalester …hutchinson/talks/HutchinsonU...On Visibility...

67
On Visibility Graphs Joan P. Hutchinson Macalester College, St. Paul, MN including work with Alice Dean Mike Jacobson Jeno Lehel Tom Shermer Andy Vince Doug West Using line segments (bars) rectangles circular arcs, and introducing the (new) visibility

Transcript of On Visibility Graphs Joan P. Hutchinson Macalester …hutchinson/talks/HutchinsonU...On Visibility...

On Visibility Graphs

Joan P. HutchinsonMacalester College, St. Paul, MN

including work withAlice Dean

Mike JacobsonJeno Lehel

Tom ShermerAndy VinceDoug West

Using line segments(bars) rectangles

circular arcs, and

introducing the(new) visibilitynumber

Using line segments(bars) rectangles

circular arcs, and

introducing the(new) visibilitynumber

Two algorithms and two (mini)-proofs

Overview

Visibility graphs:Vertices <---> geometric objects situ-

ated in some geometric space,Edges <---> mutual visibility without

obstruction

These are motivated by concepts in graphdrawing,

geometric questions,VLSI and circuit board design and lay-

out, andmathematical beauty.

Visibility graphs:Vertices <---> geometric objects situ-

ated in some geometric space,Edges <---> mutual visibility without

obstruction

These are motivated by concepts in graphdrawing,

geometric questions,VLSI and circuit board design and lay-

out, andmathematical beauty.

In !2 : • vertices of a polygon with internalvisibility,

• line segments with arbitraryvisibility

• horizontal line segments with verti-cal visibility <---> Bar - Visibility Graphs(BVGs) - here's K2,3.

1 2 3 40

1

2

3

4

5

6

80,1<

• "isothetic" rectangles with verticaland horizontal visiblity <---> Rectangle Visi-bility Graphs (RVGs)

• plus variations on these - for example, when no two bars or rect-

angles can have collinear ends, or when all bars have unit length or all

rectangles are unit squares.

• plus variations on these - for example, when no two bars or rect-

angles can have collinear ends, or when all bars have unit length or all

rectangles are unit squares. In other spaces:In !3 :

• "isothetic" rectangles lying inplanes z = constant, with vertical visibility<---> VR-representations

(Bose, Everett, Fekete, Lubiw, Meijer,Romanik, Shermer, Whitesides, 1994 )

(Alt, Godau, Whitesides, 1995)

On a cylinder, Möbius band, torus and Kleinbottle,

• line segments with one direction ofvisibilityOn the projective plane,

• concentric, circular arcs.

On a cylinder, Möbius band, torus and Kleinbottle,

• line segments with one direction ofvisibilityOn the projective plane,

• concentric, circular arcs.

pê6pê2

p

4pê3 5pê3eos

Bar-visibility graphs

Clearly these are planar, but not all planargraphs: Again, here's K2,3 :

1 2 3 40

1

2

3

4

5

6

80,1<

But, creating cut-vertices presents a problem.

Definition: A bar-visibility graph is onewhose vertices can each be represented by aclosed horizontal line segment in !2 ,

with segments disjoint and lying ondistinct horizontal lines, and

with two vertices adjacent in thegraph if and only if the correspondingsegments are vertically visible,

i.e., if there is a nondegeneraterectangle that intersects only these twosegments and whose horizontal sides aresubsets of these segments.

Here are two layouts of the 4-cycle C4 :

It's not hard to see that any cut vertex must berepresented on the exterior, infinite face inthe layout.Can every 2-connected planar graph berepresented?Yes!Theorem (Tamassia&Tollis;Wismath) G is aBVG iff it can be drawn in the plane with allcut-vertices on the exterior face.This can be proved by induction, but betteralgorithmically:

Every (planar) 2-connected graph hasan s-t numbering (Even & Tarjan). This s-tnumbering leads easily to an algorithm tolayout the graph, which in addition gives atesselation representation.

It's not hard to see that any cut vertex must berepresented on the exterior, infinite face inthe layout.Can every 2-connected planar graph berepresented?Yes!Theorem (Tamassia&Tollis;Wismath) G is aBVG iff it can be drawn in the plane with allcut-vertices on the exterior face.This can be proved by induction, but betteralgorithmically:

Every (planar) 2-connected graph hasan s-t numbering (Even & Tarjan). This s-tnumbering leads easily to an algorithm tolayout the graph, which in addition gives atesselation representation.

BVG Layout for G, drawn in the plane:• Find an s-t numbering of the

vertices of G• Direct edges from lower to higher

vertex-numbers• Direct the edges of the "dual" graph

using a clockwise rotation• Find an s-t numbering of the faces

of G that observes dual graph edgeorientation.

s-t numbering for 2-connected graphs:Choose two vertices on the infinite

face, s and t, and label(s)=1 and label(t)=n.Then label every other vertex v so

that it has neighbors (adjacent vertices) x andy with label(x)<label(v)<label(y).

108

5 3

12=t11

21=s

4

9

7 6

Then direct every edge from lower to higherlabel.Dual edges: each directed using a clockwiserotation.

10

3

fl >

s-t number the facesso that each dual edge goes from a

lower to higher labeled face.

Layout:the bar corresponding to the vertex

with label = i lies on the ith line of the layout(y = i), and

it spans (x-coordinates) from the leastlabel on an incident face to the largest labelon an incident face.

Layout:the bar corresponding to the vertex

with label = i lies on the ith line of the layout(y = i), and

it spans (x-coordinates) from the leastlabel on an incident face to the largest labelon an incident face.

1 2 3 4 5 6 7 8 9 10 11

1

2

3

4

5

6

7

8

9

10

11

12

Noncollinear bar-visibility graphs Definition: a noncollinear bar-visibilitygraph is one that can be laid out with no twoendpoints are collinear. Then C4 isn'tpossible.

Then a planar graph is a noncollinear BVG ifand only if by possibly duplicating existingedges the graph becomes a near-triangulationof the plane. (Luccio, Mazzone, Wong, 1987)

eos

Rectangle-visibility graphs

Motivated by a 1976 paper of Garey, Johnson,and So on using graph coloring to test forshort circuits in printed circuit boards.What if each electrically connectedcomponent (a net) forms or covers arectangular area?

What graphs can be achieved?

These graphs have thickness two, but not allthickness-two graphs are RVGs, shownbelow.

Every planar graph is an RVG (Wismath)

1 2 3 40

1

2

3

4

5

6

80,1<

It is an NP-complete problem to determine ifa given graph has thickness two (A.Mansfield).It is an NP-complete problem to determine ifa given graph is an RVG (T. Shermer). K8 is the largest thickness-2 complete graph(Tutte; Battle, Harary& Kodama).K8 is the largest complete RVG (much easierto prove).If G has thickness two, then e ≤ 6n - 12.If G is an RVG, then e ≤ 6n - 20 (H, Shermer& Vince)

Thus K9 with e = 6n - 18 > 6n - 20 isnot an RVG.

If G has thickness two, then e ≤ 6n - 12.If G is an RVG, then e ≤ 6n - 20 (H, Shermer& Vince)

Thus K9 with e = 6n - 18 > 6n - 20 isnot an RVG.

Idea of proof, using a layout-modificationalgorithm:

Take an RVG layout with n vertices and eedges.•Find the left-lying rectangle R whose rightedge is left-most.• Move R to the left of the configuration andexpand it to form a left border, spanning theheight of the array.

The resulting layout will have all of R'sprevious visibilities, plus possibly more, sothat the number of edges may increase.

• Repeat in all four directions.Then consider the resulting two BVGs:The vertical visibilities give a planar graphwith

e1 ≤ 3(n-2) - 6 + 4, andthe horizontal visibilities give a planar graphwith

e2 ≤ 3(n-2) - 6, so that in total we have e ≤ e + e ≤ 6n - 20.QED

And for each e ≤ 6n - 20, there is an RVG withn vertices and e edges:

It then follows easily that K9 is not an RVGsince K9 has

e = 6n - 18 > 6n - 20.It is known that K9 has thickness 3 andK9 - e thickness 2. K9 - e has 6n-19 > 6n-20 edges, giving anexample of a thickness-2, non-RVG graph.

On bipartite graphs (A. Dean & H, 1997),Km,nwith m ≤ n is an RVG iff m ≤ 4.

Every bipartite RVG has at most4n-12 edges (versus 4n-8 for generalthickness-2 bipartite graphs.)

Km,n has a noncollinear RVG layoutiff m ≤ 2, or m = 2 and n ≤ 4.

Many other classes are known and many areunknown.(Bose, Dean, H, and Shermer) A graph withcaterpillar arboricity at most 2 ( the edgedisjoint union of two caterpillar forests) is anoncollinear RVG.

G with D £ 3 is a noncollinear RVG.Question: What about D = 4?

It is a subgraph of an RVG, and is itself an RVG if the vertices of

degree D are suitably far apart.G a k-tree, k ≤ 4, is a noncollinear RVG (i.e.,G is either a k-clique or formed from anotherk-treeT by adding a new vertex adjacent toevery vertex of a k-clique in T.)

Suppose G is the union of two planargraphs? When is it an RVG?(Dean & H, 1998) G is an RVG if

• it is the union of a tree (or forest)and a depth-1 treeG is a subgraph of an RVG if

• it is the union of two depth-2 trees,or

• it is the union of a depth-3 tree anda matching.

G with D £ 3 is a noncollinear RVG.Question: What about D = 4?

It is a subgraph of an RVG, and is itself an RVG if the vertices of

degree D are suitably far apart.G a k-tree, k ≤ 4, is a noncollinear RVG (i.e.,G is either a k-clique or formed from anotherk-treeT by adding a new vertex adjacent toevery vertex of a k-clique in T.)

Suppose G is the union of two planargraphs? When is it an RVG?(Dean & H, 1998) G is an RVG if

• it is the union of a tree (or forest)and a depth-1 treeG is a subgraph of an RVG if

• it is the union of two depth-2 trees,or

• it is the union of a depth-3 tree anda matching.

My most favorite open question: What is thechromatic number of thickness-2 graphs?

9 ≤ ct ≤ 12.

What is the chromatic number of RVGs?

Our work with RVGs led us to ask aboutdoubly linear graphs (also said to havegeometric thickness two):A graph is said to be doubly linear if it can bedrawn as the union of two straight-edgedplanar graphs.

(H, Shermer, Vince, 1999) A doubly lineargraph has at most 6n-18 edges.There is a doubly linear graph with n verticesand 6n-20 edges for each n ≥ 8.

K5,5 and K5,6 are doubly linear graphs, butnot RVGs (though K5,5 - e and K5,5 + e areRVGs).QUESTION: Is every RVG doubly linear?

(Dillencourt, Eppstein, Hirschberg, 2000)have studied the geometric thickness ofcomplete and complete bipartite graphs. Thegeometric thickness is the minimum numberof planar layers needed to draw a graph withstraight lines in each layer.

thick(G) ≤ g-thick(G) ≤ book-thick(G).They show, for example, ` nÄÄÄÄÄÄÄÄÄÄÄÄ5.646 + 0.342p ≤ g - thickHKnL ≤ ` nÄÄÄÄÄ4 p.

eos

Visibility on surfaces

A nice place to draw bars:

-1-0.5

0

0.5

1 -1

-0.5

0

0.5

1

0

0.25

0.5

0.75

1

-1-0.5

0

0.5

1

BVGs can be drawn on the surface of acylinder in two ways:

with bars parallel to cylinder axis, andwith bars perpendicular to axis.

V V V V V V

In the former case, (Tamassia & Tollis) Aplanar graph is a cylindrical BVG iff

• it has an embedding in the planewhose block-cutface tree is a path iff

• its block-cutpoint tree is acaterpillar.Similarly they have a characterization for thelatter case (when full circles are and aren'tallowed).

(Mohar & Rosenstiehl, 1998) A 2-cellembedding of G on the torus is induced by aBVG layout iff G is "essentially 2-connected"...

V V

<

<

V V

<

<

(A. Dean, 2000) There are two types of BVGson the Möbius band, with bars parallel ororthogonal to the axis of the band.

Theorem. Those with intervals parallel to theaxes are graphs that have a 2-cell embeddingon the Möbius band,

whose block-cutpoint tree is acaterpillar,

in which all but at most one block isplanar, and

the non-planar block, if present, is atthe "head" of the caterpillar.

Theorem. Those with intervals orthogonal tothe axes are the same as "polar visibilitygraphs."

<

>

What happens with polar coordinates, ratherthan rectangular?

pê6pê2

p

4pê3 5pê3K6 as a PVG.

c

cb

b

a

a

d

d

e

e

>

<

Theorem. A 2-connected graph that embedson the projective plane is a PVG. G is a PVG iff

either it embeds on the plane with allbut at most one cut-vertex on the infinite face,

or it embeds on the projective planewith all cut-vertices on a common face.

The Visibility Number

You may have been thinking - don't theBVGs look like interval graphs?

We know lots about interval graphs, but theyare not always planar.(G is an interval graph iff it is a chordalgraph and GC is a comparability graph.)The interval number of a graph is theminimum number t such that a graph can berepresented with a vertex having at most tintervals and two vertices adjacent preciselywhen some interval representing oneoverlaps some interval of the other.

Theorem (Scheinerman&West, 1983) Aplanar graph has interval number at mostthree. (K2,9 may be the smallest needing 3.)

(Balogh & Pluhar, 1999) If G has e edges,then i(G) ≤ a è!!!eÅÅÅÅÅÅÅÅÅ2 q + 1.

Also i(G) £ $%%%%%%%%%%%%3 gHGLÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ2 + O(1).

We know lots about interval graphs, but theyare not always planar.(G is an interval graph iff it is a chordalgraph and GC is a comparability graph.)The interval number of a graph is theminimum number t such that a graph can berepresented with a vertex having at most tintervals and two vertices adjacent preciselywhen some interval representing oneoverlaps some interval of the other.

Theorem (Scheinerman&West, 1983) Aplanar graph has interval number at mostthree. (K2,9 may be the smallest needing 3.)

(Balogh & Pluhar, 1999) If G has e edges,then i(G) ≤ a è!!!eÅÅÅÅÅÅÅÅÅ2 q + 1.

Also i(G) £ $%%%%%%%%%%%%3 gHGLÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ2 + O(1).

The following is joint work with Y-W Chang,Jacobson, Lehel, and West

Definition: The visibility number of G is theminimum integer t such that each vertex of Gcan be represented by at most t bars in theplane, with two vertices adjacent preciselywhen there is visibility between one barrepresenting each.Here is a 2-bar representation of K9, athickness-3 graph.

9

4

4

6

8

1

7

3

1

3

6

2

5

7

2

8

9

5

Results:A planar graph and each RVG has visibilitynumber at most 2.Proof: By Wismath's result, each planar graphis an RVG.

Separate the edges of the RVG into its twoplanar parts, representing vertical andhorizontal visibility.

Move these apart, rotate one 90, and you'vegot two bars for each vertex. QED

bHKnL = ` nÄÄÄÄÄ6 pr ≤ bHKm,nL ≤ r+1 where r = ` mn+4ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ2 m+2 n pb(G) ≤ ` nÄÄÄÄÄ6 p+2; Conjecture b(G) ≤ ` nÄÄÄÄÄ6 p foreach graph with n vertices.

Proof that bHKnL = ` nÄÄÄÄÄ6 p for n ≥ 7.

Heawood's m-pire problem: Every m-pire canbe 6m-colored.(Jackson & Ringel, 1984), (Wessel, 1998) K6 mis an m-pire.

A 2-pire representation of K12 .

A 3-pire representation of K18 .

Take a planar m-pire graph G with 6mpairwise adjacent m-pires. G has 6 m2

vertices, divided into sets of m each, withevery pair of sets containing a pair ofadjacent vertices.This graph is 2-connected and so a BVG.Associating sets of m bars with the vertices ofK6 m , we get an m-bar representation of K6 m .QED

A 3-pire representation of K18 .

Take a planar m-pire graph G with 6mpairwise adjacent m-pires. G has 6 m2

vertices, divided into sets of m each, withevery pair of sets containing a pair ofadjacent vertices.This graph is 2-connected and so a BVG.Associating sets of m bars with the vertices ofK6 m , we get an m-bar representation of K6 m .QED

eot

VR-representations

There are natural generalizations to !3: • boxes with three directions of

visibility• parallel rectangles with orthogonal

visibility

(Bose, Everett, Fekete, Lubiw, Meijer,Romanik, Shermer, Whitesides, 1994 ) - RIPs?All planar graphs are VR-representable.Kn is VR-representable for n ≤ 20, but not forn ≥ 103.

(Alt, Godau, Whitesides, 1995) Suppose werepresent vertices by objects in !3and edgesby vertical visibility. What classes of objectsare universal, in the sense, that then allgraphs are so representable?

For no constant k is the class of k-sided polygons universal, but every graphwith n vertices can be represented bypolygons having at most 2n sides.

eos

ü abstract

We consider a variety of visibility graphs, related theorems and algorithms for their characterization and layout. We represent graphs in the plane by horizon-tal line segments (bars) with vertical visibility (bar-visibility graphs), by rectan-gles in the plane with horizontal and vertical visibility (rectangle-visibility graphs), and by arcs from concentric circles with radial visibility (polar visibil-ity graphs). We also venture into 3-dimensions using parallel rectangles with upward visibility, onto the cylinder, the Möbius band, and the torus with paral-lel line segments and orthogonal visibility. In some of these depictions a graph characterization is given, for others the problem is NP-complete. Finally we introduce the "visibility number" of a graph, the minimum t with which verti-ces can be represented each by t or fewer bars in the plane and edges by vertical visibility; we study how this parameter performs on familiar graphs. These results include joint work with P. Bose, Y-W. Chang, A. Dean, M. Jacobson, J. Lehel, T. Shermer, A. Vince, and D. West.

V V<

<

pê6pê2p

4pê3 5pê3

ü abstract graphics