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
1
vote
1 answer

Checking for outerplanarity in graph using BOOST?

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
vote
1 answer

Algorithm for drawing planar graph

Is there an algorithm for drawing planar graph if I have list of his faces? I know there are some complex algorithms such as path addition and vertex addition, which test planarity and produce planar embedding but it's not what I'm looking for.
user3199693
  • 108
  • 3
  • 12
1
vote
0 answers

Edge addition complexity in planar graph?

I created a program that adds edges between vertices. The goal is to add as many edges as possible without crossing them(ie Planar graph). What is the complexity? Attempt: Since I used depth first search I think it is O(n+m) where n is node and m is…
1
vote
1 answer

Convex Polygons, Graphics Algorithms

Q.Why are convex polygons considered a better choice for designing graphics algorithms? My A. Convex polygons are planar and easier to clip. My answer is kind of brief and I am not sure if my answer is correct, can anyone else expand or give me a…
user1014888
  • 401
  • 2
  • 6
  • 13
0
votes
0 answers

Given the number of total nodes and degrees of each node, is it possible to construct a graph?

Take the cube as an example, there are 8 nodes and 12 edges, and each node is connected with 3 nodes. With networkx, I must input all the edges manually. For example, the following code is to construct a graph containing all the edges of an…
akarui
  • 1
  • 1
0
votes
0 answers

Construct PlanarEmbedding for boost graph planar_face_traversal

I have a planar graph defined by an adjacency matrix and a list of coordinates for each vertex. I know my graph is planar by definition, and I want to have a list of the faces for the graph. That led me to the function planar_face_traversal from the…
opp
  • 66
  • 4
0
votes
1 answer

6 color theorem on planar graphs recursive implementation

I'm practicing my recursion skills at the moment and came across the 6 color theorem that states: Every planar graph can be colored with 6 colors. That theorem follows from the observation that every planar graph G has a vertex v that as a degree of…
Ahiru
  • 15
  • 8
0
votes
0 answers

merge regions with same label in Voronoi diagram

I have a tessellation of the plane, obtained by applying scipy's Voronoi method to a list of 2D points. Each region has an integer label. Is there an easy way of recursively merge adjacent regions with the same label, until every pair of adjacent…
0
votes
0 answers

How to find an edge ordering (clockwise/counterclockwise) for a planar graph?

I'm trying to code an algorithm to get the faces of an undirected graph. The graph I receive in the input is known to be planar and biconnected. However, the graph's adjacency list isn't ordered in any way (clockwise or counterclockwise). I have…
LVB
  • 312
  • 3
  • 13
0
votes
1 answer

How to draw a planar graph from List of Strings in Java for a world map of the game

Basically, I have a game that has a big map existing out of 116 territories. Each territory has a name, some other properties and also an associated String[] with the names of its neighbour. Not every territory is connected to eachother ( I think a…
Sam Liemburg
  • 11
  • 1
  • 4
0
votes
1 answer

Pathfinding task - how can I find next vertex on the shortest path from A to B faster that O ( n )?

I have a quite tricky task to solve: You are given a N * M board (1 <= N, M <= 256). You can move from each field to it's neighbouring field (moving diagonally is not allowed). At the beginning, there are two types of fields: active and blocked. You…
Maras
  • 972
  • 7
  • 15
0
votes
2 answers

Weighted undirected graph partitioning

Given an undirected cyclic planar graph G(V,E) with vertex weights W(V), a fixed plane embedding E(G) and two nodes s and t, I need to find a partitioning of G that divides it into two connected components S(G) and T(G) with s being in S(G) and t…
Isolin
  • 647
  • 5
  • 18
0
votes
1 answer

Planar Embedding (Planar Face Traversal) Algorithm in C#

I have a graph G. The graph is a planar graph. I wish to find all the faces of the graph. I understand that constructing a planar embedding is the way to find the faces ( or regions, or cycles), such that all the edges must be shared by at most 2…
Graviton
  • 76,900
  • 138
  • 399
  • 575
0
votes
0 answers

How to find the 'outline' of a (concave) graph in 2D plane?

I have a connected graph in 2D plane composed of some vertices and some edges defined between them. The overall shape of the graph is not necessarily convex, i.e. the adjacent vertices on the convex hull are not always connected by an edge. Now is…
Niko
  • 217
  • 1
  • 7
0
votes
1 answer

Python Library for Boyer-Myrvold planarity test or Kuratowski subgraph identification

I am working with NetworkX Graphs in Python and I would like to find the Kuratowski subgraphs of any given graph which I have. The Boyer-Myrvold planar graph testing algorithm can return an existing Kuratowski subgraph if the graph is not planar…
patapouf_ai
  • 13,836
  • 11
  • 76
  • 121