The above problem is Intersection of Two problems
1. All binary strings ending with 01, having regular expressoin $(0+1)^*01$, having DFA $M_1$
2. All binary strings of even length , having regular expression $((0+1)(0+1))^*$ , having DFA $M_2$
Take Intersection of $M_1$ and $M_2$, using cross product, having $x_0y_0$ as start state and $x_2y_0$ as final states( where we have both finals together)
$Q$\ $\Sigma$ |
$0$ |
$1$ |
---|
$\rightarrow x_0y_0$ |
$x_1y_1$ |
$x_0y_1$ |
$x_1y_1$ |
$x_1y_0$ |
$x_2y_0$ |
$x_0y_1$ |
$x_1y_0$ |
$x_0y_0$ |
$x_1y_0$ |
$x_1y_1$ |
$x_2y_1$ |
$x_2y_0^*$ |
$x_1y_1$ |
$x_0y_1$ |
$x_2y_1$ |
$x_1y_0$ |
$x_0y_0$ |
Minimized DFA will be
$Q$\ $\Sigma$ |
$0$ |
$1$ |
---|
$\rightarrow x_0y_0$ |
$x_1y_1$ |
$x_0y_1$ |
$x_1y_1$ |
$x_0y_0$ |
$x_2y_0$ |
$x_0y_1$ |
$x_0y_0$ |
$x_0y_0$ |
$x_2y_0^*$ |
$x_1y_1$ |
$x_0y_1$ |