Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate a large random planar graph

Tags:

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

like image 617
Marat Salikhov Avatar asked Jul 12 '10 20:07

Marat Salikhov


People also ask

How do you make a planar graph?

Well one method would be to try and generate a random graph which satisfies similar constraints as a planar graph (for instance, edges <= 3*vertices - 6) and check if it is planar in O(n) time using Tarjan's planarity testing algorithm. If it is not planar, generate again.

What is Euler's formula for planar graphs?

The equation v−e+f=2 v − e + f = 2 is called Euler's formula for planar graphs .

What is planar graph in CGT?

A planar graph is a graph that we can draw in a plane in such a way that no two edges of it cross each other except at a vertex to which they are incident.


1 Answers

Another possibility consists in randomly choosing coordinates and then compute a Delaunay Triangulation, which is a planar graph (and looks nice as well). See http://en.wikipedia.org/wiki/Delaunay_triangulation There are O(n log(n)) algorithms to compute such a triangulation.

like image 173
Ivo Blöchliger Avatar answered Oct 27 '22 18:10

Ivo Blöchliger