in Compiler Design recategorized by
1,193 views
1 vote
1 vote

The language $\{ W^a X^b Y^{a+b} \mid a, b, >1\}$ is

  1. Regular
  2. Context-free but not regular
  3. Context sensitive but not context free
  4. Type$=0$ but not  context sensitive
in Compiler Design recategorized by
by
1.2k views

3 Answers

0 votes
0 votes
Is answer B? Because we can push W and X into the stack and for each Y we can pop one element of the stack.That means we can design a PDA for this grammar
0 votes
0 votes
B is correct. Its CFL or Type 2 language.

Push a for each W. Push a for each X. Pop a for each Y. If the stack is empty then it is accepted else not.
0 votes
0 votes
It is context free grammar but not regular because it requires to solve one stack of memory.
Answer: