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
1
vote
0 answers

C# QuickGraph - Planar Graph Traversal - Faces

Is there a way to find faces of a graph using QuickGraph for C#, similar to the Planar Face Traversal function in the Boost C++ Graph Library? https://www.boost.org/doc/libs/1_51_0/libs/graph/doc/planar_face_traversal.html
kylev
  • 11
  • 1
1
vote
0 answers

An O(n * log(n)) algorithm for maximum st-flow in a directed planar graph (Borradaile, Klein)

Could someone explain to me using an example how Borradaile-Klein's algorithm for maximum flow works? http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.6392&rep=rep1&type=pdf There are a lot of Ford-Fulkerson's examples…
1
vote
1 answer

Bounding the number of edges between star graphs such that graph is planar

I have a graph G which consists only of star graphs. A star graph consists of one central node having edges to every other node in it. Let H1, H2,…,Hn be different star graphs of different sizes which are present in G. We call the set of all…
singhsumit
  • 964
  • 1
  • 9
  • 26
1
vote
1 answer

some questions on MST

I am learning the topic of Minimum-Spanning-Tree right now, and I understand the most of it, but I still have some things that I do not understand. I am dealing with undirected weighted graphs. First, I know that finding MST costs O(E*log V). Now, I…
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
  • 431
  • 2
  • 7
  • 14
0
votes
0 answers

Face recognition in planar graphs using OGDF library

It's been almost 2 weeks since I started to think about solution to that problem, as u probably see, without success ;) Recently I was experimenting with OGDF function for planar graphs, such as "computeFaces" in "ConstCombinatorialEmbedding" or…
0
votes
1 answer

Python: Remove intersecting line segments from graph until only the shortest of intersecting lines remains (remove dict from list of dicts)

Starting with the graph on the left, I would like to compare all of the lines, and anywhere they intersect (not counting the corners), keep only the shortest of the intersecting lines. I have the data on the lines stored as a list of dictionaries…
FRY-9C
  • 51
  • 6
0
votes
3 answers

Check if a set of puzzle pieces is forms a valid puzzle

I have a set of puzzle pieces (triangles and squares) of e.g. the form {[1, 2, 3, 4], [2, 4, 5], [1 , 3, 6]} Now, I want to check if these pieces can be put together on a grid. A valid layout would e.g be: A set of puzzles that would not have a…
nuemlouno
  • 288
  • 1
  • 10
0
votes
1 answer

Generate planar graph in C#

I am looking for a way to generate a random planar graph in C#. I've looked into some algorithms like Voronoi Diagram, Delaunay Triangulation and convex hull algorithms. They were quit useful and I managed to generate a graph but I am facing some…
Adam Q
  • 11
  • 1
0
votes
1 answer

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
  • 31
  • 3
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
  • 25
  • 8
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
  • 382
  • 4
  • 18
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
  • 982
  • 9
  • 15