Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
lfa:reg [2017/11/01 16:13] pdmatei created |
lfa:reg [2018/07/23 14:47] (current) pdmatei |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Definition ===== | ===== Definition ===== | ||
- | In the previous lecture, we have introduced **regular expressions**, **NFAs** and **DFAs** as finite representations for languages, and showed the following links between them. | + | In the previous lectures, we have introduced **regular expressions**, **NFAs** and **DFAs** as finite representations for languages, and showed the following links between them. |
* $math[E \rightarrow NA] - each regular expression $math[e] can be transformed to a **NFA** $math[M] such that $math[L(e) = L(M)]. | * $math[E \rightarrow NA] - each regular expression $math[e] can be transformed to a **NFA** $math[M] such that $math[L(e) = L(M)]. | ||
* $math[NA \rightarrow DA] - each **NFA** $math[M] can be transformed to a **DFA** $math[M'] such that $math[L(M) = L(M')]. | * $math[NA \rightarrow DA] - each **NFA** $math[M] can be transformed to a **DFA** $math[M'] such that $math[L(M) = L(M')]. | ||
Line 22: | Line 22: | ||
Therefore, we have shown that **NFAs and DFAs accept the same languages**, i.e. $math[L(NFA) = L(DFA)]. In other words, if a language $math[L] is accepted by some DFA $math[M] ($math[L=L(M)]), then it can also be accepted by some NFA, and vice-versa. | Therefore, we have shown that **NFAs and DFAs accept the same languages**, i.e. $math[L(NFA) = L(DFA)]. In other words, if a language $math[L] is accepted by some DFA $math[M] ($math[L=L(M)]), then it can also be accepted by some NFA, and vice-versa. | ||
- | It remains to establish the relationship between $math[LR] and $math[L(DFA)] (or equivalently $math[LNFA]). | + | It remains to establish the relationship between $math[LR] and $math[L(DFA)] (or equivalently $math[L(NFA)]). |
===== Equivalence between Regular Expressions and Automata ===== | ===== Equivalence between Regular Expressions and Automata ===== | ||
$justtheorem | $justtheorem | ||
- | Let $math[M] be a DFA. There exists a **regular expression** $math[E], such that $math[L(E)=L(A)]. | + | Let $math[M] be a DFA. There exists a **regular expression** $math[E], such that $math[L(E)=L(M)]. |
$end | $end | ||
Line 48: | Line 48: | ||
If $math[i = j], then: | If $math[i = j], then: | ||
- | * $math[R^{(0)}_{ii}] may contain **zero** transitions, hence $math[R^{(0)}_{ij} = \epsilon] | + | * $math[R^{(0)}_{ii}] may contain **zero** transitions, hence $math[R^{(0)}_{ij} = \epsilon] |
- | * $math[R^{(0)}_{ii}] may contain one transition, and the construction follows the above rules, yielding some regular expression $math[E_0]. | + | * $math[R^{(0)}_{ii}] may contain one transition, and the construction follows the above rules, yielding some regular expression $math[E_0]. |
We combine the two situations in a single one: $math[R^{(0)}_{ii} = \epsilon \cup E_0], where $math[E_0] is constructed as above. | We combine the two situations in a single one: $math[R^{(0)}_{ii} = \epsilon \cup E_0], where $math[E_0] is constructed as above. | ||