Observed since 20 Oct, 19:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Compute the Approximate Chromatic Number for undirected graph encoded in DIMACS format.

This work builds upon The Adonai Algorithm.
The Minimum Chromatic Number Problem, more commonly known as the Graph Coloring Problem, is a classic problem in computer science and graph theory.
G = (V, E), where V is a set of vertices and E is a set of edges.c: V -> {1, 2, ..., k} that assigns a color (represented by an integer) to each vertex such that for every edge (u, v) ∈ E, the colors of the adjacent vertices are different: c(u) ≠ c(v).k for which such a coloring exists. This smallest number k is called the chromatic number of the graph, denoted by χ(G).Example: A map of countries can be modeled as a graph (each country is a vertex, and an edge exists between adjacent countries). The problem of coloring the map with the fewest colors so no two adjacent countries share a color is precisely the graph coloring problem. The famous Four Color Theorem proves that χ(G) ≤ 4 for any planar graph.
The decision version of the problem ("Given a graph G and an integer k, is χ(G) ≤ k?") is NP-complete.
k colors) can be verified in polynomial time by checking every edge to ensure its two vertices have different colors.This NP-hardness implies that there is no known algorithm that can find the chromatic number of an arbitrary graph in polynomial time. Finding the exact chromatic number for large graphs is computationally intractable.
Since finding the optimal solution is infeasible for large instances, much research focuses on approximation algorithms and heuristics.
The problem is notoriously hard to even approximate.
n^{1−ε} for any ε > 0, where n is the number of vertices.n^{0.9} * χ(G) colors, for example, would be a breakthrough.Despite the negative approximation results, many algorithms work well in practice for many graphs, though they offer no worst-case guarantees.
Greedy Coloring (and variants):
Δ(G) + 1, where Δ(G) is the maximum degree of any vertex. This can be very poor compared to the optimal value (e.g., for a star graph, Δ(G)+1 is low, but for a complete graph, it's optimal).DSatur (Degree of Saturation):
Using a Maximum Independent Set:
Advanced Methods:
The graph coloring problem is not just a theoretical puzzle; it has profound practical implications across numerous fields.
Input: A Boolean Adjacency Matrix $M$.
Answer: Find a Minimum Chromatic Number.
| c1 | c2 | c3 | c4 | c5 | |
|---|---|---|---|---|---|
| r1 | 0 | 0 | 1 | 0 | 1 |
| r2 | 0 | 0 | 0 | 1 | 0 |
| r3 | 1 | 0 | 0 | 0 | 1 |
| r4 | 0 | 1 | 0 | 0 | 0 |
| r5 | 1 | 0 | 1 | 0 | 0 |
The input for undirected graph is typically provided in DIMACS format. In this way, the previous adjacency matrix is represented in a text file using the following string representation:
p edge 5 4
e 1 3
e 1 5
e 2 4
e 3 5
This represents a 5x5 matrix in DIMACS format such that each edge $(v,w)$ appears exactly once in the input file and is not repeated as $(w,v)$. In this format, every edge appears in the form of
e W V
where the fields W and V specify the endpoints of the edge while the lower-case character e signifies that this is an edge descriptor line.
Example Solution:
Chromatic Number Found (4:0, 5:0, 2:1, 3:1, 1:2): An optimal coloring is achieved by assigning color 0 to nodes 4 and 5, color 1 to nodes 2 and 3, and color 2 to node 1.
pip install adonai
Clone the repository:
git clone https://github.com/frankvegadelgado/adonai.git
cd adonai
Run the script:
salve -i ./benchmarks/testMatrix1
utilizing the salve command provided by Adonai's Library to execute the Boolean adjacency matrix adonai\benchmarks\testMatrix1. The file testMatrix1 represents the example described herein. We also support .xz, .lzma, .bz2, and .bzip2 compressed text files.
Example Output:
testMatrix1: Chromatic Number Found (4:0, 5:0, 2:1, 3:1, 1:2)
This indicates a valid 3-coloring, meaning the graph's chromatic number is at most 3.
Use the -c flag to count the chromatic number:
salve -i ./benchmarks/testMatrix2 -c
Output:
testMatrix2: Chromatic Number Size 4
Display help and options:
salve -h
Output:
usage: salve [-h] -i INPUTFILE [-a] [-b] [-c] [-v] [-l] [--version]
Compute the Approximate Chromatic Number for undirected graph encoded in DIMACS format.
options:
-h, --help show this help message and exit
-i INPUTFILE, --inputFile INPUTFILE
input file path
-a, --approximation enable comparison with a polynomial-time approximation approach within a factor of at most 2
-b, --bruteForce enable comparison with the exponential-time brute-force approach
-c, --count calculate the size of the chromatic number
-v, --verbose anable verbose output
-l, --log enable file logging
--version show program's version number and exit
Batch execution allows you to solve multiple graphs within a directory consecutively.
To view available command-line options for the batch_salve command, use the following in your terminal or command prompt:
batch_salve -h
This will display the following help information:
usage: batch_salve [-h] -i INPUTDIRECTORY [-a] [-b] [-c] [-v] [-l] [--version]
Compute the Approximate Chromatic Number for all undirected graphs encoded in DIMACS format and stored in a directory.
options:
-h, --help show this help message and exit
-i INPUTDIRECTORY, --inputDirectory INPUTDIRECTORY
Input directory path
-a, --approximation enable comparison with a polynomial-time approximation approach within a factor of at most 2
-b, --bruteForce enable comparison with the exponential-time brute-force approach
-c, --count calculate the size of the chromatic number
-v, --verbose anable verbose output
-l, --log enable file logging
--version show program's version number and exit
A command-line utility named test_salve is provided for evaluating the Algorithm using randomly generated, large sparse matrices. It supports the following options:
usage: test_salve [-h] -d DIMENSION [-n NUM_TESTS] [-s SPARSITY] [-a] [-b] [-c] [-w] [-v] [-l] [--version]
The Adonai Testing Application using randomly generated, large sparse matrices.
options:
-h, --help show this help message and exit
-d DIMENSION, --dimension DIMENSION
an integer specifying the dimensions of the square matrices
-n NUM_TESTS, --num_tests NUM_TESTS
an integer specifying the number of tests to run
-s SPARSITY, --sparsity SPARSITY
sparsity of the matrices (0.0 for dense, close to 1.0 for very sparse)
-a, --approximation enable comparison with a polynomial-time approximation approach within a factor of at most 2
-b, --bruteForce enable comparison with the exponential-time brute-force approach
-c, --count calculate the size of the chromatic number
-w, --write write the generated random matrix to a file in the current directory
-v, --verbose anable verbose output
-l, --log enable file logging
--version show program's version number and exit
+ We present a polynomial-time algorithm that achieves an O(ln(n))-approximation for the Minimum Chromatic Number problem. This provides strong evidence that P = NP by efficiently solving a computationally hard problem with near-optimal solutions.
pypistats · 42 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-18 – 2026-10-18 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-17 – 2026-10-17 | 3 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-15 – 2026-10-15 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-11 – 2026-10-11 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-10 – 2026-10-10 | 10 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-09 – 2026-10-09 | 6 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-08 – 2026-10-08 | 3 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-06 – 2026-10-06 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-02 – 2026-10-02 | 5 | 2026-10-21T11:44:04.9080478Z |
| 2026-10-01 – 2026-10-01 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-30 – 2026-09-30 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-28 – 2026-09-28 | 3 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-27 – 2026-09-27 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-26 – 2026-09-26 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-25 – 2026-09-25 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-24 – 2026-09-24 | 3 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-23 – 2026-09-23 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-22 – 2026-09-22 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-19 – 2026-09-19 | 6 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-12 – 2026-09-12 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-10 – 2026-09-10 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-07 – 2026-09-07 | 7 | 2026-10-21T11:44:04.9080478Z |
| 2026-09-05 – 2026-09-05 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-31 – 2026-08-31 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-30 – 2026-08-30 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-24 – 2026-08-24 | 9 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-23 – 2026-08-23 | 3 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-20 – 2026-08-20 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-18 – 2026-08-18 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-14 – 2026-08-14 | 5 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-13 – 2026-08-13 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-09 – 2026-08-09 | 3 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-04 – 2026-08-04 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-03 – 2026-08-03 | 6 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-02 – 2026-08-02 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-08-01 – 2026-08-01 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-07-27 – 2026-07-27 | 2 | 2026-10-21T11:44:04.9080478Z |
| 2026-07-24 – 2026-07-24 | 1 | 2026-10-21T11:44:04.9080478Z |
| 2026-07-23 – 2026-07-23 | 2 | 2026-10-21T11:44:04.9080478Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.0.3 | 3 Jan 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:28ee19d65674ad23c5bd028414b4b5b4c14d7271af41f57534bbe4549d94c4d1