2
$\begingroup$

I've been going back and forth with this for a dew days, can't quite be sure.

When I look at the pumping lemma method, I think a context-free language could possibly be reduced to a regular language.

$\endgroup$
3
  • 1
    $\begingroup$ The answer depends on the definition of m-reducible. This is not quite a standard notion, so you'll have to fill us in. $\endgroup$ Commented Dec 5, 2016 at 20:49
  • $\begingroup$ Mapping-reducible. As in there is a computable function 'f' so that for every word 'w' in a given language 'A', f(w) belongs in language 'B', if A is m-reducible to B. $\endgroup$
    – MHH
    Commented Dec 5, 2016 at 21:16
  • $\begingroup$ By the way, welcome to the site! $\endgroup$ Commented Dec 5, 2016 at 21:42

1 Answer 1

1
$\begingroup$

The answer to your question is no. There's a general result you can use in this case:

Theorem. If $A$ and $B$ are any decidable languages and $B\ne\varnothing$ and $B\ne\Sigma^*$, then $A\le_\text{M} B$.

This says that any nontrivial decidable languages are mapping reducible to each other. In other words, mapping reducibility tells you nothing about decidable languages.

Here's an example. Let $L=\{0^n1^n\mid n\ge 0\}$. This is a well-known non-regular language. Now let $R$ be, say the regular language $\{0\}$. Then $L\le_\text{M} R$ by the mapping $f:\{0, 1\}^*\rightarrow\{0, 1\}^*$ defined by $$ f(s) = \begin{cases} 0\quad\text{if $s=0^n1^n$ for some $n\ge 0$}\\ 1\quad\text{otherwise} \end{cases} $$ It's obvious that $f$ is Turing-computable and that $s\in \{0^n1^n\} \Longleftrightarrow f(s)\in R$, which is exactly what you need to show that this non-regular language is mapping reducible to this regular language.

$\endgroup$
3
  • $\begingroup$ I'm puzzled. It's plain, as you explain it, that $L\le_\text{M} R$, but how can the converse ($R\le_\text{M} L$) be true? How can we reduce $R$ to $L$? Wouldn't this violate the definition of a function? $\endgroup$ Commented Dec 6, 2016 at 2:23
  • $\begingroup$ @PartialOrder the other direction is even easier: $f(s)=\begin{cases}\epsilon&\text{if }s=0\\0&\text{otherwise}\end{cases}$. $\endgroup$
    – Kai
    Commented Dec 6, 2016 at 7:05
  • $\begingroup$ @kai Ah! Each element in R maps to an element in L. I was thinking (mistakenly) that we needed an onto function for each element in L. Thanks for clarifying. $\endgroup$ Commented Dec 6, 2016 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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