Questions tagged [planar-graph]

In graph theory, a planar graph is a graph that can be embedded in the plane without edge crossings.

In , a planar graph is a that can be embedded in the plane, i.e., it can be drawn on the plane in such a way that its edges intersect only at their endpoints. In other words, it can be drawn in such a way that no edges cross each other.

Testing whether a graph is planar or not is called planarity testing. Kuratowski's theorem states that a graph is planar if and only if it does not contain a subgraph that is a subdivision of K5 (the complete graph on five vertices) or K3,3 (the utility graph, a complete bipartite graph on six vertices, three of which connect to each of the other three). Such a subgraph is called a Kuratowski subgraph. There are many algorithms to determine whether a certain graph is planar, one of the best known of which is the Boyer-Myrvold algorithm in O(n) (where n is the number of vertices).

Use this tag if you have questions about planarity testing implementations, libraries, or planar graph issues more generally.

70 questions
5
votes
2 answers

Algorithm to make a simple graph planar

I want to know there is some algorithm that make a graph into planar graph ? I searched in Google I didn't find something that can help me
HinoHara
  • 572
  • 3
  • 13
  • 24
5
votes
4 answers

How to find the polygon enclosing a point from a set of lines?

I have a set of non-intersecting lines, some of which are connected at vertices. I'm trying to find the smallest polygon, if one exists, that encloses a given point. So, in the image below, out of the list of all the line segments, given the point…
Skyler
  • 909
  • 1
  • 10
  • 24
5
votes
2 answers

Fast algorithm to uncross any crossing edges in a set of polygons

I have a number of polygons each represented as a list of points. I'm looking for a fast algorithm to go through the list of polygons and uncross all of the crossed edges until no crossed edges remain. Psudocode for current version: While True: …
Nuclearman
  • 5,029
  • 1
  • 19
  • 35
4
votes
3 answers

Adjacency or Edge List to Faces

How to go from an edge list or adjacency list representation of a planar graph to a face list? For example, with this graph (which is not 0-indexed, oddly enough): I'd want a list that looks something like…
user4159038
4
votes
1 answer

Testing graph planarity in R

Is there a way of testing whether a network graph is planar in R? I've looked in igraph but to no avail. I know I can with MATLAB using BGL toolbox but I want to know if anyone has tried it in R.
Bonono
  • 827
  • 1
  • 9
  • 18
4
votes
1 answer

Algorithm for the Planarization of a non-planar Graph

Is there a popular algorithm for the planarization of a non-planar graph. I'm currently planning to implement a Orthogonal Planar Layout algorithm for undirected graphs in Boost ( Boost Graph Library ). BGL has an implementation to check the…
Ganesh
  • 350
  • 3
  • 8
4
votes
2 answers

Algorithm for a planar graph game

I am looking for an algorithm for the following task: We are playing the following game : There is a planar graph drawn in front of us, e.g. We can see the edges have intersected each other at 3 places. We are going to move the vertices without…
QED
  • 143
  • 5
3
votes
3 answers

Java algorithm for finding faces in a graph

I have a planar graph which I am creating myself. I want to find the faces of this graph but I can't find a working algorithm for doing so. What I've done so far is using an algorithm to find all the cycles in the graph but this gives me all…
Teh Swish
  • 99
  • 1
  • 12
3
votes
1 answer

How to find all the polygonal shapes of given the vertices?

I have a list of vertices and I know the connections between them. I am trying to find all the polygonal shapes of the vertices. These polygonal shapes should not overlap. I did some research and I thought that I could detect the polygonal shapes,…
onler
  • 63
  • 8
3
votes
1 answer

Calculate all possible connected planar graphs with "E" edge

I'm developing a c++ program which calculate and draw all possible connected planar graphs with given E number edge. Like this : My first thought was to find all possible solutions for the N edge by adding one edge to after finding the answer to…
3
votes
1 answer

Drawing small planar graphs with Graphviz

I drew a small planar graph with Graphviz but in one place there's an intersection of two edges. I read on SO that not all planar graphs can be drawn without intersections because it's an NP-hard problem. I also read that there aren't even…
user1
  • 945
  • 2
  • 13
  • 37
3
votes
0 answers

Complexity of existence of m-cycle in planar graph with n nodes

G is a planar graph with n nodes. What are the complexity of following problems? A: Does G contain a m-cycle? (m-cycle is a simple cycle with m nodes, m B: complexity of counting all m-cycles in G. what is the complexity of A and B if G is an…
marjoonjan
  • 141
  • 2
3
votes
0 answers

Draw the combinatorial embedding of a generic planar graph

I have the combinatorial embedding of a generic planar graph (vertices, edges, the cyclic ordering of edges around vertices and the external face) and I need to draw it. The vertices must be adimensional and the drawing must comply with the defined…
user2267134
  • 331
  • 2
  • 5
3
votes
1 answer

Representing knots in code?

So I have recently been reading some papers on the relationships of graph theory and knot theory, and that got me thinking about representing knots in code. My current intuition on this matter is to treat the knot as essentially a planar graph,…
adelbertc
  • 7,270
  • 11
  • 47
  • 70
2
votes
2 answers

Drawing a graph on the plane

I've got a hometask : To make the visualizer of planar graph embedding (or laying I don't know a correct word for this process). Planar graph is isomorphic to plane graph, and a plane graph is a graph drawn on the plane without intersections of its…
karlicoss
  • 2,501
  • 4
  • 25
  • 29