Advanced maths

Fractional chromatic number calculator with independent set weights

Find the fractional chromatic number by weighting independent vertex sets rather than assigning one indivisible color to each vertex.

Your numbers

Vertices are labeled consecutively from 1 through this number, including isolates.
One u,v row per edge; unordered pairs must be unique.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Find the fractional chromatic number by weighting independent vertex sets rather than assigning one indivisible color to each vertex. The calculator returns nonzero set weights, vertex dual weights and an exact matching objective value. Rational certificate checks distinguish a proved optimum from a floating-point LP value that only appears close to optimal.

THE FORMULAmin Σ_I x_I s.t. Σ_{I∋v}x_I≥1, x_I≥0; dual max Σ_v y_v s.t. Σ_{v∈I}y_v≤1 for every independent I, y_v≥0.

A worked example

C5: each of five maximal independent pairs receives 1/2; each vertex receives coverage 1. Dual vertex weights all 1/2 satisfy every independent-set sum≤1. Matching sums 5/2 prove exact optimality.

Good to know

Simple undirected graph, n=1–12. Enumerate independent sets; exact rational simplex over maximal-set inequalities, Bland tie rule, 10,000-pivot cap. Reject on cap or failed primal/dual certificate. No rounded exactness claim, no integral coloring count.

Relaxing ordinary coloring

An independent set contains no adjacent pair, so its vertices could share one ordinary color. Fractional coloring allows a nonnegative amount of that color class and requires every vertex to receive total coverage at least one across all sets containing it.

The objective is the sum of set weights. This can be interpreted as a divisible schedule in which adjacent tasks cannot run together, but it is not a literal assignment of two and a half indivisible colors to a graph.

Fractional chromatic number calculator with independent set weights worked exampleFractional coverage of a five-cycle12345Independent pairs:{1,3}, {1,4}{2,4}, {2,5}, {3,5}each weight 1/2dual: each vertex 1/2Primal = dual = 5/2: an exact certificate
C5: each of five maximal independent pairs receives 1/2; each vertex receives coverage 1. Dual vertex weights all 1/2 satisfy every independent-set sum≤1. Matching sums 5/2 prove exact optimality.

Compare this with the Chromatic polynomial calculator from a graph edge list. Integral color counts and the chromatic polynomial do not compute fractional coloring weights.

Writing the covering program

For each nonempty independent set I, let x_I be its weight. Minimize the sum of x_I subject to each vertex coverage sum being at least one and every x_I being nonnegative. Singleton sets ensure the covering problem is always feasible.

It is sufficient to optimize over maximal independent sets: any smaller independent set can be extended to one without increasing its weight or reducing any vertex coverage. The calculator nevertheless enumerates all independent sets for the final dual verification.

Why a vertex dual certificate matters

The dual assigns nonnegative weights y_v to vertices and maximizes their sum, while requiring the total y weight on every independent set to be at most one. Any feasible dual gives a lower bound on every feasible covering objective.

When the returned primal set weights and dual vertex weights have equal exact sums, both bounds meet and prove optimality. Checking coverage alone would prove only an upper bound, while quoting a decimal solver status would not supply this exact certificate.

The five-cycle reaches five halves

The default cycle has five maximal independent pairs: {1,3}, {1,4}, {2,4}, {2,5} and {3,5}. Giving each pair weight one half covers every vertex exactly once, with total weight five halves.

Assigning one half to every vertex is dual feasible because no independent set in this cycle has more than two vertices. Its total is also five halves, proving the fractional optimum 2.5 although the ordinary chromatic number is three.

Checking rational arithmetic

The simplex computation uses exact rational numerators and denominators. Before reporting an optimum, the calculator checks nonnegative primal weights, every vertex coverage inequality, nonnegative dual weights, every independent-set dual inequality and equality of the two objective sums.

These checks do not rely on rounding a value near a familiar fraction. If an iteration cap prevents the exact solve from finishing, the input is rejected as unresolved rather than turning an unverified approximate objective into an exact fractional chromatic number.

Entering a small simple graph

Use one through twelve vertices and unique undirected endpoint pairs. Self-loops are rejected because a looped vertex cannot belong to an independent set and would make its coverage impossible. Declared isolates remain part of the LP.

An edgeless nonempty graph has value one: all vertices fit into a single independent set. A complete n-vertex graph has value n because independent sets are singletons, providing endpoint cases that check both the model and certificate extraction.

Separating fractional and integral answers

The fractional optimum never exceeds the ordinary chromatic number because every proper coloring provides a feasible integral set cover. A smaller fractional value describes the benefit of divisibility, rather than proving that an ordinary coloring with that many colors exists.

The result is one optimal weighted cover and one dual certificate; either can be nonunique. It does not compute the chromatic polynomial, count proper colorings or require each independent-set coverage inequality to be an equality in every optimum.

A few questions, answered

Can fractional chromatic number be noninteger?

Yes. The five-cycle has value five halves, certified by matching primal and dual solutions.

Why return both primal and dual weights?

A feasible cover gives an upper bound and a feasible dual gives a lower bound; equal exact objectives prove optimality.

Are only maximal independent sets enough?

Yes for optimization, because any independent set can be extended without increasing weight. All sets are still checked for dual feasibility.

Will a rounded LP value be called exact?

No. Reporting requires rational primal and dual feasibility and exact equality of their objectives.

Find your calculator

Start typing to explore the library.