Prove that the unitary PCP is decidable.

88 Views Asked by At

Prove that the unitary PCP (Post Correspondence Problem where $\vert \Sigma \vert = 1$) is decidable.

Case $1$: If a tuple $(x_i, y_i)$ with $\vert x_i\vert = \vert y_i\vert$ exists, then the answer is "yes" and the proof is trivial.

Case $2$: If a tuple $(x_i, y_i)$ with $\vert x_i\vert > \vert y_i\vert$ and a tuple $(x_j, y_j)$ with $\vert x_j\vert < \vert y_j\vert$ exists, then the answer is "yes". Let $a:= \vert x_i\vert - \vert y_i\vert$ and $b:= \vert y_j\vert - \vert x_j\vert$. Then you get:

\begin{align} \vert x_i^b \cdot x_j^a\vert &= b \cdot \vert x_i\vert + a \cdot \vert x_j\vert \\ &= (\vert y_j\vert - \vert x_j\vert) \cdot \vert x_i\vert + (\vert x_i\vert - \vert y_i\vert) \cdot \vert x_j\vert \\ &= \vert y_i\vert \cdot \vert x_i\vert - \vert x_j\vert \cdot \vert y_i\vert \\ &= (\vert y_j\vert - \vert x_j\vert) \cdot \vert y_i \vert + (\vert x_i\vert - \vert y_i\vert) \cdot \vert y_j \vert \\ &= b \cdot \vert y_i \vert + a \cdot \vert y_j \vert \\ &= \vert y_i^b \cdot y_j^a\vert \end{align}

Case $3$: If every tuple we have that $\vert x_i \vert > \vert y_i\vert$ or $\vert x_i \vert < \vert y_i\vert$, then the answer is "no" because then one of the strings is always longer than the other and there will be no solution.

I am having trouble with case $2$ because I cannot seem to understand how we went from the left to the right side.

1

There are 1 best solutions below

0
On

We need to show that $|x_i^bx_j^a| = |y_i^by_j^a|$.

Here, $s_1s_2$ means concatenation of the two strings $s_1$ and $s_2$, and $s^k$ means concatenating $k$ times the string $s$ with itself: $\underbrace{ss\ldots s}_{k~\text{times}}$

Also, keep in mind that $(*)~a=|x_i|−|y_i|~~\text{and}~~b=|y_j|−|x_j|$.

So, we have: \begin{align} |x_i^bx_j^a| &= |x_i^b| + |x_j^a| & \text{(string concatenation)}\\ &=b|x_i|+ a|x_j| &\text{(string concatenation)}\\ &=(|y_j|−|x_j|)|x_i|+ (|x_i|−|y_i|)|x_j| &\text{(using the equations in}~(*))\\ &= |y_j||x_i| - |y_i||x_j| &\text{(distributivity and deletion of opposites)}\\ &= |y_j||x_i| - |y_i||y_j| + |y_i||y_j| - |y_i||x_j| &\text{(introduction of opposites)}\\ &= (|x_i| - |y_i|)|y_j| + (|y_j| - |x_j|)|y_i|&\text{(factorization)}\\ &= a|y_j| + b|y_i| &\text{(using the equations in}~(*))\\ &= |y_j^a| + |y_i^b| = |y_j^ay_i^b| & \text{(string concatenation)} \end{align}