1
$\begingroup$

Suppose i have some NPDA and there is some transition functions defined as:

$\delta(q_{1},a,A) = (q_{2}, A)$

$\delta(q_{1},a,A) = (q_{3}, Z)$

Is it allowed? I understand, that since the NPDA is nondetermenistic, it's possible to have transitions to different states with the same input character, but what about same element at the top of stack? Thanks.

$\endgroup$

1 Answer 1

0
$\begingroup$

This is very well possible, the automaton nondeterministically chooses which transition is taken. So it may choose between $\lambda$-transitions and transitions reading input, all with the same symbol on top of the stack.

Sometimes this is written as $\delta(q_1,a,A)=\{ (q_2,A), (q_3,Z)\}$, where $\delta$ is considered as a function from $Q\times(\Sigma\cup\{\lambda\})\times\Gamma$ into finite subsets of $Q\times\Gamma^*$.

Alternatively $\delta$ can be seen as a finite relation in $Q\times(\Sigma\cup\{\lambda\})\times\Gamma\times Q\times\Gamma^*$, and we write $(q_1,a,A,q_2,A), (q_1,a,A,q_3,Z)\in\delta$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.