How this calculation works
Maximize the number of colors in a proper coloring that realizes every pair of distinct colors on some edge.
ψ(G)=max |colors| subject to c(u)≠c(v) for uv∈E and ∀a≠b ∃uv∈E with {c(u),c(v)}={a,b}.A worked example
The path 1–2–3–4 has the complete proper coloring (1,2,3,1), so ψ=3. Four colors would require six color-pair edges, exceeding its three edges.
Good to know
Simple graphs with 1–10 vertices. Enumerate canonical restricted-growth color partitions, reject monochromatic edges and check every pair of used colors. Exact maximum plus one complete coloring and edge witness per color pair;2,000,000-state cap, unresolved on exhaustion.
Reference: Harary and Hedetniemi, The achromatic number of a graph (opens in a new tab) ↗
Describe a simple graph
Enter a symmetric zero-diagonal matrix for a graph with one through ten vertices. A one indicates an undirected edge. Vertex labels specify where colors will be assigned; they are not preassigned colors. The graph may be disconnected, and isolated vertices still require a color in the returned coloring.
The input contains no requested color count because the goal is to find the largest feasible count. A complete family of color pairs is tested only among colors actually used. Renaming all colors preserves a coloring, so the enumeration chooses canonical color labels to avoid exploring the same partition repeatedly.
Compare this with the Graph Grundy number calculator with a worst case greedy vertex order. Maximize color classes in a proper coloring such that every pair of colors occurs on an edge. Existing Grundy demands that each vertex of color c has neighbors of all smaller colors in a greedy order; complete-color-pair coverage is a different global constraint.
Proper and complete are separate requirements
A proper coloring prohibits equal colors at adjacent vertices. A complete coloring additionally requires an edge joining every pair of distinct used colors somewhere in the graph. Completeness refers to the color-pair coverage, not to every vertex meeting every other color and not to the underlying graph being complete.
Both requirements matter. Giving every vertex a fresh color is always proper, but usually fails completeness. Giving many nonadjacent vertices one color might preserve properness while losing a needed pair witness. The achromatic number maximizes used colors subject to both conditions, reversing the usual minimum-color objective of the chromatic number.
Enumerate canonical color partitions
Read vertices in label order and assign the next vertex to an existing color class or to the next new class. This restricted-growth representation lists every unlabeled partition once. Any class containing an edge is rejected immediately; a complete candidate then checks all unordered pairs of its color classes.
For each accepted pair, retain an actual graph edge as its witness. These witnesses make the completeness claim inspectable. The search compares the numbers of classes and keeps an optimal coloring; it does not infer a maximum from the first complete coloring found. The two-million-state cap prevents an unfinished enumeration from being labeled exact.
Work through the default path
Assign colors 1,2,3,1 to the four path vertices in order. The three edges realize pairs {1,2}, {2,3} and {1,3}. Adjacent colors differ, and those are all three pairs among the three used colors, so this is a complete proper coloring with three colors.
For four colors, completeness needs at least binomial(4,2)=6 edges, since one graph edge can witness only one color pair. The default path has three edges. This independently excludes four colors, proving that the displayed three-color witness attains the maximum rather than merely supplying a feasible example.
Interpret the pair coverage figure
The diagram places colors on a four-vertex path and lists its three color-pair witnesses. Read edge colors as the colors at the endpoints, not as an extra edge-coloring problem. A repeated vertex color is allowed when the repeated vertices are nonadjacent, as at the two ends of this path.
For your result, verify every reported color pair against the original matrix. Witness edges may share a vertex; no matching is required. Several graph edges may realize the same pair, but only one is needed. Counting edges alone gives an upper bound, while their distribution determines whether that bound can be attained.
Recognize useful boundary cases
An edgeless nonempty graph has achromatic number one: a second used color would create a color pair without a witnessing edge. A complete n-vertex graph has value n because every vertex must receive its own color and all resulting pairs occur. A single vertex therefore also has value one.
Isolated vertices can reuse colors but cannot create witnesses. Adding an isolated vertex need not increase the answer. Relabeling vertices changes the presentation of a witness without changing the optimum. These checks are particularly helpful if a matrix was assembled from a diagram whose edge list contains duplicate or reversed entries.
Choose the correct coloring objective
Use this tool when complete color interaction is the target, such as compressing vertices into independent classes while retaining every interaction between classes. A chromatic-number calculator instead minimizes classes and need not make all pairs interact. A greedy proper coloring proves neither achromatic optimality nor completeness by itself.
Keep the exact count, the vertex-to-color map and the edge-per-pair certificate together. If the search stops at its cap, an available coloring may still be valid but its maximality is unknown. Do not report that provisional number as the graph invariant; rerun a smaller graph or use a stronger exact method with a documented completion status. The edge-count bound is necessary, but many graphs fail to attain it.
A few questions, answered
Is achromatic number the chromatic number?
No. Chromatic number minimizes colors in a proper coloring; achromatic number maximizes them while also requiring complete color-pair coverage.
Can an isolated vertex create a new color?
Only if every pair involving that color is witnessed elsewhere, so an isolated vertex alone cannot supply missing interactions.
Why list an edge for each color pair?
Those edges certify the completeness requirement directly against the supplied graph.
Does a capped result prove the maximum?
No. Exactness requires completing the bounded enumeration.