0% found this document useful (0 votes)
19 views8 pages

Lec 20

Uploaded by

ayesha
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)
19 views8 pages

Lec 20

Uploaded by

ayesha
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/ 8

Lecture 20

Theory Transition
of Graph (TG)
Automata • What is TG?
• How to
construct TG?
Lecture 20: Transition Graph (TG) – What is it and how to construct? [email protected]

It’s a method to define a language. R=b*(a+b)


1. Finite number of states in which at least one initial state and
finite state (i.e., can have more than one initial/final state) b
a,b
2. Dead End State is not required 1 q0 q1

3. One letter can move to more than one state


b
b b
a q1
q0 a
q1 q0 a 2 q0
b
3 q2
b 4 b q1

q2
b q2
q3 b
Lecture 20: Transition Graph (TG) – What is it and how to construct? [email protected]
4. Can read more than one character at a time
(i.e., it allows substring transition)

Q: Draw TG that accepts all words with triple


aaa or bbb over ∑={a,b} R=(a+b)*(aaa+bbb)(a+b)*

a q2
a,b a
a q1
a,b
1 q0 q3

b
q4
q5
b
b
Lecture 20: Transition Graph (TG) – What is it and how to construct? [email protected]
4. Can read more than one character at a time a,b
(i.e., it allows substring transition) a,b
q0 aaa
Q: Draw TG that accepts all words with triple q1
aaa or bbb over ∑={a,b} R=(a+b)*(aaa+bbb)(a+b)* a,b
5 a,b
a,b q2 bbb
q4
a,b
3 q0 aaa, bbb q4

a,b
a,b a,b q0 aaa a,b
aaa
2 q0
q1
4 a,b q1
a,b bbb
bbb q2 q2
Lecture 20: Transition Graph (TG) – What is it and how to construct? [email protected]

5. Can move to other state without any input like ε-nfa


(i.e., it allows epsilon / null / lambda transition
Q: L = a*b*aa

a b a b

ε aa b aa
q0 q1 q2 q0 q1 q2

aa
a b

q0 ^ q1
aa
q2
Lecture 20: Transition Graph (TG) – What is it and how to construct? [email protected]

1. Finite number of states in which at least one initial state and finite state
(i.e., can have more than one initial/final state)

2. Dead End State is not required

3. One letter can move to more than one state

4. Can read more than one character at a time


(i.e., it allows substring transition)

5. Can move to other state without any input like ε-nfa


(i.e., it allows epsilon / null / lambda transition)
Lecture 20: Transition Graph (TG) – What is it and how to construct? [email protected]

Q: Design a TG of a language that accepts the 0,1


strings having 00 as substring 0,1
q1 00
q2
R = (0+1)*00(0+1)*

Q: Design a TG of a language that accepts the p,q


strings having different starting and ending of p q
letters defined over ∑={p,q} q1 q2 q3

R = p(p+q)*q + q(p+q)*p p,q


q p
q4 q5 q6
Download Exam Preparation Material From
www.automataexam.blogspot.com

Theory Buy Laptops & Mobiles 70% Discounts


www.amazon.com/shop/programology

of Thank you 
Subscribe
Automata
By: Ali Hassan Soomro
BSCS from UBIT, University of Karachi
DAE in Electronics from SBTE
Facebook: www.facebook.com/AliiHassanSoomro
Gmail: [email protected]

You might also like