Languages can be generated by regular expressions $R$.

There are 3 atomic regular expressions:

We can build more complex expressions using:

<aside> 👿 The $*$ operator has the highest precedence, followed by $.$ and then $+$

</aside>

Examples

  1. $\sum = \{a,b\}$ and $R = (a+b)^*$. What is $L(R)$, the language generated by $R$?
  2. $R = (a+b)^*(a+bb)$
    1. $L(R) = \sum^* . \{a,bb\}$
    2. That is, all words which end in $a$ or $bb$

Describing DFA/NFA with Regex

Take this DFA:

Screenshot 2023-01-27 at 22.17.40.png

Let us take the complement

Screenshot 2023-01-27 at 22.17.56.png