1
$\begingroup$

let $u$ and $v$ be two strings. Is $(u.v)^R$ equals to $u^R.v^R$?

Note: The $R$ notation means reverse order and the $.(dot)$ notation means concatenation.

$\endgroup$
3
  • $\begingroup$ Have you tried a few strings? For example, $u=0$, $v=1$? $\endgroup$ – John L. Feb 17 '19 at 10:55
  • $\begingroup$ @Apass.Jack I have tried to prove it. But I couldn't.So I thought maybe they are not equal. $\endgroup$ – siaVash Feb 17 '19 at 11:03
  • $\begingroup$ Let me rephrase my suggestion. Have you checked that equality with a few concrete instances? For example, what are $(u.v)^R$ and $u^R.v^R$ when $u$ is the string 0 and $v$ is the string 1? $\endgroup$ – John L. Feb 17 '19 at 11:06
2
$\begingroup$

No, $(u\cdot v)^R\not=u^R\cdot v^R$ more often than not.

For example, if $u$ is the string $race$ and $v$ is the string $car$. Then $$(u\cdot v)^R=(racecar)^R=racecar$$ while $$u^R\cdot v^R=(race)^R(car)^R=ecarrac.$$


Here are a few related exercises. All variables stand for strings.

Exercise 1. If $u$ or $v$ is the empty word, then $(u\cdot v)^R=u^R\cdot v^R$.

Exercise 2. If $u$ or $v$ are words of length 1 such that $(u\cdot v)^R=u^R\cdot v^R$. Then $u=v$.

Exercise 3. If $u=u^R$ and $v=v^R$, can we guarantee $(u\cdot v)^R=u^R\cdot v^R$?

Exercise 4. Prove that $(u\cdot v)^R=v^R\cdot u^R$.

$\endgroup$
3
  • $\begingroup$ I have to use induction to prove it? $\endgroup$ – siaVash Feb 17 '19 at 14:05
  • $\begingroup$ Yes, mathematically speaking. It becomes clear and obvious once you have played with several examples. $\endgroup$ – John L. Feb 17 '19 at 14:08
  • 1
    $\begingroup$ Inequality "more often than not": to be precise we have $(uv)^R = u^Rv^R$ precisely when $u$ and $v$ are powers of the same word $\endgroup$ – Hendrik Jan Feb 17 '19 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.