|
Algorithms_in_C++
1.0.0
Set of algorithms implemented in C++.
|
prints the assigned colors using Graph Coloring algorithm More...
#include <iostream>#include <array>#include <vector>Namespaces | |
| backtracking | |
| Backtracking algorithms. | |
Functions | |
| template<size_t V> | |
| void | backtracking::printSolution (const std::array< int, V > &color) |
| template<size_t V> | |
| bool | backtracking::isSafe (int v, const std::array< std::array< int, V >, V > &graph, const std::array< int, V > &color, int c) |
| template<size_t V> | |
| void | backtracking::graphColoring (const std::array< std::array< int, V >, V > &graph, int m, std::array< int, V > color, int v) |
| int | main () |
prints the assigned colors using Graph Coloring algorithm
In graph theory, graph coloring is a special case of graph labeling; it is an assignment of labels traditionally called "colors" to elements of a graph subject to certain constraints. In its simplest form, it is a way of coloring the vertices of a graph such that no two adjacent vertices are of the same color; this is called a vertex coloring. Similarly, an edge coloring assigns a color to each edge so that no two adjacent edges are of the same color, and a face coloring of a planar graph assigns a color to each face or region so that no two faces that share a boundary have the same color.
| int main | ( | void | ) |
Main function
Driver Code