NP-Hardness and Practical Heuristics
Why Index Coding Is Hard
Having framed index coding as a graph problem, we inherit the graph problem's computational complexity. Computing the chromatic number is NP-hard; computing the linear broadcast rate (minrank) is also NP-hard (Peeters 1996). For general instances, there is no polynomial-time algorithm that finds the optimal index code β even non-optimal schemes that come close require heuristics.
This is why coded caching is not "just" applied index coding: the MAN scheme's secret sauce is that the combinatorial placement makes the resulting graph structured, and for structured graphs the bounds coincide and the optimal code is explicit. Without this structure, we would be stuck with heuristics.
Theorem: NP-Hardness of Linear Index Coding
Given an index coding instance and a target rate , deciding whether (the linear broadcast rate is at most ) is NP-complete.
Minrank of a graph is a matrix-theoretic invariant that generalizes chromatic number. Chromatic number is NP-hard (Garey & Johnson '79), and minrank is harder still in general fields. Reduction from graph 3-coloring yields NP-completeness for minrank decision, hence for index coding.
Reduce chromatic number to minrank
Peeters (1996) showed that for a graph , , and the reduction preserves enough structure that determining minrank is NP-hard.
Connect to index coding
Bar-Yossef et al. (2011) showed that the linear index coding rate equals minrank. Hence deciding inherits NP-hardness.
Non-linear rate
The non-linear (general) broadcast rate is also NP-hard to compute. In fact, it is not even known to be computable by a finite algorithm β the existence of an algorithm that computes in finite time is open (as of 2026).
Consequence
For general index coding we are stuck with heuristics and bounds. Structured instances β the MAN family β admit polynomial-time optimal solutions.
Greedy Coloring Heuristic for Index Coding
Complexity: where is the maximum degree.Greedy coloring is a classical heuristic. It does not achieve the chromatic number in general β worst case, it uses colors. For MAN conflict graphs, a specific vertex ordering yields the optimal coloring with colors.
Greedy Coloring on a MAN Instance
Apply greedy coloring to the MAN conflict graph for small . Each color corresponds to one coded multicast message in the delivery phase. The number of colors equals the delivery rate in file-size units of .
Parameters
Definition: Clique Cover Bound
Clique Cover Bound
A clique cover of is a partition of into cliques. The minimum clique cover number equals the chromatic number of the complement . For index coding, a clique cover gives a valid scheme: each clique becomes one coded transmission (all pairs in a clique are compatible for XOR).
The fractional clique cover number is the LP relaxation, and .
For MAN instances, the conflict graph is vertex-transitive, and fractional clique cover equals the rate. This structural regularity is what makes coded caching tractable.
Theorem: LP Relaxation Bound
For any index coding instance with conflict graph , where LP-OPT is the optimum of the fractional chromatic number LP.
The LP bound is the strongest polynomial-time computable upper bound on the broadcast rate via XOR coding. For some families it is tight, for others it has an gap to (Alon et al. 2008 via Kneser graphs).
LP formulation
subject to for all and , where ranges over independent sets.
Fractional coloring gives valid index code
Any fractional coloring with total weight can be "rounded" to a scheme of rate by repeating the fractional scheme long enough. Gives .
Independence lower bound
Duality: LP dual of fractional chromatic is the fractional clique number, which equals the fractional independence number for perfect graphs. In general, ; with equality under special conditions.
MAN Rate vs LP Bound vs Uncoded
Compare, as a function of , the MAN integer- envelope rate with the LP lower bound (the continuous optimum, matching the memory-sharing lower envelope) and the uncoded upper bound . The MAN rate is at most one more color than the LP bound β the integer- rounding gap.
Parameters
What Deployed Systems Use
Real systems that exploit coded multicasting use one of three strategies:
- MAN-style placement + closed-form delivery. The approach of this book: design the placement so the delivery is pre-solved. Deployable; limited by subpacketization (Ch 14).
- Greedy coloring at runtime. Heuristic; near-optimal in practice for small instances; does not scale to hundreds of users.
- PDA / linear-code-based schemes (Ch 14). Polynomial subpacketization, approximate LP bound. Deployable at moderate .
Few production systems attempt to solve index coding online. The value of the index coding framework is conceptual: it places coded caching within a larger family and lets us import bounds and intuition from a well-studied literature.
- β’
Optimal index coding is NP-hard; runtime solution infeasible for K > 30
- β’
Greedy coloring gives near-optimal rates for random instances
- β’
MAN schemes pre-solve the index coding problem via combinatorial placement
Common Mistake: Greedy Coloring Is Not Always Optimal
Mistake:
Expecting greedy coloring to achieve the chromatic number.
Correction:
Greedy coloring's output depends on the vertex ordering, and in the worst case it uses up to colors β which can be far from . For specific orderings (WelshβPowell, degree of saturation), greedy performs well, but the problem is still NP-hard. For MAN conflict graphs the natural ordering (by subset lexicographic order) gives the optimal colors β but this is a happy accident of the combinatorial structure, not a general property of greedy.