0% found this document useful (0 votes)
15 views

FAFL Final Lecture 5.1

Uploaded by

shruthi g
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)
15 views

FAFL Final Lecture 5.1

Uploaded by

shruthi g
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/ 16

Established as per the Section 2(f) of the UGC Act, 1956

Approved by AICTE, COA and BCI, New Delhi

Lecture 5.1
Deterministic Finite Automata
School of Computing and Information
Technology
Ms. Shruthi G
shruthi.g@reva.edu.in

AY:2020-2021
OUTLINE
Recap of Previous Lecture

Topic of the Lecture

Objective and Outcome of Lecture

Lecture Discussion

• DFA accepting strings based on length of the string.


• DFA accepting strings based on symbols count.
• DFA accepting strings based on binary to decimal conversions.
• Miscellaneous problems on DFA construction.
Deterministic Finite Automata
Recap of Previous Lecture
RECAP OF PREVIOUS LECTURE

DFA accepting strings that containing given Suffix

Course Description
DFA accepting strings that containing given Substring

The Language Accepted and Rejected by the DFA

DFA accepting strings that do not contain given Suffix/Prefix/Substring


Deterministic Finite Automata
Topic of the Lecture
TOPIC OF THE LECTURE

DFA accepting strings based on length of the string.

DFA accepting strings based on symbols count.


Deterministic Finite Automata
Objective and Outcome of Lecture
OBJECTIVE AND OUTCOME OF LECTURE

• Explain the construction of DFA to accept the strings based


Lecture on the length of the string, symbols count, binary to decimal
Objective conversions and the strings that hold miscellaneous
properties.

• Construction of DFA to accept the strings based on the


Lecture length of the string, symbols count, binary to decimal
Outcome conversions and the strings that holds miscellaneous
properties.
Deterministic Finite Automata
DFA accepting strings based on length of the
String
DFA ACCEPTING STRINGS BASED ON LENGTH OF
Problem
T H E S TSolving
RING
Construct a DFA to accept the string over { a, b } such that the length of the string
is even.
Here
Ʃ={a, b} and L = {λ, aa, ab, ba, bb, aaaa, aaab, aaba, aabb, abaa, … }

Solution
δ a b
a, b
q0 q1 *q0 q1 q1
a, b

q1 q0 q0
DFA ACCEPTING STRINGS BASED ON LENGTH OF
Problem
T H E S TSolving
RING
Construct a DFA to accept the string over { a, b } such that the length of the string
is multiple of 3.
Here
Ʃ={a, b} and L = {λ, aaa, aab, aba, abb, baa, bab, bba, … }

Solution δ a b

a, b a, b *q0 q1 q1
q0 q1 q2
q1 q2 q2
a, b
q2 q0 q0
DFA ACCEPTING STRINGS BASED ON LENGTH OF
Problem
T H E S TSolving
RING
Construct a DFA to accept the string over { a, b } such that the string begin with
“a” and length of the string when divided by 3 results reminder as 2.
Here
Ʃ={a, b} and L = {aa, ab, aaaaa, aaaab, aaaba, aaabb, aabaa, aabab, aabba, … }

Solution a, b δ a b
qx q1 ɸ
a a, b a, b q1 q2 q2
qx q1 q2 q0
q2 q0 q0
b
ɸ a, b q0 q1 q1
ɸ ɸ ɸ
Deterministic Finite Automata
DFA accepting strings based on symbols Count
DFA ACCEPTING STRINGS BASED ON SYMBOLS
Problem
C OUNT Solving
Construct a DFA to accept the strings that contain even number of symbols “a”
and odd number of symbols “b” over an alphabet {a, b}.
Here
Ʃ={a, b} and L = {b, aab, baa, aba, abaaa, baaaa, aabaa, aaaba, bbb, babab, …}

Solution a δ a b
q00 a q10
q00 q10 q01
b b b b *q01 q11 q00

a q10 q00 q11


q01 q11
a q11 q01 q10
DFA ACCEPTING STRINGS BASED ON SYMBOLS
Problem
C OUNT Solving
Construct a DFA to accept the binary strings that contain number of “0”s multiple
of 3 and number of “1”s multiple of 4 over an alphabet {0, 1}.
Here Ʃ={a, b} and L = {λ, 000, 1111, 0001111,1000111, 0101011, 1100011, 1110001, …}
Solution 1
1 1 1
q00 q01 q02 q03
0 0 0 1 0

q10 1 q11 1 q12 1 q13


0 0 0 1 0
1 1 1
q20 q21 q22 q23
0 0 0 0
DISCUSSION
5 MINUTES

Construct a DFA to accept strings that contain the substring λ over an alphabet {a, b}.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy