---
title: Global-Position Colored-Permutation Encoding
url: https://www.emergentmind.com/topics/global-position-colored-permutation-encoding
type: topic
---

# Global-Position Colored-Permutation Encoding

Searching arXiv for the cited papers and closely related work on global-position colored-permutation encoding and CE-QAOA.
First, retrieving the main routing paper by arXiv ID 2604.04570.
Now retrieving the PEMark paper by arXiv ID 2605.21865, which explicitly compares its position-encoding watermarking scheme to global-position colored-permutation encoding.
Global-position colored-permutation encoding is a representational scheme in which a combinatorial object is expressed through a shared positional axis together with a color-indexed decomposition of a permutation structure. In the formulation introduced for the capacitated vehicle routing problem (CVRP), the positions are global route positions shared across all vehicles, and the colors are vehicle labels; the resulting tensor of binary variables decomposes a full permutation matrix into disjoint partial permutations [2604.04570]. A semantically related position-based permutation coding paradigm also appears in API watermarking, where the order of JSON/XML key-value pairs is used as an information carrier; that work states that its mechanism is very close to what is called a global-position colored-permutation encoding, while also noting that the terminology is interpretive rather than literal in that setting [2605.21865].

## 1. Definition and representational scope

The routing formulation uses \(n\) global positions \(j\in[n]\), \(n\) customers \(i\in[n]\), and \(K\) vehicles \(k\in[K]\). At each global position \(j\), exactly one pair \((i,k)\) is chosen, meaning that customer \(i\) is visited at position \(j\) and assigned to vehicle \(k\). The encoding is given by binary variables
\[
x_{i,j,k}\in\{0,1\}, \qquad i,j\in[n],\ k\in[K],
\]
with the interpretation
\[
x_{i,j,k}=1 \iff \text{“at global position }j\text{, customer }i\text{ is placed on vehicle }k.”}
\]
There are \(n^2K\) binary decision variables in total [2604.04570].

The term *global-position* denotes the use of a single global route order shared across all vehicles rather than separate per-vehicle route positions. The term *colored-permutation* denotes that, once vehicle labels are ignored, the assigned customer positions form a permutation matrix, while the vehicle label \(k\) acts like a color that partitions that permutation into disjoint partial permutations. In this sense, the representation is simultaneously an ordering model and a vehicle-assignment model.

## 2. Permutation-matrix structure and disjoint partial permutations

Define the aggregated matrix
\[
P=(p_{i,j})_{i,j=1}^n,\qquad p_{i,j}:=\sum_{k=1}^K x_{i,j,k}.
\]
Then \(p_{i,j}=1\) means that customer \(i\) is placed at global position \(j\) by some vehicle. Under the two assignment constraints
\[
\forall j\in[n]:\qquad \sum_{i=1}^n\sum_{k=1}^K x_{i,j,k}=1,
\]
and
\[
\forall i\in[n]:\qquad \sum_{j=1}^n\sum_{k=1}^K x_{i,j,k}=1,
\]
the matrix \(P\) is a permutation matrix. The paper formalizes the decomposition
\[
P=\sum_{k=1}^K X^{(k)}, \qquad X^{(k)}=(x_{i,j,k})_{i,j},
\]
where each \(X^{(k)}\) is a \(0/1\) partial permutation matrix and the supports are pairwise disjoint [2604.04570].

This characterization identifies the exact combinatorial content of the encoding. Each global position chooses one symbol \((i,k)\), each customer appears exactly once overall, and the vehicle labels color the positions of a single underlying permutation. Each vehicle slice is only partial because a vehicle may visit only a subset of customers, but within that slice it still cannot reuse a row or a column. A common misunderstanding is to read the construction as \(K\) independent route permutations; the defining statement is instead that the \(K\) color layers combine into one full \(n\times n\) permutation matrix.

## 3. Capacity handling on the native decision register

A central feature of the encoding is that vehicle capacity is enforced directly on the routing decision register rather than through an explicit load or capacity register. The operator-valued load for vehicle \(k\) is defined as
\[
\widehat D_k := \sum_{j=1}^{n}\sum_{i=1}^{n} d_i\,X^{(j)}_{i,k},
\]
where \(d_i>0\) is customer demand and \(X^{(j)}_{i,k}\) is the rank-1 projector corresponding to symbol \((i,k)\) on block \(j\). On a basis state \(x\), this becomes
\[
D_k(x)=\sum_{j=1}^{n}\sum_{i=1}^{n} d_i\,x_{i,j,k}.
\]
The hinge-square penalty is
\[
H_{\mathrm{cap}^{A} = \lambda_{\mathrm{cap} \sum_{k=1}^{K} \Bigl(\bigl[\widehat D_k-Q_k\bigr]_+\Bigr)^2,
\]
with \(Q_k\) the capacity of vehicle \(k\) and \([u]_+=\max\{0,u\}\). The paper also notes a smooth surrogate for balanced cases,
\[
\widetilde H_{\mathrm{cap} = \lambda_{\mathrm{cap} \sum_{k=1}^{K}(\widehat D_k-Q)^2,
\]
which penalizes both overload and underload [2604.04570].

The significance of this construction lies in qubit economy. The encoding uses only the routing variables for capacity itself: no explicit capacity register, no slack register, and no ancilla qubits required for encoding capacity itself. The paper contrasts this with prior quantum CVRP encodings that used explicit load bookkeeping with \(O(Q)\) or \(O(\log Q)\) additional qubits for capacity \(Q\). A plausible implication is that the colored-permutation viewpoint is not merely a notational choice; it is structurally tied to how feasibility conditions are embedded into the same decision manifold.

## 4. Objective function, one-hot manifold, and CE-QAOA compatibility

The routing cost is defined on consecutive global positions. For CVRP, the edge cost between symbols \((i,k)\) and \((i',k')\) is
\[
W_{(i,k)\to(i',k')} = \begin{cases} w_{i,i'} & \text{if } k=k',\\[2pt] w_{i,\mathtt{dep}_k}+w_{\mathtt{dep}_{k'},i'} & \text{if } k\neq k', \end{cases}
\]
where \(w\) is the metric and \(\mathtt{dep}_k\) is the depot for vehicle \(k\). The diagonal objective Hamiltonian is
\[
\begin{aligned}
H_{\mathrm{obj}^{A} = \lambda_{\mathrm{obj}\Biggl[ &\sum_{j=1}^{n-1}\sum_{i,i'=1}^{n}\sum_{k,k'=1}^{K} W_{(i,k)\to(i',k')} \,X^{(j)}_{i,k}X^{(j+1)}_{i',k'} \\
&\quad + \sum_{i=1}^{n}\sum_{k=1}^{K} w_{\mathtt{dep}_k,i}\,X^{(1)}_{i,k} + \sum_{i=1}^{n}\sum_{k=1}^{K} w_{i,\mathtt{dep}_k}\,X^{(n)}_{i,k} \Biggr].
\end{aligned}
\]
The full cost Hamiltonian is
\[
H_C^{A}=H_{\mathrm{once}^{A}+H_{\mathrm{cap}^{A}+H_{\mathrm{obj}^{A}.
\]
The encoding is designed for Constraint-Enhanced QAOA: it lives in a tensor product of one-hot blocks, the mixer is a block-local normalized XY mixer,
\[
\widetilde H_{XY}^{(b)} = \frac{1}{n-1}\sum_{1\le u<v\le n} \left(X_u^{(b)}X_v^{(b)}+Y_u^{(b)}Y_v^{(b)}\right),
\]
and the depth-\(p\) CE-QAOA state is
\[
\psi_p(\vec\gamma,\vec\beta) = \left(\prod_{\ell=1}^{p}U_M(\beta_\ell)e^{-i\gamma_\ell H_C}\right)s_0,
\]
with
\[
U_M(\beta)=\bigotimes_{b=1}^{m}e^{-i\beta \widetilde H_{XY}^{(b)}, \qquad s_0=s_{\mathrm{blk}^{\otimes m}.
\]
For CVRP, \(m=n\) blocks and the local alphabet size is \(nK\) [2604.04570].

The important structural point is that the mixer preserves the one-hot encoded manifold while the cost Hamiltonian is diagonal. The appendix further reuses the encoded-manifold analysis from earlier work. In the dephased reference model, the diagonal distribution after \(p\) layers is written as an envelope \(W_p(z;\boldsymbol\beta)\), the off-peak quantity is
\[
M_p(\delta)=\max_{|\vartheta|\ge \delta}F_p(\vartheta),
\]
with Fejér kernel
\[
F_p(\vartheta) = \frac{1}{p+1} \left| \sum_{r=0}^{p} e^{ir\vartheta} \right|^2 = \frac{1}{p+1} \left( \frac{\sin\left(\frac{(p+1)\vartheta}{2}\right)} {\sin\left(\frac{\vartheta}{2}\right)} \right)^2,
\]
and the lower bound on the probability of sampling an optimum in the reference model is
\[
q_0 = \Pr_p^{\mathrm{ref}[\Omega^\star] \ge \frac{(p+1)C_\beta} {(p+1)C_\beta + M_p(\delta)(1-C_\beta)}.
\]
Using
\[
M_p(\delta)\le \frac{1}{(p+1)\sin^2(\delta/2)},
\]
the paper derives dimension-free finite-depth and finite-shot guarantees.

## 5. Decoding, feasibility certification, and reported performance

Measured bitstrings are decoded by reading, for each global position \(j\), the unique active symbol \((i,k)\). The sequence of positions with the same \(k\) gives that vehicle’s route segment; depot edges are inserted automatically by the objective; and a classical feasibility oracle checks one-hot per block, each customer exactly once, capacity, and contiguity of each vehicle’s positions on the global timeline. The paper gives a polynomial-time oracle `FeasibleGlobalPositions`, which certifies admissibility and then evaluates exact cost, and notes that the feasibility oracle may also be of independent interest as a reusable polynomial-time decoding and certification primitive for quantum and quantum-inspired routing pipelines [2604.04570].

The reported resource and benchmark claims are correspondingly specific. The one-hot native encoding uses
\[
Q_{\text{1hot}=nS=n(nK)=n^2K
\]
qubits. A binary-compressed colored-permutation variant is argued to reduce the count from a separated encoding scaling like
\[
Q_{\text{sep}\approx Kn\log_2 n
\]
to a reduced colored-permutation scaling like
\[
Q_{\text{col}\approx n\log_2(nK).
\]
On the QOptLib CVRP instances with \(K=2\), the paper reports that its PHQC pipeline recovered the independently verified optima on the benchmark suite, with reported costs matching or improving the hybrid values from the reference table in most cases. The table includes instances such as P-n41.vrp through P-n82.vrp, and the paper states that the end-to-end pipeline matched the verified optimum for every instance in the table, with one listed reference value apparently below the verified optimum.

## 6. Extension to position-based permutation coding and terminological caveats

A closely related but distinct use of positional permutation structure appears in PEMark, a watermarking scheme for API responses. That framework groups the keys of a JSON object \(J\) into groups \(J_1,J_2,\ldots,J_g\),
\[
J = \{J_1, J_2, ..., J_g\},
\]
uses the fact that a group of \(T\) keys has \(T!\) orderings, and requires
\[
2^{L} \leq T!
\]
for an \(L\)-bit watermark. A watermark integer \(M\) is decomposed factorially,
\[
M = \sum_{j=1}^{T-1} a_j \times (T-j)!,
\]
where the coefficients form a Lehmer code; the sorted baseline key sequence
\[
\mathbf{K}^{(0)} = \bigl(k_{(1)}, k_{(2)}, \ldots, k_{(T)}\bigr), \quad k_{(1)} < k_{(2)} < \cdots < k_{(T)}
\]
is recursively transformed into a watermarked order
\[
\left\{ \begin{array}{l} \pi _j=\mathbf{K}^{\left( j-1 \right)}\left[ a_j \right] \\ \mathbf{K}^{\left( j \right)}=\mathbf{K}^{\left( j-1 \right)}\setminus \{\pi _j\} \\ \pi _T=\mathbf{K}^{\left( T-1 \right)}\left[ 0 \right] \end{array} \right. \ \ \ ,\ j=1,2,...,T-1
\]
yielding
\[
J_w^{(i)} = \bigl\{ (\pi_1, v_{\pi_1}), (\pi_2, v_{\pi_2}), \ldots, (\pi_T, v_{\pi_T}) \bigr\}.
\]
Extraction reconstructs
\[
\widehat{M} = \sum_{j=1}^{T-1} \widehat{a}_j \times (T-j)!
\]
and then
\[
\widehat{W} = \text{bin}\bigl(\widehat{M},\; L\bigr),
\]
with majority voting across groups,
\[
w_{\text{final}[j] = \operatorname{mode}\bigl(w_1[j], w_2[j], \ldots, w_G[j]\bigr).
\]
The paper explicitly states that this mechanism is very close to what is called a global-position colored-permutation encoding, because positions of keys are the carrier and the symbolic choice at each position comes from the remaining set of elements; it also states, however, that the paper does not literally use “colored permutation” or “global-position” terminology and is better described strictly as a Lehmer-code-based permutation watermarking scheme over key-order redundancy [2605.21865].

This comparison clarifies both the reach and the limits of the term. In the routing paper, colored permutations are formal objects: the vehicle-colored slices \(X^{(k)}\) sum to a permutation matrix on a shared global timeline. In PEMark, the analogy is semantic rather than formal: the code is carried by order positions relative to a lexicographic baseline, with no explicit color object. This suggests that global-position colored-permutation encoding names a broader design pattern—information carried by absolute positions within a shared permutation structure—while retaining a narrower, exact meaning in the CVRP formulation where color layers are mathematically explicit.

Source: https://www.emergentmind.com/topics/global-position-colored-permutation-encoding