Chapter 4 - Regular Expressions Flashcards
1
Q
What does L(theta) mean/translate into?
A
Theta i.e. the empty set
2
Q
What does L(epsilon) mean/translate into?
A
The set of the empty word
3
Q
What does L(X) mean/translate into?
A
L(X) = {x}, where x is an element of the associated alphabet
4
Q
What does L(E + F) mean/translate into?
A
L(E + F) = L(E) Union L(F)
5
Q
What does L(EF) mean/translate into?
A
L(EF) = L(E)L(F)
6
Q
What does L(E*) mean/translate into?
A
L(E) = L(E)
7
Q
What does L((E)) mean/translate into?
A
L((E)) = L(E)
8
Q
How would you go about generating an NFA from a regular expression involving the generation of multiple NFAs?
A
- Generate each separate NFA based on the structure of the regular expression e.g. if it is N(ab), then generate the NFAs for a* and b*.
- Combine the two together by splitting a connection connected to a final state, and link it to the other final state for the empty word in the 2nd NFA, as well as its initial state.
- Remove dead ends that lead to nowhere useful