1
I need help with deciding if $L$ is context-free.
$$L = \{a^pb^{q+r}c^sd^{q+t}e^{p+r} \mid p, q, r, s \ge 0\ , s > t\}$$
Can be rewritten into:
$$L = \{a^pb^qb^rc^sd^qd^te^pe^r \mid p, q, r, s \ge 0\ , s > t\}$$
When we see the first occurrence of $c$, we push the $c$:s onto the stack. But we can't make difference between $d^q$ and $d^t$, so comparing $s < t$ is impossible when popping the $d$:s.
Hence $L$ is not Context-Free.
Is my reasoning right ?
No, you still need to give a grammar or PDA (and prove its correctness). All you did was pick a specific string and claim it can be accepted by some PDA. While that is true, any single string can be accepted by an NFA, too, but the language is certainly not regular. – Raphael – 2013-08-28T10:52:52.407
I know that I have to give a CFG but my reason was informal. In the original question there were 1 more language and the question was to decide which of them was Context Free and which not. So I used the reasoning above to decide for which language to construct the pumping lemma proof. And of course you are right, I still have to give a CFG to prove it Context Free, but my intention was to informally decide which of the two languages is Context Free and then use the pumping lemma proof to on the other language to prove it. – mrjasmin – 2013-08-28T11:03:11.873
Even informally, your argument is bad. You have to come up with an (informal) strategy to accept every word in the language (and no others). So in particular, assuming $q=0$ is a no-go. Otherwise you will be easily tricked because you only "show" a sublanguage to be context-free. – Raphael – 2013-08-28T11:35:47.147
But there is values of q for which the language is not a context-free language ? – mrjasmin – 2013-08-28T11:40:43.973
No, but that's not the point. The original language is the union of all your $q$-restricted languages and you have to talk about that one. Proving stuff is not about stating truth, but deriving truth from a set of axioms using sound rules. – Raphael – 2013-08-28T12:39:39.323