---
title: Distance Precoloring Extension with Demands
url: https://www.emergentmind.com/topics/distance-precoloring-extension-with-demands-dped
type: topic
---

# Distance Precoloring Extension with Demands

Distance Precoloring Extension with Demands (DPED) is a graph-theoretic optimization problem defined on the vertex set of a graph in which partial colorings must be extended so as to meet both hard distance separation and cardinality demands for each color. DPED generalizes classical distance coloring and precoloring extension, further integrating per-color quota constraints. The motivation originates from broadcast scheduling, where programs pre-assigned to specific slots (vertices) must not occur too closely to themselves, and advertising contracts require exact frequency counts per content.

## 1. Formal Problem Statement and Structural Motivation

DPED is formally defined as follows: Given a graph $G = (V,E)$, a set $C$ of $c$ colors, an integer distance parameter $d \ge 1$, a subset $A \subseteq V$ of precolored vertices with a precoloring $\gamma': A \to C$, and a demand vector $\eta: C \to \mathbb{N}$, the task is to find a coloring $\gamma: V \to C$ such that:
- (a) $\gamma(v) = \gamma'(v)$ for all $v \in A$,
- (b) If $\gamma(u) = \gamma(v)$ for $u \ne v$, then $\text{dist}_G(u,v) \ge d$,
- (c) $|\{ v \in V : \gamma(v) = c \}| = \eta(c)$ for every $c \in C$.

The problem is motivated by scheduling constraints in commercial broadcast channels, where legal regulations or contracts impose both minimum separation for repeated content and strict quota matching [2509.18936]. On a path, vertices correspond to contiguous time slots, and $d$ captures a forbidden-repetition window.

A $d$–distance coloring is equivalent to a proper coloring of the $d$-th power of $G$: $G^{d}$ has the same vertex set, and $uv \in E(G^{d})$ whenever $\text{dist}_G(u,v) < d$.

## 2. Algorithmic Results for DPED on Paths

When restricted to paths, the problem is tractable under strong restrictions on the position of precolored vertices:

- **Polynomial-time Exact Algorithm (End-Precolored Paths):** If all precolored vertices lie at the two endpoints of the path, DPED can be solved in polynomial time. The algorithm processes the path sequentially, at each vertex computing available colors (not appearing within distance $d$) and greedily assigns the color with the largest remaining demand, robustly resolving conflicts via a local interchange argument. Correctness is proven through contradiction involving alternating color swaps [2509.18936].

**Algorithmic sketch (see Algorithm 1 in [2509.18936]):**
1. For each non-precolored vertex $v_i$ (processed left to right):
   - Determine feasible colors: $C_f = C \setminus \{ \gamma(v_j) : v_j \text{ in } d$-neighborhood of $v_i$ $\}$,
   - Assign $a \in C_f$ maximizing remaining demand.
2. Update demand counters and propagate through the path.

- **Approximation Algorithm:** For arbitrary precolorings, an algorithm returns a coloring violating demand constraints by an additive factor $O(p\, d^2)$, where $p$ is the number of precolored vertices. The strategy first runs the greedy extension ignoring precolors, then excises vertices near precolored ones and fills these “holes” by a localized (dynamic) recoloring to correct the total demand vector [2509.18936]:

  \[
  \sum_{c \in C} \left| \eta(c) - |\gamma^{-1}(c)| \right| \leq O(p \cdot d^2)
  \]

## 3. Computational Complexity and Parameterized Results

- **NP-Completeness:** DPED (with or without demands) is NP-complete even on paths. Hardness is established via reductions involving lists and auxiliary augmentation—for example, introducing isolated or pad vertices to encode frequency matching and demand constraints.

- **W[1]-Hardness:** Parameterizing by the number of colors $c$ and the distance $d$ does not suffice; DPED is W[1]-hard under this joint parameterization.

- **Fixed Parameter Tractability (FPT):** By adding the number $q$ of precolored vertices to the parameter set $(c, d, q)$, DPED becomes FPT on paths. The running time of the FPT algorithm is:

  \[
  O(n) + 2^{O(d\,(c+q)^2 \log(c+q))} \cdot (\log n)^{O(1)}
  \]

  Additionally, for the version without demands (Distance Precoloring Extension), FPT holds when parameterized solely by $d$.

The table below summarizes the computational landscape for DPED on paths, where $n$ is the number of vertices:

| Variant                            | Parameterization           | Complexity           |
|-------------------------------------|---------------------------|----------------------|
| General DPED on paths               | none                      | NP-complete          |
| General DPED on paths               | $(c, d)$                  | W[1]-hard            |
| End-precolored DPED on paths        | none                      | P                    |
| General DPED on paths               | $(c, d, q)$               | FPT                  |
| Distance Precoloring Extension      | $d$                       | FPT                  |

## 4. Connection to Related Coloring Problems

DPED encapsulates several known coloring paradigms:
- **Distance Precoloring Extension:** The version omitting demand constraints is a strictly easier problem, but already NP-complete on paths.
- **Distance List Coloring (DLC):** Here, each vertex has a list of allowable colors, and a $d$–distance constraint is imposed. DLC is also NP-complete on paths, though admits a $d^{O(d)} n$ FPT algorithm parameterized by $d$ [2509.18936].

Previous results on distance-constrained precoloring without demands (e.g., theorems guaranteeing extension when precolored vertices are sufficiently “spread apart,” as in [1308.3037]) provide explicit quantitative trade-offs between the density of close pairs and extra color requirements. Methods developed in the DPED context extend and formalize these trade-offs into explicit, algorithmic settings.

## 5. Applications and Broader Significance

The scheduling application—specifically, the commercial broadcast context—demands both repetition avoidance (distance constraint) and exact placement quotas (demand constraint), precisely modeling DPED. Beyond scheduling, DPED generalizes classic coloring and precoloring extension questions and is germane to resource allocation, register assignment, and structured frequency assignment problems, especially when strict capacity constraints are central.

The technical developments on paths are particularly significant since paths serve as fundamental models for time-indexed resource allocation where interactions are temporally local. Moreover, dynamic programming–like algorithms for paths sometimes extend to tree-like or banded graph structures; however, NP-completeness precludes such generalizations beyond restrictive regimes.

## 6. Methodological Innovations and Open Directions

- **Greedy Extension with Precoloring Interactions:** The sequential greedy extension algorithm exploits the linear order of paths but is highly sensitive to the placement of precolored vertices.
- **Approximation and Error Control:** The additive approximation factor under the randomized or gap-filling heuristic is polynomial in $p$ and $d$, suggesting that for applications with sparse precolorings and moderate $d$, near-optimal solutions are attainable efficiently.
- **Complexity Transitions:** The sharp computational dichotomy—with efficient solvability for endpoints-only precolorings, but hardness in the general case—suggests the value of structural graph parameters (e.g., precoloring layout, pathwidth) for further algorithmic classification.
- **FPT Algorithms:** The parameterized tractability when banking on a small number of colors, limited precoloring, and moderate $d$ is an important positive result for settings with highly controlled input parameters (typical in certain scheduling or hardware scenarios).

Future work includes:
- Characterizing classes of graphs (beyond paths) that admit efficient DPED algorithms,
- Tightening the approximation error relative to $p$ and $d$,
- Investigating the impact of restricted demand patterns (e.g., uniform, almost-uniform) on complexity,
- Applying DPED techniques to more general metric graphs or the path powers that underlie $d$–distance coloring.

## 7. Related Results and Theoretical Context

The work on DPED complements foundational results on distance precoloring extension by providing both positive and negative results in a setting with demand constraints. The phenomenon of list-coloring and DP-coloring generalizations to hypergraphs has also been studied [1808.01767], offering abstract frameworks (e.g., covers and independent transversals) that could encode DPED-type requirements in greater generality.

In summary, Distance Precoloring Extension with Demands introduces a rich, algorithmically nontrivial problem uniting distance coloring and demand-fulfilling constraints. For paths, it admits exact and approximate solutions in special cases, while in general the problem is computationally intractable except under fixed-parameter regimes, reflecting a nuanced boundary between practicable scheduling and provably hard resource placement.

Source: https://www.emergentmind.com/topics/distance-precoloring-extension-with-demands-dped