@kunal

**for q2 : for making NPDA of m!=n OR m!=2n **(I think it should be DPDA instead of NPDA)

first, we have to push all a's into the stack and when b arrives pop a for each arrival of b

case 1:- if b still coming while stack is empty (all a poped) **THEN **m!=n Condition True and we wont check m!=2n.

case 2:- if b over and at the same time the stack is empty means m=n (Now here imp. point is if m=n then m!=2n is always true so no need to check m!=2n)

Note:- My point is we never going to check here m!=2n condition So we can find here deterministically by just checking no of a's are equal to no. of b's or not which makes it DPDA.

Finally, {a^{n }b^{m } | m!=n or m!=2n } is equvalent to {a^{n }b^{m } | m!=n } is eqivalent to {a^{n }b^{m } | m< n or m>n } which can be realized using DPDA.

https://gateoverflow.in/30897/if-l2-is-dcfl-how-to-draw-its-dpda

plz correct me!!!