# Which one of the following string is DCFL

Is odd length pallindrome DCFL or NCFL?

## Like

1) $$L=\{w1w^R\mid w \in \{0, 1\}^*\}$$

## or

2) $$S\rightarrow aSa\mid bSb\mid a$$

## Suppose odd length String like

3)$$S\rightarrow aSa\mid bSb\mid aSb\mid bSa\mid a\mid b$$

We get information about even length palindrome, that it can never be DCFL, but what about odd length?

• Is the question supposed to be a multiple-choice question between alternatives 1, 2, and 3? Also, what is "string" referring to in the question title? I am confused. – dkaeae Dec 18 '18 at 7:15
• No, all three are different string. I want to know any DCFL exists among them? I am getting trouble to find DCFL among them. Actually all of them almost same type grammar. and 3rd one not pallindrome but odd length CFL. So, are they DCFL? – Srestha Dec 18 '18 at 9:51
• Do you mean "language" instead of "string"? A string cannot be a DCFL because it is an element of a language, not a language itself. – dkaeae Dec 18 '18 at 10:14
• Also, you seem to be mistaking a grammar for a language. Grammars generate languages, but they are not languages themselves. I recommend you go over the definitions again and try to neatly separate the concepts in your mind. – dkaeae Dec 18 '18 at 10:20