equivalence, dfa, ndfa sequential machine theory prof. k. j. hintz department of electrical and...
Post on 19-Dec-2015
229 views
TRANSCRIPT
![Page 1: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/1.jpg)
Equivalence, DFA, NDFAEquivalence, DFA, NDFA
Sequential Machine Theory
Prof. K. J. HintzDepartment of Electrical and Computer
Engineering
Lecture 2
Updated and modified by Marek Perkowski
![Page 2: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/2.jpg)
Equivalence Relation on AEquivalence Relation on AEquivalence Relation on AEquivalence Relation on A
• An Equivalence Relation (Not Relationship) Is Not an Equality Relation
• A Relation is an Equivalence Relation if and only if (iff) it is:– Reflexive– Symmetric– Transitive
![Page 3: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/3.jpg)
Equivalence Relation on AEquivalence Relation on A
A
A
A
A
on ~ relation eequivalenc an is
e)(transitiv '',','','',' ',
)(symmetric ',,' ',
)(reflexive ', ,
R
RRR,
RR
R
then
aaaaaaaaa
and
aaaaaa
and
aaaa
if
![Page 4: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/4.jpg)
Non-Algebraic Equivalence Relation Example
Non-Algebraic Equivalence Relation Example
Equivalence Relation on the Set of All Triangles on a Plane
“is congruent to” or “is similar to”
– Reflexive, each triangle is similar to itself,
![Page 5: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/5.jpg)
Equivalence Relation ExampleEquivalence Relation Example
Symmetric, if
is similar to
then
is similar to
![Page 6: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/6.jpg)
Equivalence Relation ExampleEquivalence Relation Example
Transitive, if
is similar to
and
is similar to
then
is similar to
![Page 7: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/7.jpg)
Inclusion RelationInclusion Relation
ji
jiji
jjjj
iiii
ji
iff
then
, also are states all
)" in included is " as (read
,,,
,,,
, states, ofset theon defined partitions 2 Given
321
321
BBB
BBB
BBB
S
![Page 8: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/8.jpg)
Inclusion Relation ExampleInclusion Relation Example
, in" included is"
,
5,4,3,2,1
5,4,3,2,1
5,4,3,2,1
21
21
2
14131211
1
or,
then
and
let
BBBB
Illustrate a bigger lattice graphically
![Page 9: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/9.jpg)
Partition NotationPartition Notation
• Overbar Indicates States Which Are Elements of the Same -block.
• Single States Are Not Normally Listed
1
11 12 13 14
1 2
1 2 3 4 5
1 2 3 4 5
1 2 1 2 3 4 5
, , ,
,
,
B B B B
is written as
and
![Page 10: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/10.jpg)
Relations May Be OrderingsRelations May Be Orderings
• Partial Ordering
• Total Ordering, aka Chain
• Well Ordering (not discussed here)
![Page 11: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/11.jpg)
Partial Ordering (PO)Partial Ordering (PO)Partial Ordering (PO)Partial Ordering (PO)
• Given an Inclusion Relation, R: s s’, Defined on some Elements of the Set S such that s, s’ S, R Is a Partial Ordering If It Is:– Reflexive– Anti-Symmetric (asymmetric)– Transitive– Not all orderings are specified, therefore partial
Illustrate on a lattice
![Page 12: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/12.jpg)
Properties of Partial OrderingsProperties of Partial Orderings
– Reflexive• s s for all s S
– Anti-Symmetric (asymmetric)If
and
then
s s
s s
s s s s
'
, S
e.g., let : “older than”
if Sam is older than Bill,
then Bill cannot be older
than Sam
But if this symbol means older or the same age, then OK
![Page 13: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/13.jpg)
Properties of POProperties of PO
– TransitiveIf
and
then
s s
s s
s s
'
e.g., If the Redskins beat the Patriots
and the Patriots beat the Cowboys
then the Redskins will beat the Cowboys
![Page 14: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/14.jpg)
Total OrderingTotal Ordering
• aka– Chain, simply ordered set, totally ordered set
• A Partial Ordering for Which All Orderings Are Specified
• A Chain Is “Connected” Because
s s s s s s or , S
![Page 15: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/15.jpg)
POSETPOSET
• Partially Ordered SET– A set on which a partial ordering is specified– ( S, ) where is defined– Not a chain since not all elements are
connected
• We Will Revisit This Concept in a later part of the Course
![Page 16: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/16.jpg)
Finite AutomataFinite Automata
A Deterministic semi-automaton*, aka Completely Specified Deterministic Semi-automaton is a Triple
with no Mealy machine output function, Beta ()
* Ginzburg, 1968
,,
or ,,,
ΣK
IS
M
M
![Page 17: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/17.jpg)
FSM Set PropertiesFSM Set Properties
,,,,,,,,,
,
inputs ofset finite A,,,,
states ofset finite A,,,,
1210
1210
ihgfedcba
m
n
sississis
S
iiiiI
ssss
ISSIS
KS
SIsa sc
ib
![Page 18: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/18.jpg)
Language RecognizerLanguage Recognizer
• aka, Rabin-Scott Automata (machine), Automaton, Language Recognizer
• A Recognizer Is a Quintuple of Sets
with S, I, as before
M rs S I F, , , , s0
s
s sp q
0
the single, unique, initial state
A finite set of final statesF S, ,
![Page 19: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/19.jpg)
Kleene StarKleene Star
• a* = e, a, aa, aaa, aaaa, ...
• The Kleene Star, *, means NONE or more occurrences of something
• Star is an overloaded operator so be aware of context
• a+= ONE or more occurrences of something.
• a+ is Kleene Star less the null string, .
![Page 20: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/20.jpg)
Kleene ClosureKleene Closure
• Kleene Closure Is Not Identical to Kleene Star– “*” Symbol is the same (overloaded)
• Kleene Closure/Star Closure– Found in descriptions of formal language– Language consisting of all strings over some
alphabet
![Page 21: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/21.jpg)
StringString
• An Ordered Concatenation of Symbols From an Alphabet
• Used in Place of “Word” to Decouple From Common Concept of Word in Informal Language
• If = { a, 1, 0, b, % } then a “1%0b” is a string.
![Page 22: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/22.jpg)
RecognizerRecognizer
If x I*, i.e., a string of input symbols selected from the set of allowable input symbols,
and the application of x to the recognizer results in a final state F,
then the recognizer “accepts” the string.
![Page 23: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/23.jpg)
StringsStrings
A String, x, Is Accepted by a Recognizer Left-most Letter First, i.e.,
if the input to a recognizer is a string w,
and if w = w’
then is the first letter of the string which causes a state
transition. Subsequent letters from left to right do the same.
![Page 24: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/24.jpg)
State TransitionState Transition
Let There Be Two Configurations for a Machine
somefor
',',
relation, by the related are which',' and ,
1 ww
iff
wqwq
wqwqM
R,
1
q q’S
![Page 25: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/25.jpg)
String ExampleString Example
Let
w = a b b a
then
w = a w’
and
w’ = b b a
![Page 26: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/26.jpg)
Recognizer as Directed GraphRecognizer as Directed GraphRecognizer as Directed GraphRecognizer as Directed Graph
• Arbitrary State
• State Transition
• Start (initial) State
• Final State
1
q
q q’
-
+ or
or
![Page 27: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/27.jpg)
Let I = { a, b }
• Accepts no strings since no final state
• Accepts all strings
• Dead State
Recognizer ExamplesRecognizer Examples
a, b
-
a, b
a, b
![Page 28: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/28.jpg)
Recognizer ExamplesRecognizer Examples
• Accepts only , the null string
a,b
a,b
+/-
This is start and final state
![Page 29: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/29.jpg)
Recognizer ExampleRecognizer Example
This Recognizer Accepts the Language
L= { ab, a (aa) b, a (aa) (aa) b, ...
ab (bb), ab (bb) (bb), ... }
L = a (aa)* b ( b (aa)* b )*
- a
a
b
b
![Page 30: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/30.jpg)
New Example: Rabin-Scott MachineNew Example: Rabin-Scott Machine
S
F
1 2 3 4
1
40
, , ,
, , ;I a
s
M rs S I F, , , , s0
ps\input a + ;1 2 3 32 3 1 43 3 3 34 3 3 3
4
Now we transform this table to a graph
![Page 31: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/31.jpg)
The same Rabin-Scott machine as a graph
The same Rabin-Scott machine as a graph
L (M) = { x I* |* ( 1, x ) = 4 }
L (M) = { a; , a+a; , a+a+a; , ... }
aa
2
3 4
+
+ ;
;
a + ;
a + ;
1
![Page 32: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/32.jpg)
Non-Deterministic FSMNon-Deterministic FSM
A Non-deterministic Finite Automata Is a Quintuple with S, I, s0, F
as in a recognizer, but, M nd S I F, , , , s0
,,,,,,
,,,,,,
functiona not relation,a is
,,* *
jhged
fedcba
sssxs
sxssxs
SISSIS
![Page 33: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/33.jpg)
Non-Deterministic FSMNon-Deterministic FSM
• State May Change– to two (or any) different states in response to
the same input at the same state– in response to a string rather than just a single
element from the set of inputs– in response to a null string input
![Page 34: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/34.jpg)
DFA-NDFA TheoremDFA-NDFA Theorem
• Every NDFA Can Be Replaced by an Equivalent DFA
• Equivalent Means Not Only Accepting All Strings Accepted by the NDFA, but Also NOT Accepting Any Other strings
![Page 35: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/35.jpg)
NDFA ExampleNDFA Example
Non-deterministic Since
( ( 1, a ), 2 ) and ( ( 1, a ), 3 )
1
ab
2
3 4a
b
1
![Page 36: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/36.jpg)
NDFA ExampleNDFA Example
Non-deterministic Since Not Completely Specified
ab
4
1
abb
L = ab abb,
![Page 37: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/37.jpg)
NDFA ExampleNDFA Example
Non-deterministic Since State Changes in Response to a Null String.
ab
2
3 4a
1
bb
![Page 38: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/38.jpg)
NDFA to DFANDFA to DFANDFA to DFANDFA to DFA• Theorem
– For each NDFA there is an equivalent DFA
• Constructive Proof• 4 Difficulties to Resolve
– Missing transitions– Single transitions due to | strings | > 1– Transitions due to strings– Multiple transitions
![Page 39: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/39.jpg)
Problem: Missing TransitionsProblem: Missing Transitions
• I = { a, b }
• In DFA, all i I must be accounted for in each state
a
b ?
![Page 40: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/40.jpg)
Solution: Missing TransitionsSolution: Missing Transitions
Add a “sink” state which is not a final state and terminate all missing transitions there.
a
b
a, b
a, b
![Page 41: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/41.jpg)
Problem: | strings | > 1Problem: | strings | > 1
• Single transition due to string of size > 1
• Add intermediate states and “sink”, other characters in those states go to “sink” state
a
ab
a, b
b
a
![Page 42: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/42.jpg)
Problem: StringsProblem: Strings
Can’t just combine states sincea
ab
a bb
a
b
![Page 43: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/43.jpg)
Solution: Strings & Multiple Transitions
Solution: Strings & Multiple Transitions
• Eliminate by defining the set of next states which occur in response to no input, call this function E( )
• E( ) is called the “equivalents of ( )
![Page 44: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/44.jpg)
NDFA ExampleNDFA Example
> 1
2
3
4
a b
b a
b
a
![Page 45: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/45.jpg)
State EquivalentsState Equivalents
E( 1 ) = {self, explicit alternative} = { 1, 3 }
E( 2 ) = { 2 }
E( 3 ) = { 3 }
E( 4 ) = { 4 }
• Define a new machine based on the old using the E( ) states
> 1
2
3
4
a b
b a
b
a
![Page 46: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/46.jpg)
New MachineNew Machine
E a
E b
E a
E b
E a
E b
E a
E b E E b
1 2 3 4
1 5
2 5
2 3
3 3 4
3 5
4 5
4 1 4 4 1 3 4
, , , ,
, , ,
, ,
, ,
, , ,
, ,
, ,
, , , , , , ,
state 5 is new dead state
> 1
2
3
4
a b
b a
b
a
![Page 47: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/47.jpg)
New Machine Transition TableNew Machine Transition Table
Equivalent
OldState
NewState
Inputa
Inputb
E ( 1 ) { 1, 3 } A { 2,3,4 } = F 5 = EE ( 2 ) 2 B 5 = E 3 = CE ( 3 ) 3 C { 3, 4 } = G 5 = EE ( 4 ) 4 D 5 = E { E( 1 ), 4 }
{ 1, 3, 4 } = H
> 1
2
3
4
a b
b a
b
a
![Page 48: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/48.jpg)
New Machine Transition TableNew Machine Transition Table
Equivalent
Old State
New State
Input a
Input b
E ( 5 ) 5 E 5 = E 5 = E 2, 3, 4 F { 5, 3, 4 } = I { 3, 5, E(1), 4}
{ 1, 3, 4, 5} = J 3, 4 G { 3, 4, 5 } = I { 5, E(1), 4}
{ 1, 3, 4, 5} = J
1, 3, 4 H 2, 3, 4, 5 = L { 5, E(1), 4} { 1, 3, 4, 5} = J
> 1
2
3
4
a b
b a
b
a
![Page 49: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/49.jpg)
New Machine Transition TableNew Machine Transition TableOldState
NewState
Inputa
Inputb
3, 4, 5 I { 3, 4, 5 } = I { 5, E(1), 4}{ 1, 3, 4, 5} = J
1, 3, 4, 5 J { 2, 3, 4, 5 }= L { 5, E(1), 4}{ 1, 3, 4, 5} = J
2, 3, 4, 5 L { 5, 3, 4 } = I { 3, 5, 4, E(1) }{ 1, 3, 4, 5} = J
> 1
2
3
4
a b
b a
b
a
![Page 50: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/50.jpg)
DFA Equivalent of NDFADFA Equivalent of NDFA
> 1
2
3
4
a b
b a
b
a
![Page 51: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/51.jpg)
Reduced DFA EquivalentReduced DFA Equivalent
![Page 52: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/52.jpg)
Comparison of both machinesComparison of both machines
Discuss other methods of doing this transformation
![Page 53: Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 2 Updated and modified by](https://reader035.vdocuments.site/reader035/viewer/2022081513/56649d3a5503460f94a14ba4/html5/thumbnails/53.jpg)
HomeworkHomeworkHomeworkHomework• This is only homework example. Another homework may
be assigned.• 1. Describe any problem from real life, possibly related to
your previous research, experience from other classes or otherwise as a non-deterministic finite automaton NDA. You may use Kleene star and empty symbols, if necessary.
• 2. Convert it to a deterministic automaton DA.• 3. Try to minimize DA to Minimized MDA.• 4. Realize MDA using JK Flip-Flops and logic gates. • 5. Analyze its behavior using the logical diagram. Compare
to the initial description. Draw and write conclusions.