Is there a way to take the interection of two NPDAs?
I can't seem to find anything that can make that happen, but it seems like the type of thing that is should be relatively trival.
Is there a way to take the interection of two NPDAs?
I can't seem to find anything that can make that happen, but it seems like the type of thing that is should be relatively trival.
The intersection of two context-free languages can be non-context-free. The classical example is $$ \{ a^n b^n c^m : n,m \geq 0 \} \cap \{ a^m b^n c^n : n,m \geq 0 \} = \{ a^n b^n c^n : n \geq 0 \}. $$ So in general you cannot simulate the intersection of two NPDAs with an NPDA.
Intersection of two NPDA means intersection of their languages. Of course, Context-free languages are not closed under intersection, so that you will not generally get a NPDA for the intersection. If interested in the topic, you may look at Range Concatenation Grammars, which are closed under intersection and parsable in cubic time. And, of course, they include Context-Free grammars.