Presentation is loading. Please wait.

Presentation is loading. Please wait.

Great Theoretical Ideas In Computer Science

Similar presentations


Presentation on theme: "Great Theoretical Ideas In Computer Science"— Presentation transcript:

1 Great Theoretical Ideas In Computer Science
Planar Graphs Lecture 23 CS

2 A graph is called planar if it can be drawn in the plane in such a way that no two edges cross.
Example of a planar graph: The clique on 4 nodes.

3 Is K5 planar?

4

5 What about K3,3 ?

6 What about the intriguing object that I brought to class today?

7 The problem of drawing a graph in the plane arises frequently in VLSI layout problems.

8 Definition: When a graph is drawn in the plane with no crossed edges it is called a plane graph.
A plane graph cuts the plane into regions that we call faces. one face two faces

9 Question: Can you redraw this graph as a plane graph so as to alter the number of its faces?

10 This graph has 6 vertices 8 edges and 4 faces vertices – edges + faces = 2

11 This graph has 7 vertices 12 edges and 7 faces vertices – edges + faces = 2

12 Euler 1752 If G is a connected plane graph, then
vertices – edges + faces = 2 Let v = # of vertices e = # of edges f = # of faces

13 Proof: By induction on the # of cycles of G.
Base case: G has no cycles. G is connected so it must be a tree. Thus, e = v - 1 and f = 1.

14 Suppose G has at least one cycle C containing edge e.
Let v= # of vertices, e = # of edges, f  = # of faces exterior e interior G is connected since e was on a cycle. f = f-1 and G has fewer cycles than G. v= v e= e-1 By induction hypothesis:

15 Corollary: No matter how we redraw a plane graph it will have the same # of faces. Proof: f = 2 – v + e is determined by v and e, neither of which change when we redraw the graph.

16 Platonic Solids A Platonic solid has congruent regular polygons as faces and has the same number of edges meeting at each corner. Each one can be flattened into a planar graph: With constant degree: k and the same number of edges bounding each face: l

17 = Each edge belongs to 2 faces: By Euler’s formula:
# of edges coming from n vertex n = Each edge belongs to 2 faces: By Euler’s formula: and k,l  3 for physical reasons

18 The only solutions: tetrahedron cube octahedron dodecahedron icosahedron

19 Theorem: Every (simple) n-node planar graph G has at most 3n-6 edges.
Proof: n = 3: Clearly true. n  3: consider a graph G with a maximal number of edges. G must be connected or else we could add an edge. Thus Every face has at least 3 edges on its boundary. Thus Every edge lies on the boundary of at most 2 faces.

20 The Kuratowski Graphs

21 Corollary: K5 is not planar.
A planar graph on n = 5 nodes can have at most 3n-6 = 9 edges. Thus: K5 is not planar.

22 Fact: K3,3 is not planar either.
x y b c z When we redraw K3,3 , the yellow cycle will be laid out: a b c x y z

23 Insight 1. If we replace edges in a Kuratowski graph by paths of whatever length, they remain non-planar.

24 Insight 2 If a graph G contains a subgraph obtained by starting with K5 or K3,3 and replacing edges with paths, then G is non-planar.

25 Kuratowski’s Theorem [1930]
A graph is planar if and only if it contains no subgraph obtainable from K5 or K3,3 by replacing edges with paths.

26 Appel-Haken Four-Color Theorem [1976]
The vertices of any planar graph can be 4-colored in such a way that no two adjacent vertices receive the same color.

27 User Interface How many objects appear in the pink window?
(real-time response required) 2 4 3

28 Idea: View each rectangle as a mesh.
(mesh is planar) interior faces

29 Objects are placed on an n  n grid.
window border touches no nodes Data structure will contain: for each grid node # objects containing node for each grid edge # objects containing edge for each (interior) face #objects containing face

30 Partial Overlap of Window and Object
ignore object’s nodes and edges outside window

31 # of objects intersecting
node counts in edge counts in face counts in # of objects intersecting

32 Inclusion-Exclusion Speed-up!
store 3-tuple: sum of node counts in sum of edge counts in sum of face counts in

33 a b c d Node count in is a – b – c + d. d a b c 1 -1

34

35

36

37

38

39


Download ppt "Great Theoretical Ideas In Computer Science"

Similar presentations


Ads by Google