0% found this document useful (0 votes)
166 views5 pages

Theory of Automata and Formal Languages Unit 1

This document discusses unit 1 of the theory of automata and formal languages. It defines an automaton as a theoretical self-propelled computing device that follows a predetermined sequence of operations automatically. A language is defined as a set of strings chosen from some alphabet. The Kleene closure is introduced as the set of all finite strings formed by concatenating words from a set, where any word can be used any number of times. Finite automata are described as being "finite" because the number of possible states and letters in the alphabet are both finite, and "automatic" because the state change is totally governed by the input. Deterministic and non-deterministic finite automata are identified as the two types of finite automata.

Uploaded by

yahya fuad
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)
166 views5 pages

Theory of Automata and Formal Languages Unit 1

This document discusses unit 1 of the theory of automata and formal languages. It defines an automaton as a theoretical self-propelled computing device that follows a predetermined sequence of operations automatically. A language is defined as a set of strings chosen from some alphabet. The Kleene closure is introduced as the set of all finite strings formed by concatenating words from a set, where any word can be used any number of times. Finite automata are described as being "finite" because the number of possible states and letters in the alphabet are both finite, and "automatic" because the state change is totally governed by the input. Deterministic and non-deterministic finite automata are identified as the two types of finite automata.

Uploaded by

yahya fuad
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/ 5

11/29/23, 7:53 PM Theory of Automata and formal languages unit 1 | PPT

Search

Upload Login Signup

Recommended
1.3.2 non
deterministic finite
automaton
Sampath Kumar S
898 views • 11 slides

NFA or Non
 13 of 37   deterministic finite
automata
deepinderbedi
Theory of Automata and formal languages Download Now
48.7K views • 87 slides

unit 1 Download to read offline


Dec 31, 2016 • 14 likes • 2,070 views Finite automata
Dr. Abhineet Anand
5.4K views • 19 slides

Engineering
Finite Automata:
Automata Unit-1 Deterministic And
Non-deterministic…
Mohammad Ilyas Malik
Abhimanyu Mishra Follow 7.9K views • 24 slides
Asst.Prof. at JIET Engg College
Formal Languages
and Automata Theory
Unit 1
Srimatre K
1.2K views • 51 slides

Finite automata
Bipul Roy Bpl
3.1K views • 13 slides

https://www.slideshare.net/AbhimanyuMishra3/theory-of-automata-and-formal-languages-unit-1 1/5
11/29/23, 7:53 PM Theory of Automata and formal languages unit 1 | PPT

More Related Content


What's hot (20)

Automata theory - Push Do… Deterministic Finite Autom… Finite Automata Theory of computation an…
Akila Krishnamo… • 1.5K views Animesh Chaturv… • 6.1K views Mukesh Tekwani • 29K views Prof. Dr. K. Adisesha • 481 view

Viewers also liked (20)

Introduction to fa and dfa Os2 2 Class9 Os5 2


deepinderbedi • 19.4K views issbp • 874 views issbp • 1.1K views issbp • 312 views

Similar to Theory of Automata and formal languages unit 1 (20)

Deterministic finite autom… Teori automata lengkap Finite automata Materi 3 Finite State Autom
Muhammad Love … • 358 views Muhammad Love … • 486 views Rajesh Yaramadi • 733 views ahmad haidaroh • 366 views

Slideshows for you (20)

https://www.slideshare.net/AbhimanyuMishra3/theory-of-automata-and-formal-languages-unit-1 2/5
11/29/23, 7:53 PM Theory of Automata and formal languages unit 1 | PPT

lasers ppt Radiography Soft tissue replacement Parts, structure and functi…
Hemanth G • 113.5K views faheem maqsood • 9.7K views sharma93vidushi • 7.6K views AtheenaPandian … • 9.9K vie

More from Abhimanyu Mishra (18)

Cd unit i Presentation1(JIT gnomio) Sta unit 5(abimanyu) Sta unit 3(abimanyu)


Abhimanyu Mishra • 778 views Abhimanyu Mishra • 478 views Abhimanyu Mishra • 1.8K views Abhimanyu Mishra • 186 view

Recently uploaded (20)

String.pptx FLOW IN PIPES NOTES.pdf Activated sludge process .pdf Informed search algorithm
Ananthi Palanisamy • 45 views Dearest Arhelo • 82 views 8832RafiyaAltaf • 6 views Dr.Shweta • 12 views

Related Books
Free with a 30 day trial from Everand View All

https://www.slideshare.net/AbhimanyuMishra3/theory-of-automata-and-formal-languages-unit-1 3/5
11/29/23, 7:53 PM Theory of Automata and formal languages unit 1 | PPT

Ebook Ebook Ebook Ebook Ebook E


Algebraic Shortcuts to Real Analysis and Numerical Application of O
Equations College Calculu… Probability:… Analysis II… Derivatives… a
Demetrios P. Kanou… Juan Acevedo Robert P. Ash The Editors of REA Mohmmad Khaja Sh… J
0/5 0/5 0/5 0/5 5/5

Theory of Automata and formal languages unit 1


1. THEORY OF AUTOMATAAND FORMAL LANGUAGES UNIT-I ABHIMANYU MISHRA ASSISTANT PROF.(CSE) JETGI Abhimanyu Mishra(CSE) JETGI12/31/2016
2. What is Automata? AUTOMATA An Automation derived from the Greek word which means "self-acting". An automaton (Automata in plural) is an theoretical self-propelled computing
device which follows a predetermined sequence of operations automatically. “A set of string all of which are chosen form some ∑*,where ∑ is particular alphabet, is called a language". If
∑ is an alphabet, and L<= ∑*, then L is said to be language over alphabet ∑. KLEENE CLOSURE “If S is a set of words then by S* we mean the set of all finite strings formed by
concatenating words from S, where any word may be used as often we like, and where the null string is also included” For example if ∑={0,1} ∑* ={ €,0,1,00,01,10,11,000,001,…………}
Abhimanyu Mishra(CSE) JETGI12/31/2016
3. Finite automation is called “finite” because number of possible states and number of letter in the alphabet are both finite, and “automation” because the change of the state is totally
governed by the input. it is deterministic, since, what state is next is automatic not will-full, just as the motion of the hands of the clock is automatic, while the motion of hands of a
human is presumably the result of desire and thought. THERE ARE TWO TYPES OF FINITE AUTOMATA (A) DETERMINISTIC FINITE AUTOMATA(DFA) (B) NON DETERMINISTIC FINITE
AUTOMATA(NDFA) FINITE AUTOMATA Abhimanyu Mishra(CSE) JETGI12/31/2016
4. DETERMINISTIC FINITE AUTOMATA(DFA) IS A QUINTUPLE (Q,Σ, δ,q0,F) 1. where :Q is a finite set of states. 2. Σ is a finite set of symbols, called the alphabet of the automaton. 3. δ is the
transition function, that is, δ: q × Σ → Q. 4. q0 is the start state, that is, the state of the automaton before any input has been processed, where q0∈ Q. 5. F is a set of states of q (i.e. F⊆Q)
called accept states. (A) DETERMINISTIC FINITE AUTOMATA(DFA) Abhimanyu Mishra(CSE) JETGI12/31/2016
5. A.1 PROCESSING OF STRINGS BY DFA • Suppose a1,a2,………………… an is a sequence of input symbols. We start out with deterministic finite automata having q1,q2,…………………
qn states where q0 is the initial state and qn is the final state and transition function and processed as……….. δ(q0, a1 ) = q1 δ(q1, q2 ) = q2 . . . . δ(qn-1 , qn ) = qn Input
a1,a2,………………… an is said to be “accepted” since qn is the member of the final states, and if not then it is “ rejected” Abhimanyu Mishra(CSE) JETGI12/31/2016
6. A.2 TRANSITION GRAPH • A transition graph is a collection of three things: 1. A finite set of states, at least one of which is designated as the start state. start state final state 2. An
alphabet Σ of possible input letters from which input strings are formed. 3. A finite set of transitions that show how to go from some states. Abhimanyu Mishra(CSE) JETGI12/31/2016
7. A.3 TRANSITION DIAGRAM Transition Diagram Notations: A transition diagram for DFA, M=(Q,Σ, δ,q0,F) is a graph defined as follows: (a) For each state in Q there is a node represented
by the circle. (b) For each state q in Q and each input symbol a in Σ, let δ(q,a)=P. a a a,b or or b (c) If any state q in Q is the starting state then it represented by the circle with arrow as q P q
P q P q Abhimanyu Mishra(CSE) JETGI12/31/2016
8. A transition table is a conventional, tabular representation of a function like δ that takes two arguments and return a state. The rows of the table correspond to the states, and the
columns correspond to the input. State δ(q,a). For example: q0 is the starting state and q2 is the final state A.4 TRANSITION TABLES δ/ Σ a b q0 q1 q2 q1 q2 q0 q2 q2 q2 Abhimanyu
Mishra(CSE) JETGI12/31/2016
9. And the transition diagram: b a a a,b Q={q0, q1, q2 } F={q2 } δ(q0 , a) = q1 , δ(q0 , b) = q2 δ(q0 , a) = q2 , δ(q0 , b) = q0 δ(q0 , a) = q2 , δ(q0 , b) = q2 q0 q0 q1 q2 Abhimanyu Mishra(CSE)
JETGI12/31/2016
10. Example 1:- • Design a FA that accepts set of strings such that every string end in 00, over alphabet: {0,1} Σ = { 0,1} Sol:- We have M= (Q,Σ, δ,q0,F) be the DFA q0 : initial state, Σ : {0,1} is
given 0,1 Start 0 0 First we will decide the approach to design FA. It is not an easy task to think FA as a whole, So first we have to fulfill minimum condition i.e every string end in 00. q0 q1
q2 Abhimanyu Mishra(CSE) JETGI12/31/2016
11. Facts in Designing Procedure of Finite Automata (a) In the designing of FA, First of all we have to analyze the set strings language which is accepted by the FA. (b) Make sure that every
state is check for the output state for every symbol of Σ. (c) Make sure, that there is one initial state and at least one final state in transition diagram of FA. (d) Make sure that no state must
have two different output state for a single input symbol. Abhimanyu Mishra(CSE) JETGI12/31/2016
12. Nondeterministic finite automaton with ε-moves (NFA-ε) is a further simplification to NFA. this automaton replaces the transition function with the one that allows the empty string
ε as a possible input. the transitions without overwhelming an input symbol are called ε-transitions. Let M be NFA then M is Defined as: M = (Q,Σ, δ,q0,F) (1) a finite set of states q0 (2) a
finite set of input symbol Σ (3) a transition function δ : q × Σ → P(q). (4) an initial (or start) state q0 ∈ Q (5) a set of states f distinguished as accepting (or final) states F ⊆ Q (B) NON
DETERMINISTIC FINITE AUTOMATA(NDFA) Abhimanyu Mishra(CSE) JETGI12/31/2016
13. 0,1 0,1 0 0 START 0,1 1 1 according to analysis it is clear that NFA will accepts the strings of the pattern 00,11,101000,101100,…………………….. Example 1: Design a NFA for the
language L= all strings over {0,1} that have at least two consecutive 0 and 1. q0 q1 q2 q2 q4 Abhimanyu Mishra(CSE) JETGI12/31/2016
14. Procedure for converting NFA to equivalent DFA. 1) intially Q=ɸ. 2) Put {q0 } into Q. 3) Then for each state q in Q do the following add this new state, add δ(q,a) = ᴜp€q δ(p,a) to δ on
the right hand side is that of NFA 4) Repeat step 3 till new states. TRANSFORMATION OF NFA TO DFA Abhimanyu Mishra(CSE) JETGI12/31/2016
15. Example:1 Convert the following NFA in to DFA a,b b • Start a a a,b b q0 q3 q2q1 Abhimanyu Mishra(CSE) JETGI12/31/2016
16. Solution Step 1 ( We get new state) δ(q0, a ) = {q0, q1 } New single state δ(q0, b ) = {q0 } Step 2 In step 1 we are getting a new state {q0, q1 }. Now repat step 1 for this new state only, so
all transition of a and b from {q0, q1 } as δ({q0 , q1 },a) = δ(q0, a ) U δ(q1, a ) = {q0, q1 } U {q0 } = {q0, q1, q2 } New single state δ({q0 , q1 },b) = δ(q0, b ) U δ(q1, b ) = {q0, q1 } Step3 Repeat step
2 δ({q0 , q1, q2 },a) = δ(q0, a ) U δ(q1, a ) U δ(q2, a) = {q0, q1 } U {q2 }U {q3 } = {q0 , q1, q2, q3 } New single state δ({q0 , q1, q2 },b) = δ(q0, b ) U δ(q1, b ) U δ(q2, b) = {q0 , q1, q3 } New single
state Abhimanyu Mishra(CSE) JETGI12/31/2016

https://www.slideshare.net/AbhimanyuMishra3/theory-of-automata-and-formal-languages-unit-1 4/5
11/29/23, 7:53 PM Theory of Automata and formal languages unit 1 | PPT
17. Step 4: Repeat Step 3 δ({q0 , q1, q2, q3 },a) = {q0 , q1, q2, q3 } OLD STATE δ({q0 , q1, q2, q3 },b) = {q0 , q1, q2, q3 } OLD STATE Step 5: Repeat Step 4 δ ({q0 , q1, q3 },a) = {q0 , q1, q2, q3 }
OLD STATE δ ({q0 , q1, q3 },b) = {q0 , q1, q2, q3 } OLD STATE Now Transition table δ/ Σ a b q0 {q0, q1 } {q0 } {q0, q1 } {q0, q1, q2 } {q0, q1 } {q0, q1, q2 }* {q0 , q1, q2, q3 } {q0 , q1, q3 } {q0 , q1,
q2, q3 }* {q0 , q1, q2, q3 } {q0 , q1, q2, q3 } {q0 , q1, q3 }* {q0 , q1, q2, q3 } {q0 , q1, q2, q3 } Abhimanyu Mishra(CSE) JETGI12/31/2016
18. Lets Mark the whole structure in Alphabets q0 A {q0, q1 } B {q0, q1, q2 } C {q0 , q1, q2, q3 } D {q0 , q1, q3 } E Abhimanyu Mishra(CSE) JETGI12/31/2016
19. A is initial state and C,D and E are final states since they contain q2, q3 as member which are final states of NFA • Transition Table δ/ Σ a b A B A B C B *C D E *D D D *E D D Abhimanyu
Mishra(CSE) JETGI12/31/2016
20. Final Transition Diagram • b b • Start a • a • b • a a • b • a,b A D E C B Abhimanyu Mishra(CSE) JETGI12/31/2016
21. NFA with ∈ -Transitions • IF a FA is modified to permit transition without input symbols, along with zero, one or more transition on input symbols, then we get NFA with ∈- transition,
because the transition made without symbols are called as ∈- transitions. 0 1 0 Start ∈ ∈ Abhimanyu Mishra(CSE) JETGI q0 q1 q2 12/31/2016
22. Example:2 Consider the NFA with ∈-transition M =(Q,Σ, δ,q0,F) Q={q0, q1, q2 } Σ={a,b,c} and ∈ moves Initial state ={q0 } F= { q2 } δ/ Σ a b c ∈ q0 {q0} {ɸ} {ɸ} {q1} q1 {ɸ} {q1} {ɸ} {q2} *q2
{ɸ} {ɸ} {q2} {ɸ} Abhimanyu Mishra(CSE) JETGI12/31/2016
23. And the transition Diagram: NFA with ∈-transition a b c Start ∈ ∈ Abhimanyu Mishra(CSE) JETGI q0 q1 q2 12/31/2016
24. SOLUTION:- Step 1- Find the states of NFA without ∈-transition including initial state and final states as follows: (i) Initial state will be ∈ -closure of initial state of NFA with ∈-
transitions in ∈-closure(q0) = {q0, q1, q2 } (New Initial state for NFA without ∈ transition) (ii) Rest of the states are: ∈-closure(q1) ={q1, q2 } New State ∈-closure(q2) ={q2} New State (iii) The
final states of NFA without ∈-transition are all those new states which contains final state of NFA with ∈- transition as members. M’ =(Q’,Σ’, δ’,q0’,F’) Q’ =({q0, q1, q2 } ,{q1, q2 }, {q2} ) Step 2-
Now we have to decide δ’ to find out the transition as follows δ’ ({q0, q1, q2},a) = ∈-closure(δ(q0, q1, q2 ),a) = ∈-closure(δ(q0, a)U(δ(q1, a)U(δ(q2, a)) = ∈-closure(δ(q0U ɸU ɸ) = ∈-
closure(q0) = {q0, q1, q2 } Abhimanyu Mishra(CSE) JETGI12/31/2016
25. Similarly, δ’ ({q0, q1, q2},b) = ∈-closure(δ(q0, q1, q2 ),b) = ∈-closure(δ(q0, b)U(δ(q1, b)U(δ(q2, b)) = ∈-closure(δ(ɸ U q1U ɸ) = ∈-closure(q1) = {q1, q2 } δ’ ({q0, q1, q2},c) = ∈-
closure(δ(q0, q1, q2 ),c) = ∈-closure(δ(q0, c)U(δ(q1, c)U(δ(q2, c)) = ∈-closure(δ(ɸ U ɸU q2) = ∈-closure(q2) = { q2} So we write same for others, δ’ ({q1, q2},a) = ɸ δ’ ({q1, q2},b) = {q1, q2} δ’
({q1, q2},c) = {q2} δ’ ({q2},a) = ɸ δ’ ({q2},b) = ɸ δ’ ({q2},c) = {q2} Abhimanyu Mishra(CSE) JETGI12/31/2016
26. So, transition table for NFA ∈-transition will be as: δ/ Σ a b c {q0, q1, q2}* {q0, q1, q2} {q1, q2 } { q2} {q1, q2 }* ɸ {q1, q2 } { q2} { q2}* ɸ ɸ { q2} Abhimanyu Mishra(CSE) JETGI12/31/2016
27. {q0, q1, q2} as qx {q1, q2 } as qy { q2} as qz • a b start b c c c NFA without ∈-transition Abhimanyu Mishra(CSE) JETGI qx qz qy 12/31/2016
28. MINIMIZATION ALGORITHM FOR DFA (i) all states are unreachable from the initial state via any set of transition of DFA M are removed (ii) draw the transition tables for rest states, after
removing the unreachable states (iii) split the transition table in two tables (iv) find the similar rows (v) Repeat the same process (vi) Now combined the Reduced tables, and removing
non reachable states, dead states. Minimization of DFA’S Abhimanyu Mishra(CSE) JETGI12/31/2016
29. Example 1 : Minimize the DFA given below • Start b a b b a a b a a b a a b a b b Abhimanyu Mishra(CSE) JETGI q0 q4 q7 q6 q1 q0 q3 q2 12/31/2016
30. STEP 1: Remove the unreachable states from the given DFA. the DFA given in diagram q3 is unreachable state so remove it. STEP 2: Draw the Transition table for rest states. Solution :
Abhimanyu Mishra(CSE) JETGI δ/ Σ a b q0 q5 q1 q1 q2 q6 *q2 q2 q0 q4 q5 q7 q5 q6 q2 q6 q7 q6 q7 q2 q6 12/31/2016
31. Step 3: Now divide rows of transition table in two sets as: • (i) • (ii) Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q4 q5 q7 q5 q6 q2 q6 q7 q6 q7 q2 q6 *q2 q2 q0 12/31/2016
32. row 2 and row 6,are similar since q1 and q7 transit to same states on a and b, so skip of them row 6 then q7 is replaced by q1 in the rest Step 4: Apply step 4 on both the sets
individually. Now consider set (i) Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q4 q5 q7 q5 q6 q2 q6 q7 q6 q7 q2 q6 12/31/2016
33. Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q4 q5 q1 q5 q6 q2 q6 q4 q6 12/31/2016
34. Step 5 Repeat step 4 same process Again Row 1 and Row 3 Similar q0 q5 q1 q1 q2 q6 q4 q5 q1 q5 q6 q2 q6 q4 q6 Abhimanyu Mishra(CSE) JETGI q0 q5 q1 q1 q2 q6 q5 q6 q2 q6 q0 q6
12/31/2016
35. Step 6 Combined Set minimized sets Now below minimized Transition table. δ/ Σ a b q0 q5 q1 q1 q2 q6 q5 q6 q2 q6 q0 q6 *q2 q2 q0 Abhimanyu Mishra(CSE) JETGI12/31/2016
36. Transition Diagram of Minimized DFA Start b b a b a a a b b a Abhimanyu Mishra(CSE) JETGI q6 q0 q2q5 q1 12/31/2016
37. Myhill-Nerode theorem is used to eliminate useless states from a DFA. Myhill-Nerode Theorem says the three statements are equivalent: (i) The language L, a subset of Σ*, is accepted
by a DFA (ii) L is the union of some of the equivalence classes of right invariant equivalence relation of finite index. (iii) Let equivalence relation RL be defined by: xRLy if and only if for all Z
in Σ*, xz is in L exactly when yz is in L. Then RL is of finite index THANKS MYHILL-NERODE THEOREM Abhimanyu Mishra(CSE) JETGI12/31/2016

About Support Terms Privacy Copyright Cookie Preferences Do not sell or share my personal information English 

© 2023 SlideShare from Scribd  

https://www.slideshare.net/AbhimanyuMishra3/theory-of-automata-and-formal-languages-unit-1 5/5

You might also like