Pseudo-polynomial transformation

In computational complexity theory, a pseudo-polynomial transformation is a function which maps instances of one strongly NP-complete problem into another and is computable in pseudo-polynomial time.

Maximal numerical parameter
Some computational problems are parameterized by numbers whose magnitude exponentially exceed size of the input. For example, the problem of testing whether a number n is prime can be solved by naively checking candidate factors from 2 to $$\sqrt{n}$$ in $$\sqrt{n}-1$$ divisions, therefore exponentially more than the input size $$O(\log(n))$$. Suppose that $$L$$ is an encoding of a computational problem $$\Pi$$ over alphabet $$\Sigma$$, then


 * $$ \operatorname{Num}_\Pi: \Sigma^* \to \mathbb{N}$$

is a function that maps $$w_I \in \Sigma^*$$, being the encoding of an instance $$I$$ of the problem $$\Pi$$, to the maximal numerical parameter of $$I$$.

Pseudo-polynomial transformation
Suppose that $$\Pi_1$$ and $$\Pi_2$$ are decision problems, $$L_1$$ and $$L_2$$ are their encodings over correspondingly $$\Sigma_1$$ and $$\Sigma_2$$ alphabets.

A pseudo-polynomial transformation from $$\Pi_1$$ to $$\Pi_2$$ is a function $$f: \Sigma_1 \to \Sigma_2$$ such that
 * 1) $$\forall w \in \Sigma_1 \quad w \in L_1 \iff f(w) \in L_2$$
 * 2) $$\forall w \in \Sigma_1 \quad f(w)$$ can be computed in time polynomial in two variables $$\operatorname{Num}_{\Pi_1}(w)$$ and $$|w|$$
 * 3) $$\exists Q_A \in \mathbb{N}[X] \quad\forall w \in \Sigma_1 \quad |w| \leq Q_A(|f(w)|)$$
 * 4) $$\exists Q_B \in \mathbb{N}[X,Y] \quad\forall w \in \Sigma_1 \quad \operatorname{Num}_{\Pi_2}(f(w)) \leq Q_B(\operatorname{Num}_{\Pi_1}(w), |w|)$$

Intuitively, (1) allows one to reason about instances of $$\Pi_1$$ in terms of instances of $$\Pi_2$$ (and back), (2) ensures that deciding $$L_1$$ using the transformation and a pseudo-polynomial decider for $$L_2$$ is pseudo-polynomial itself, (3) enforces that $$f$$ grows fast enough so that $$L_2$$ must have a pseudo-polynomial decider, and (4) enforces that a subproblem of $$L_1$$ that testifies its strong NP-completeness (i.e. all instances have numerical parameters bounded by a polynomial in input size and the subproblem is NP-complete itself) is mapped to a subproblem of $$L_2$$ whose instances also have numerical parameters bounded by a polynomial in input size.

Proving strong NP-completeness
The following lemma allows to derive strong NP-completeness from existence of a transformation:


 *  If $$\Pi_1$$ is a strongly NP-complete decision problem, $$\Pi_2$$ is a decision problem in NP, and there exists a pseudo-polynomial transformation from $$\Pi_1$$ to $$\Pi_2$$, then $$\Pi_2$$ is strongly NP-complete

Proof of the lemma
Suppose that $$\Pi_1$$ is a strongly NP-complete decision problem encoded by $$L_1$$ over $$\Sigma_1$$ alphabet and $$\Pi_2$$ is a decision problem in NP encoded by $$L_2$$ over $$\Sigma_2$$ alphabet.

Let $$f: L_1 \to L_2$$ be a pseudo-polynomial transformation from $$\Pi_1$$ to $$\Pi_2$$ with $$Q_A$$, $$Q_B$$ as specified in the definition.

From the definition of strong NP-completeness there exists a polynomial $$P \in \mathbb{N}[X]$$ such that $$L_{1/P} = \{w \in L_1 : \operatorname{Num}_{\Pi_1}(w) \leq P(|w|) \}$$ is NP-complete.

For $$\widehat{P}(n) = Q_B(P(Q_A(n)),Q_A(n))$$ and any $$w \in L_{1/P}$$ there is



\begin{aligned} \operatorname{Num}_{\Pi_2}(f(w)) &\leq Q_B(\operatorname{Num}_{\Pi_1}(w), |w|)        && \text{(definition of }f\text{)} \\[4pt] &\leq Q_B(P(w), |w|)                  && \text{(property of } L_{1/P}\text{)} \\[4pt] &\leq Q_B(P(Q_A(|f(w)|)), Q_A(|f(w)|)) && \text{(definition of }f\text{)} \\[4pt] &\leq \widehat{P}(|f(w)|)                 && \text{(definition of } \widehat{P}\text{)} \end{aligned} $$

Therefore,


 * $$f(L_{1/P}) = \{w \in L_2 : \operatorname{Num}_{\Pi_2}(w) \leq \widehat{P}(|w|) \} = L_{2/\widehat{P}}$$

Since $$L_{1/P}$$ is NP-complete and $$f|L_{1/P}$$ is computable in polynomial time, $$L_{2/\widehat{P}}$$ is NP-complete.

From this and the definition of strong NP-completeness it follows that $$L_2$$ is strongly NP-complete.