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.

65 questions
20
votes
5 answers

Generate a large random planar graph

What is the most efficient way to generate a large (~ 300k vertices) random planar graph ("random" here means uniformly distributed)?
15
votes
4 answers

How to check if a Graph is a Planar Graph or not?

I'm learning about the Planar Graph and coloring in c++. But i don't know install the algorithm to do this work. Someone please help me? Here i have some information for you! This is my code! And it still has a function does not finish. If someone…
Chelsea_cole
  • 885
  • 3
  • 13
  • 21
11
votes
1 answer

Minimize Cross Edges in a Graph

I am using networkx (a python graph-drawing package) http://networkx.lanl.gov/index.html for one of my project. Though networkx is pretty cool, the display function kind of sucks due to number of cross edges. Is there a way to minimize cross edges…
Anil Katti
  • 1,305
  • 1
  • 14
  • 26
11
votes
2 answers

Minimizing number of crossings in a bipartite graph

The following algorithm problem occurred to me while drawing a graph for something unrelated: We have a plane drawing of a bipartite graph, with the disjoint sets arranged in columns as shown. How can we rearrange the nodes within each column so…
Imre Kerr
  • 2,084
  • 10
  • 30
10
votes
2 answers

Planar Graph Layouts

What are some edge overlap minimization techniques when laying out a graph? (Preferably related to GraphViz) Also are there any existing software that can layout a graph in a planar fashion? Current Layout -…
jameszhao00
  • 6,903
  • 14
  • 54
  • 109
9
votes
3 answers

small cycle finding in a planar graph

I have a geometric undirected planar graph, that is a graph where each node has a location and no 2 edges cross, and I want to find all cycles that have no edges crossing them. Are there any good solutions known to this problem? What I'm planning…
BCS
  • 67,242
  • 64
  • 175
  • 277
8
votes
1 answer

Connect an even number of nodes without intersection

I have two sets of n nodes. Now I want to connect each node from one set with another node from the other set. The resulting graph should have no intersections. I know of several sweep line algorithms (Bentley-Ottmann-Algorithm to check where…
7
votes
1 answer

List of problems that are in general NP-hard but have polynomial-time solution in planar graphs?

I encountered many problems that can be formulated as graph problem. It is in general NP-hard but sometimes the graph can be proved to be planar. Hence, I am interested in learning these problems and the algorithms. So far as I know: Max cut in…
Ivan Xiao
  • 1,838
  • 3
  • 19
  • 29
7
votes
2 answers

Implementations of planar graphs/maps (with embeddings)

For the purpose of this post, by a plane graph, or a planar map, I will mean an abstract graph that can be drawn in the plane (or equivalently on the sphere), together with the circular order of the edges at every vertex according to a particular…
Lasse Rempe
  • 171
  • 5
6
votes
2 answers

Finding Hamiltonian cycles in cubic planar graphs

I have relatively small (40-80 nodes) cubic (3-regular) planar graphs, and I have to decide their Hamiltonicity. I am aware of the fact that this task is NP-complete, but I hope for asymptotically exponential time algorithms that are nevertheless…
6
votes
4 answers

Open Source Graph Drawing program supporting Planar graph testing?

In graph theory, a planar graph is a graph 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. Their are many algorithms which exist for planar graph testing (i.e.…
brian
  • 163
  • 1
  • 3
  • 10
5
votes
2 answers

Fastest Algorithm For Graph Planarization

I'm using Processing to develop a navigation system for complex data and processes. As part of that I have gotten into graph layout pretty deeply. It's all fun and my opinions on layout algorithms are : force-directed is for sissies (just look at it…
Cris Stringfellow
  • 3,582
  • 23
  • 44
5
votes
2 answers

D3js Force-directed graph link intersections avoid

There is an example of force-directed graph i've tried to draw with the help of the d3.js. I have 3 big questions at all. And this is the code (you can run code snippet below, it might works): function getRandomInt(max, min = 0) { return…
Nick_Rimer
  • 81
  • 1
  • 7
5
votes
1 answer

How to certify a planar embedding?

I am about to implement an algorithm for calculating a planar embedding. I have started to verify my results by running against a set of graphs (rome graphs) and comparing my results to the results of another implementation (yfiles). However, I can…
amoebe
  • 4,229
  • 4
  • 34
  • 38
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
  • 562
  • 2
  • 12
  • 24
1
2 3 4 5