Presentation is loading. Please wait.

Presentation is loading. Please wait.

Planarity K4 (complete)

Similar presentations


Presentation on theme: "Planarity K4 (complete)"— Presentation transcript:

1 Planarity K4 (complete)
If a graph can be drawn as a polygon with diagonals, you can test for planarity. If two diagonals cross you may be able to leave one on the inside and move the other to the outside.

2 Perform the planarity algorithm for the Hamilton cycle ABDCEFA
Example Perform the planarity algorithm for the Hamilton cycle ABDCEFA STEP 1: Identify a Hamilton cycle. A B C D E F STEP 2: Redraw the graph with the Hamilton cycle as a polygon around the outside and the other edges as diagonals. Note: The order around the vertices should be the same as the H cycle.

3 Perform the planarity algorithm for the Hamilton cycle ABDCEFA
Example Perform the planarity algorithm for the Hamilton cycle ABDCEFA STEP 3: Write two columns for inside and outside the polygon B D Inside Outside A C BF AD DF AC DE AE F E So the graph is PLANAR ... because inside (green) lines don’t cross each other and outside (red) lines don’t cross each other.

4 Example Inside Outside BF ✔ AD ✔ DF ✔ AC ✔ DE ✔ AE ✔
STEP 4: Draw the planar version of the graph. Inside Outside B D BF AD DF AC DE AE A C F E So the graph is PLANAR ... because inside (green) lines don’t cross each other and outside (red) lines don’t cross each other.

5 Example This is the same problem but the edge CF has been added. Perform the planarity algorithm for the Hamilton cycle ABDCEFA STEP 1: Identify a Hamilton cycle. A B C D E F STEP 2: Redraw the graph with the Hamilton cycle as a polygon around the outside and the other edges as diagonals.

6 x Example Inside Outside BF ✔ AD ✔ DF AC ✔ DE AE CF
This is the same problem but the edge CF has been added. Perform the planarity algorithm for the Hamilton cycle ABDCEFA STEP 3: Write two columns for inside and outside the polygon B D Inside Outside A C BF AD DF AC DE x AE CF F E So the graph is NOT PLANAR ... because inside (green) lines CF and DE cross each other.

7 Use the planarity algorithm to determine whether this graph is planar
Example Use the planarity algorithm to determine whether this graph is planar STEP 1: Identify a Hamilton cycle. ABDEFGCHA H A B E F G STEP 2: Redraw the graph with the Hamilton cycle as a polygon around the outside and the other edges as diagonals. C D Note: The order around the vertices should be the same as the H cycle.

8 Use the planarity algorithm to determine whether this graph is planar
Example Use the planarity algorithm to determine whether this graph is planar ABDEFGCHA STEP 3: Write two columns for inside and outside the polygon A B Inside Outside D H AE HB AF HD BE CF E HG C G F So the graph is PLANAR ... because inside (green) lines don’t cross each other and outside (red) lines don’t cross each other.

9 Example Inside Outside AE ✔ HB ✔ AF ✔ HD ✔ BE ✔ CF ✔ HG ✔
STEP 4: Draw the planar version of the graph. Inside Outside A B AE HB H D AF HD BE CF E HG C G F So the graph is PLANAR ... because inside (green) lines don’t cross each other and outside (red) lines don’t cross each other.

10 Use the planarity algorithm to determine whether this graph is planar
Example Use the planarity algorithm to determine whether this graph is planar H A B E F G C D

11 Use the planarity algorithm to determine whether this graph is planar
Example Use the planarity algorithm to determine whether this graph is planar ABDEFGCHA STEP 3: Write two columns for inside and outside the polygon A B Inside Outside D H E C G F


Download ppt "Planarity K4 (complete)"

Similar presentations


Ads by Google