758 views
12 votes
12 votes

Consider the following language definition:
$\small L = \{\langle M \rangle \mid M \text{ is a DFA and }M \text{ accepts some string of the form }ww^R\text{ for some }w \in \Sigma^*\}$

$L$ is

  1. Regular
  2. Context-free but not regular
  3. Recursive but not context-free
  4. Recursively enumerable but not recursive

2 Answers

Best answer
10 votes
10 votes
We cannot do this using a finite automata and so $L$ is not regular.

$ww^R$ can be detected using a PDA. We can take the intersection of this PDA with $M$ and this gives another PDA say $P.$ Now, if $P = \{\},$ $M$ does not accept any string of the form $ww^R.$ Checking if a CFL is empty is decidable and can be done with a Turing machine (at least LBA required). Thus $L$ is recursive but not context-free.
selected by
–1 votes
–1 votes
L1: {ww^R | w belongs {0,1}*}
This is a CFL but not a DCFL. It can be derived from the following grammar
S -> aSa | bSb | epsilon

so correct answer is B .

this is gate 2005 question.
Answer:

Related questions

7 votes
7 votes
1 answer
4