Skip to contents

Checks if a graph is planar and returns the coloring of the graph

Usage

PlanarColoring(arcSources, arcTargets, numNodes, algorithm = "fiveColoring")

Arguments

arcSources

Vector corresponding to the source nodes of a graph's edges

arcTargets

Vector corresponding to the destination nodes of a graph's edges

numNodes

The number of nodes in the graph

algorithm,

the algorithm to use. "sixColoring" generates a 6-coloring of the graph, while "fiveColoring" generates a 5-coloring. Default is "fiveColoring".

Value

A named list containing 1) "is_planar": a logical if the graph is planar, 2) "colors": the color of each vertex of the graph

Details

See https://lemon.cs.elte.hu/pub/doc/1.3.1/a00306.html for more information.