Context Free: Meaning of term "2nc"

Thread Starter

zulfi100

Joined Jun 7, 2012
656
Hi,
I have got following question:

Determine whether the following language is context free or not:
L = { w ϵ {a,b,c}*: na (w) = nb (w) = 2nc (w)}.

What is the meaning of "2nc" in the above question?

Zulfi.
 

WBahn

Joined Mar 31, 2012
29,976
Most likely nb(w) means the number of b's in w. If that's the case, wouldn't it make sense that 2nc(w) would mean two times the number of c's in w?
 

Thread Starter

zulfi100

Joined Jun 7, 2012
656
Hi,
Thanks a lot. If we first push 'a's and then we can equate with 'b's but we can't equate "2nc", so that language is not accepted by pda.

Is it okay?

Zulfi.
 

WBahn

Joined Mar 31, 2012
29,976
Hi,
Thanks a lot. If we first push 'a's and then we can equate with 'b's but we can't equate "2nc", so that language is not accepted by pda.

Is it okay?

Zulfi.
Depends on why you are claiming that we can't equate with the 2nc.

What if what was required was that na + nb = 2nc?
 

Thread Starter

zulfi100

Joined Jun 7, 2012
656
Hi,
Thanks for your reply.
<What if what was required was that na + nb = 2nc? >

In this case language is not accepted by npda.

Please reply the answer.

Zulfi.
 
Last edited:
Top