How do I construct a PDA where:
$L = \{w \in \{0, 1\} ∗ : |w| \text{ is even and } w \text{ contains at least one 1-Symbol in the first Half}\}$
To me it seems impossible to know when I reached the midpoint.
How do I construct a PDA where:
$L = \{w \in \{0, 1\} ∗ : |w| \text{ is even and } w \text{ contains at least one 1-Symbol in the first Half}\}$
To me it seems impossible to know when I reached the midpoint.
Copyright © 2021 JogjaFile Inc.
So this is my solution:
I just stack 1s until I find the first 1-Symbol, then I pop them to see if the first 1 was in the first or second half and then I just make sure that the word is even.