0% found this document useful (0 votes)
78 views17 pages

Automata Slides

The document discusses different types of finite automata including deterministic finite automata (DFA) and non-deterministic finite automata (NFA). It provides examples of DFAs and NFAs. It also describes how to convert an NFA to a DFA by naming all states and creating a transition table with a single output state for each input. The conversion ensures there is only one transition for each input character, a requirement for DFAs. Finally, it shows how to represent a finite automaton as a regular expression.

Uploaded by

Ali Saivi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views17 pages

Automata Slides

The document discusses different types of finite automata including deterministic finite automata (DFA) and non-deterministic finite automata (NFA). It provides examples of DFAs and NFAs. It also describes how to convert an NFA to a DFA by naming all states and creating a transition table with a single output state for each input. The conversion ensures there is only one transition for each input character, a requirement for DFAs. Finally, it shows how to represent a finite automaton as a regular expression.

Uploaded by

Ali Saivi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

TYPES OF FINITE AUTOMATA

INSTRUCTOR: ALI RAZA MUSHTAQ


[email protected]
TYPES OF AUTOMATA

FA

NFA ^ NFA DFA


Non Deterministic Finite Automata Null
Deterministic Finite Automata
Non Deterministic Finite Automata
DETERMINISTIC FINITE AUTOMATA

“At Every State, There Should must be a Transition for Every Character / Literals”

“For Every single Character there must be only one Transition”

EXAMPLE:

a b
- +

This is a Not DFA because not Complete Transition for every Literals
DETERMINISTIC FINITE AUTOMATA
a
EXAMPLE:
a, b
a b
- +

This is a DFA because Every Complete Transition for every Literals


NON-DETERMINISTIC FINITE AUTOMATA

“At Every state , there should more than one transition for every character is
Call NFA”

EXAMPLE: a

a b
- +

“NFA because two Transition for Same Literal”


NON-DETERMINISTIC FINITE AUTOMATA NULL

“At Every state , there should more than one transition for every character is
Call NFA”

EXAMPLE: Ʌ

a b
- +

“NFA because two Transition for Same Literal”


IN NUMBER SYSTEM

“In Binary Number system there exist some Conversion”

Binary Decimal Octal

“Similarly In Finite Automata there exist some Conversion”

NFA Ʌ NFA DFA


NFA → DFA
Steps:

1. Name all the states from initial to final


2. Make a Table.

Examples:
Convert NFA to DFA
b
a

-
a b

b
NFA → DFA
Steps#1:

Name all the states from initial to final

b
a
q1 q2
-
q0
a b
q3 q4 q5
b
NFA → DFA
Steps#2:
Make a Table

Input States Input output States


q0 a q1q3 b
a
q0 b q1 q2
-
q1q3 -
a -
q0
q1q3 b q2q4 a b
q3 q4 q5
q2q4 a - b
q2q4 b q5
q5 a -
q5 b -
NFA → DFA
b
Input States Input Output states
q1q3 q2q4
q0 a q1q3
a
q0 b - b

q1q3 a -
-
q1q3 b q2q4 q0 a a
q2q4 a -
q2q4 b q5 q5
Trap
q5 a -
q5 b - b a, b

In this DFA only one Transition for every Character


NFA → DFA
Steps:

1. Name all the states from initial to final


2. Make a Table.

Examples:
Convert NFA to DFA
1 0,1 0,1

0,1
FA → RE:
(0+1)*1(0+1)(0+1)
NFA → DFA
Steps#1:

Name all the states from initial to final

1 0,1 0,1

- q0 q1 q2 q3

0,1
NFA → DFA
Steps#2:
Make a Table

Input States Input output States


q0 0,1 0,1
0 q0 1
q0 1 q0q1
q1 q2 q3
q0q1 0 q0q2 - q0
q0q1 1 q0q1q2
q0q2 0 q0q3
q0q2 1 q0q1q3
0,1
q0q1q2 0 q0q2q3
q0q1q2 1 q0q1q2q3
NFA → DFA
Steps#2:
Make a Table

Input States Input output States


q0q3 0,1 0,1
0 q0 1
q0q3 1 q0q1
q1 q2 q3
q0q1q3 0 q0q2 - q0
q0q1q3 1 q0q1q2
q0q2q3 0 q0q3
q0q2q3 1 q0q1q3
0,1
q0q1q2 0 q0q2q3
q0q1q2 1 q0q1q2q3
Input States Input Output 1
states
q0 0 q0 0 q0q1q2
q0 1 q0q1 q0q2
0 q0q1
q0q1 0 q0q2 1
q0q1 1 q0q1q2
q0q2 0 q0q3
1 0 1
q0q2 1 q0q1q3 -
1 0
q0 1 0
q0q1q2 0 q0q2q3
q0q1q2 1 q0q1q2q3
q0q1q2q3
q0q3 0 q0
0 q0q3
q0q3 1 q0q1
q0q1q3 0 q0q2 q0q2q3
0
q0q1q3 1 q0q1q2 1
q0q1q3 1
q0q2q3 0 q0q3
q0q2q3 1 q0q1q3
0
q0q1q2q3 0 q0q2q3
q0q1q2q3 1 q0q1q2q3 In this DFA only one Transition for every Character

You might also like