CS 139 // 2020-02-25
$$A = \{w\in\{0,1\}^\ast \mid w\text{ has an equal number of 0s and 1s}\}$$
$$B = \{w\in\{0,1\}^\ast \mid w\text{ has an equal number of 01s and 10s}\}$$
Here $A$ is not regular but $B$ is.
$A$
$B$
$p$
$w\in A$
$|w|\ge p$
$w$
$w = xyz$
$xy^iz \in A$
$i \ge 0$
$|y| > 0$
$|xy| \le p$
$w \in A$
$|w| \ge p$
Claim: The following language is not regular $$A = \{0^n10^n \mid n\in\mathbb{N}\}$$
$$A = \{0^n10^n \mid n\in\mathbb{N}\}$$
$x,y\in\{0,1\}^\ast$
$p(x,y)$
$$p(x,y) = 0^{|x|}1xy$$
$$B = \{p(x,y) \mid x,y\in\{0,1\}^\ast\}$$
Claim: The following language is not regular $$C = \{0^n1^m \mid n \ge m\}$$
$$C = \{0^n1^m \mid n \ge m\}$$