1

I just conceptualy want to know how to check if a graph is outerplanar or not. I know you can check for planarity in graph using BOOST, how do you check for outerplanarity? hints?

LoveMeow
  • 3,136
  • 7
  • 37
  • 60

1 Answers1

0

Perhaps a bit too late to answer, but I hope this will still help you or anyone else stumbling upon this question.

To this day Boost still doesn't have any outerplanarity testing algorithm implemented, but it's actually quite simple to check for outerplanarity using Boost's planarity checks.

According to Manfred Wiegers' Recognizing outerplanar graphs in linear time article:

a graph G is outerplanar iff K1 + G (a new vertex is joined with all vertices of G) is planar.

So you need to add an additional vertex to the graph with edges connecting it to all vertices of the original graph and then check if the new graph is planar. If so, then the original graph is outerplanar.

Also note that each outerplanar graph with n vertices has less than 2n − 3 edges. Adding this edge count check could quickly filter out many obviously non-outerplanar graphs.

  • Hi, welcome to stackoverflow. Please describe the answers more. when you have a link in your answer, it is probable that the page get removed and your answer get useless for other people in the future – Ashkan Sirous Sep 05 '16 at 19:48