You are on page 1of 10

Lecture 03 – Є Non-Deterministic Finite Automata

• Introduction to Є Non-Deterministic Finite Automata (Є NFA)


• Construction of Є NFA and it’s Problem

2/11/2024
Representation

Descriptive

Graphical Transition stategraph diagraph

TransitionTable

Finite Automata

Deterministic Nondeterministic
FA FA
DFA NFA NDFA

There should be a There are

path link forevery possible input Zero


One
may maynot have dead configuration
Multiple

dead configuration is allowed path link forevery possible input

8 QX Q dead configuration is notallowed

8 Q 2
Introduction – Є NFA
FA with -Transitions

 We can allow explicit -transitions in finite automata.


 i.e., a transition from one state to another state without consuming any additional input symbol.

 Explicit -transitions between different states introduce non-determinism.

 Makes it easier sometimes to construct NFAs.

 Definition: - NFAs are those NFAs with at least one explicit -transition defined.
 -NFAs have one more column in their transition table.

 Why Є state?
 When you don’t know precisely the current state then we use Є (epsilon)

2/11/2024 2
Introduction – Є NFA

 Example of -NFA
0 0, 1

A B D yes
0 1
yes
C

 Here’s the transition also perform with “ ” (non-input).


 State are changed without any input, i.e. “ ” input

2/11/2024 3
Introduction – Є NFA
 -NFAs
 -NFAs can also be represented by a set (Q, Σ, δ, q0, F)

 Q  Finite set of states

 Σ  Input alphabet

 δ  Transition function

 q0  Starting / Initial state

 F  set of final state

The only difference from the rest of FA’s is in


the transition δ

2/11/2024 4
Introduction – Є NFA

 Q  Finite set of states  {A, B, C, D} 0 0, 1

 Σ  Input alphabet  {0, 1, } A B D

0 1
 q0  Starting / Initial state  {A}
C
 F  set of final state  {D}

 δ  Transition function  Q * Σ U { }  2Q

2/11/2024 5
Introduction – Є NFA

 Example of -NFA
0 0, 1

A B D

0 1
A
C A
B D
that
thing
every with
dealt
D
 - closure (A) = {A, B, D}

 -closure of a state A, is the set of all states (including itself) that can be reached from
A by repeatedly making an arbitrary number of -transitions.

2/11/2024 6
Introduction – Є NFA

 Example of  -NFA

 L = { w | w is empty, or if non-empty will end in 01} Simulate for w =101 ?


0,1

0 1
q0 q1 q2
q0’
  
start q0’ q0
q’0
1x 1
δE 0 1  Ø q0
0
→*q’0 Ø Ø {q’0,q0}
q1
q0 {q0,q1} {q0} {q0} 1
q1 Ø {q2} {q1} q2
* q2 Ø Ø {q2}

2/11/2024 7
Introduction – Є NFA

 Example of -NFA
0,1 Simulate for w =101 ?

0 1
q0 q1 q2
  1
go go
q’0 q3 go
go
a a
I
q 92
δE 0 1  i
→ *q’0 Ø Ø {q’0,q0,q3}
q0 {q0,q1} {q0} {q0,q3}
q1 Ø {q2} {q1}
* q2 Ø Ø {q2}
q3 Ø {q2} {q3}

2/11/2024 8
End of Lecture - 03
Any questions?

2/11/2024 9

You might also like