CS 139 // 2020-02-11
The language of a DFA $M$, written $L(M)$, is the set of strings that $M$ accepts.
$M$
$L(M)$
$L(M) = \{1w \mid w \in \{0,1\}^\ast\}$
Construct a DFA for $$A\cap B = \{ w1 \mid\text{# of 0's in }w\text{ is even}\}$$
$$A\cap B = \{ w1 \mid\text{# of 0's in }w\text{ is even}\}$$
$A$
$B$
$A\cap B$
$M_1 = (Q_1, \Sigma, \delta_1, q_1, F_1)$
$M_2 = (Q_2, \Sigma, \delta_2, q_2, F_2)$
$L(M_1)\cap L(M_2)$
$M_3 = (Q_3, \Sigma, \delta_3, q_3, F_3)$
$Q_3 = Q_1\times Q_2$
$\delta_3\big((r_1,r_2),a\big) = \big(\delta_1(r_1,a), \delta_2(r_2, a)\big)$
$q_3 = (q_1, q_2)$
$F_3 = \{(r_1, r_2)\mid r_1\in F_1\text{ and }r_2\in F_2\}$
for
$P$
$NP$
$w = 00110$
$q_0$
$0$
$1$
$q_2$
$L(M) = \{w\in\{0,1\}^\ast\mid w\text{ ends in a 01 or ends in a 10}\}$
$w\in\Sigma^\ast$
$w$
$q_4$
$\epsilon$
$L(M) = \{00, 11\}$
$L(M) = \{00,11\}^\ast = \{\epsilon, 00, 11, 0000, 0011, \ldots\}$
A nondeterministic finite automaton (NFA) is a 5-tuple: $$M = (Q, \Sigma, \delta, q_0, F)$$
$$M = (Q, \Sigma, \delta, q_0, F)$$
$Q$
$\Sigma$
$q_0\in Q$
$F\subseteq Q$
$\delta:Q\times\Sigma_\epsilon\rightarrow\mathbb{P}(Q)$
$\Sigma_\epsilon = \Sigma \cup \{\epsilon\}$
$\mathbb{P}(Q)$
$L(M) = \{w\in\{0,1\}^\ast\mid\text{ the length of }w\text{ is 4} \}$
$L(M) = \{w\mid w\text{ starts with a 0 or ends with a 1}\}$
$L(M) = \{w\mid w\text{ contains the substring }\texttt{abba}\}$