/
Introduction to  Graph drawing Introduction to  Graph drawing

Introduction to Graph drawing - PowerPoint Presentation

bagony
bagony . @bagony
Follow
343 views
Uploaded On 2020-06-22

Introduction to Graph drawing - PPT Presentation

Fall 2010 Battista G D Eades P Tamassia R and Tollis I G 1998 Graph Drawing Algorithms for the Visualization of Graphs 1st Prentice Hall PTR Planarity Testing Planarity testing ID: 783538

cycle graph piece pieces graph cycle pieces piece path planarity biconnected interlacement edges testing planar respect connected separating bipartite

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "Introduction to Graph drawing" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Introduction to Graph drawing

Fall 2010

Battista, G. D.,

Eades

, P.,

Tamassia

, R., and

Tollis

, I. G. 1998

Graph Drawing: Algorithms for the Visualization of Graphs

. 1st. Prentice Hall PTR.

Slide2

Planarity Testing

Slide3

Planarity testing

Count edges and check Euler's formula

Find

pieces

of G

For each piece P that is not a path

test planarity by recursion

Compute

interlacement graph

of the pieces

Test if the interlacement graph is

bipartite

Slide4

Planarity Testing

Graph is planar if and only if all its

connected components

are planar

A connected graph is planar if and only if all its

biconnected

components

are

planar

Slide5

Review

A graph is

connected

if there is a path between

u

and

v

for each pair (

u,v

) of vertices A cutvertex in a graph is a vertex whose removal disconnects the graph.A connected graph with no cutvertices is biconnected.A maximal biconnected subgraph of a graph is biconnected component.

Slide6

Decomposing the Graph into connected and

biconnected

components.

Our problem will be restricted to testing the planarity of

biconnected

graphs.

Use cycle to decompose a

biconnected

graph into

pieces.

Slide7

Piece P of a graph G with respect to path C

The

subgrap

induced

by the edges

of path C in

a class is called a

piece

of G with respect to C

v

6

v

7

v

9

v

8

v

2

v

1

v

3

v

4

v

5

v

7

v

9

v

8

v

2

v

1

v

5

v

7

v

9

v

8

v

2

v

1

v

5

Slide8

Partitioning into Pieces

Let a

biconnected

graph G contain a cycle C

Partition the edges of G not on C into classes:

Two edges of G are in the same class if there is a path between them that dose not contain any vertex of C.

Slide9

Sub graph induced by edges in a class is called a piece of G with respect to C.

Pieces consisting of a single edge between two vertices of C

Pieces consisting of a connected graph with at least one vertex not in C

Slide10

Attachments

Vertices of piece P which are also on cycle C are called attachments of P.

Each piece has at least two attachments. (why?)

Slide11

Separating cycle

Cycle C is

separating

if it has at least two pieces.

And it is

nonseparating

if it has one piece.

separating

nonseparating

Slide12

Lemma 3.4

Let G be a

biconnected

graph and C be a

nonseparating

cycle of G with piece P. If P is not a path then G has a separating cycle C’ consisting of

subpath

of C and a path of P.

separating

nonseparating

Slide13

Lemma 3.4 proof

Let u and v be 2 attachments of P that are

consecutive in the circular ordering.

Let

γ

be a subpath of C between u and v

without any attachments.

Since P is connected there is a

path

π in P between u and v.Let C’ be the cycle obtained from Cby replacing γ with π.Now γ is a piece on G with respect to C’Let e be an edge on P not π.e exist Because P is not a path.

So there is a piece of C’ other

than

γ

which contains e.

Thus C’ is a separating cycle in G.

C’

C

γ

π

e

Slide14

Interlacement

Each piece can be drawn either entirely

inside or outside of the cycle

Interlacing pieces are ones that can’t be drawn on the same side of C without crossing

Not interlace

Interlace

Slide15

Interlacement graph

Vertices are pieces on G with respect to cycle C

Edges are pairs of pieces that interlace (can’t reside on the same side of C without crossing).

Slide16

Interlacement to planarity

If G is planar graph then its interlacement graph must be

bipartite

P

3

P

5

P

2

P

1

P

6

P

4

Slide17

Theorem 3.8

A

biconnected

graph G with cycle C is planar

if and only if:

For each piece P of G with respect to C, the graph obtained by adding P to C is planar

The interlacement graph of the pieces of G with respect to C, is bipartite

Slide18

Planarity testing

Count edges and check Euler's formula

Find

pieces

of G

For each piece P that is not a path

test planarity by recursion

Compute

interlacement graph

of the piecesTest if the interlacement graph is bipartite

Slide19

Algorithm planarity testing

Input a

biconnected

graph G with n vertices and at most 3n-6 edges, and a separating cycle C.

Output an indication of whether G is planar

Compute the pieces of G with respect to C. (O(n))

Slide20

Algorithm planarity testing

For each piece P of G that is not a path:

Let P’ be the graph obtained by adding P to C

Let C’ be the cycle of P’ obtained from C by replacing the portion of C between two consecutive attachments with a path P between them

Apply the algorithm recursively to graph P’ and cycle C’. If P’ is

nonplanar

, return “

nonplanar

”. (O(n

2))

Slide21

Algorithm planarity testing

Compute the interlacement graph I of the pieces. (O(n

2

))

Slide22

Algorithm planarity testing

Test whether I is bipartite. If I is not bipartite return “

nonplanar

”. O(n

2

))

Return “planar”.

Slide23

Overall runtime

Each recursive invocation takes O(n

2

)

Each recursion is associated with at least one edge of G

There are O(n) edges

Runtime is O(n

3

)