Prove that if $L$ is regular then $f(L)$ is regular. $$f(L)=\{w: \text{every prefix of $w$ of odd length $\in$ L } \}$$
So my attemption is:
Let $M= (Q, \Sigma, \delta, q_0,F) $ will be DFA recognizing $L$
Let construct $M'=(Q', \Sigma,\delta', q_0', F')$ recognizing $f(L)$.
$Q'=Q\times\{1,2\}$
$F'=\{(q,1)|q\in F\}\cup\{(q,2)|q\in F\}$
$q_0'= (q_0, 1)$
$\delta'((q,1),a\in\Sigma)=\begin{cases} (\delta(q,a),2);\delta(q,a)\in F\\ \emptyset; \delta(q,a)\notin F\end{cases} $
$\delta'((q,2), a\in\Sigma)=(\delta(q,a),1)$
What about this solution ?