2022-07-17 04:32:57 -07:00
|
|
|
# Complex Machines
|
|
|
|
|
|
|
|
Ex:
|
|
|
|
|
|
|
|
RegEx : `/xy*|z`
|
|
|
|
SRegEx: `x y.repeat(0-) | z`
|
|
|
|
|
|
|
|
## Decomposition
|
|
|
|
|
|
|
|
### Stage 1: Union
|
|
|
|
```
|
2022-07-17 04:39:06 -07:00
|
|
|
->o.start (o)
|
2022-07-17 04:32:57 -07:00
|
|
|
\epsilon-> o --xy*-> o -epsilon-->/
|
|
|
|
\epsilon-> o --z---> o -epsilon->/
|
|
|
|
```
|
|
|
|
### Stage 2: Concatenation
|
|
|
|
```
|
|
|
|
->o.start (o)
|
|
|
|
\epsilon -> o --x--> o -epsilon-> o --y* -epsilon->/
|
|
|
|
\epsilon -> o --z--> o -epsilon------------------>/
|
|
|
|
```
|
|
|
|
### Stage 2: Kleene Closure
|
|
|
|
```
|
|
|
|
|<------------<|
|
|
|
|
->epsi -> o -x-> o -epsi-> o -epsi-> o -y-> -epsi-> o ->epsi->|
|
|
|
|
| |>---------------------->| /
|
|
|
|
->o.start (o)
|
|
|
|
\epsi -> o -z-> o -epsi------------------------------------>/
|
|
|
|
```
|
|
|
|
|