Given $NFA$ $N$ , $L(N)$ regular language and two words $w1$,$w2$ $\in$ $\sum^*$ such that $w1$ $\neq$ $w2$. I have to prove or disprove that
$L'=$ {$z\in \sum^*|\exists$ $w1,w2$ :$w1z$ $\in$ $L(N)$ $\wedge$ $w2z$ $\notin$ $L(N)$} is regular.
I believe this is correct but I'm having a hard time proving it. Any help will do. Thanks in advance.
The automaton $A$ for $L'$ can work like this:
For fixed $w_1$ and $w_2$ you could do the same without the guessing. However, it would be more efficient to do the simulations of $N$ once on paper and let $A$ start from there directly.