introduction to programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · template...
TRANSCRIPT
![Page 1: Introduction to Programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · Template block2x2-1 Ordering of 0 buttons is: 13 24 NFA to DFA 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 Choose](https://reader033.vdocuments.mx/reader033/viewer/2022042812/5fad4d8c669f030b3a2af02a/html5/thumbnails/1.jpg)
Alex Aiken
Compilers
NFA to DFA
![Page 2: Introduction to Programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · Template block2x2-1 Ordering of 0 buttons is: 13 24 NFA to DFA 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 Choose](https://reader033.vdocuments.mx/reader033/viewer/2022042812/5fad4d8c669f030b3a2af02a/html5/thumbnails/2.jpg)
Alex Aiken
NFA to DFA
Regular expressions
NFA
DFA
Lexical Specification
Table-driven Implementation of DFA
![Page 3: Introduction to Programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · Template block2x2-1 Ordering of 0 buttons is: 13 24 NFA to DFA 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 Choose](https://reader033.vdocuments.mx/reader033/viewer/2022042812/5fad4d8c669f030b3a2af02a/html5/thumbnails/3.jpg)
Alex Aiken
NFA to DFA
1
0
1
A B C
D
E
F G H I J
![Page 4: Introduction to Programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · Template block2x2-1 Ordering of 0 buttons is: 13 24 NFA to DFA 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 Choose](https://reader033.vdocuments.mx/reader033/viewer/2022042812/5fad4d8c669f030b3a2af02a/html5/thumbnails/4.jpg)
Alex Aiken
NFA to DFA
• An NFA may be in many states at any time
• How many different states?
![Page 5: Introduction to Programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · Template block2x2-1 Ordering of 0 buttons is: 13 24 NFA to DFA 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 Choose](https://reader033.vdocuments.mx/reader033/viewer/2022042812/5fad4d8c669f030b3a2af02a/html5/thumbnails/5.jpg)
Alex Aiken
NFA to DFA
![Page 6: Introduction to Programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · Template block2x2-1 Ordering of 0 buttons is: 13 24 NFA to DFA 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 Choose](https://reader033.vdocuments.mx/reader033/viewer/2022042812/5fad4d8c669f030b3a2af02a/html5/thumbnails/6.jpg)
Alex Aiken
NFA to DFA
1
0 1
A B C
D
E
F G H I J
FGHIABCD
EJGHIABCD
ABCDHI 0
1
0
1 0 1
![Page 7: Introduction to Programmingopenclassroom.stanford.edu/.../04-04-nfa-to-dfa.pdf · Template block2x2-1 Ordering of 0 buttons is: 13 24 NFA to DFA 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 Choose](https://reader033.vdocuments.mx/reader033/viewer/2022042812/5fad4d8c669f030b3a2af02a/html5/thumbnails/7.jpg)
Template block2x2-1 Ordering of buttons is: 13 24
NFA to DFA
1
0
0
1
1
0
0
1
1
0
0 0
1
0
0
1
0
Choose the DFA that represents the same language as the given NFA