Regular Expression and NFA: each block of five consecutive symbols contains at least two 0's
The states of your DFA are pairs of integers $(i,j)$ with $1 \le i \le j \le 5$, plus a $\mathrm{REJECT}$ state.
Intuitively state $(i,j)$ means that the two most recent $0$s have been encountered when $i$-th to last and $j$-th to last character were read.
The transition function $\delta$ satisfies $\delta(\mathrm{REJECT}, x)=\mathrm{REJECT}$ for $x \in \{0,1\}$ while, for any other state $(i,j)$, $\delta$ is defined as follows:
$$
\delta( (i,j), x) =
\begin{cases}
(1, i+1) &amp; \mbox{if } x=0 \mbox{ and } i&lt;5\\
\mathrm{REJECT} &amp; \mbox{if } x=0 \mbox{ and } i=5\\
(i+1, j+1) &amp; \mbox{if } x=1 \mbox{ and } j&lt;5\\
\mathrm{REJECT} &amp; \mbox{if } x=1 \mbox{ and }j=5.
\end{cases}
$$
The initial state is $(1,1)$. All states, except for $\mathrm{REJECT}$,  are accepting states.