LangStudies/App/RegM/Lectures/Lecture.5.6.7.Notes.md

40 lines
727 B
Markdown
Raw Normal View History

## Concatenation
Regex : `/^AB$/`
Psuedo: `start AB end`
Machine:
```
->o --A--> o --epsilon--> o --B--> (o)
Submachine_A --epsilon--> Submachine_B
```
## Union
Regex : `/^A|B$/`
Psuedo: `start A | B end`
Machine:
```
epsilon--> o --A--> o --epsilon
/ \
->o ->(o)
\ /
epsilon--> o --B--> o --epsilon
```
## Kleene Closure
Regex : `/^A*$/`
Psuedo: `start A.repeat(0-) end`
Machine:
```
2022-07-17 00:09:42 -07:00
<------episilon-------
/ \
->o --epsilon--> o --A--> o --epsilon--> (o)
\ /
-------------epsilon---------------->
```