Graph Chromatic Number Calculator
Graph Chromatic Number Calculator computes the chromatic number of an undirected graph using a greedy coloring algorithm. Enter the graph as an adjacency list (e.g., “1:2,3; 2:1,3; 3:1,2” for a triangle). The calculator assigns colors to vertices, determines the chromatic number, shows steps with MathJax, and visualizes the graph with colored vertices using p5.js.
Graph Chromatic Number Calculator
This calculator computes the chromatic number of an undirected graph, the smallest number of colors needed to color the vertices such that no two adjacent vertices share the same color. Input the graph as an adjacency list (e.g., “1:2,3; 2:1,3; 3:1,2” for a triangle graph). The calculator uses a greedy coloring algorithm, assigns colors to vertices, displays steps with MathJax, and visualizes the colored graph with p5.js.
Example 1: Triangle Graph
Adjacency List: \\( 1:2,3; 2:1,3; 3:1,2 \\).
Result: Chromatic number = 3.
Example 2: Bipartite Graph
Adjacency List: \\( 1:3,4; 2:3,4; 3:1,2; 4:1,2 \\).
Result: Chromatic number = 2.