77 views

Uploaded by manpreetsekhon

DFA

- 22
- A4
- 2. Minimization of DFA
- 1 Set Theory
- Automata Syl l
- Mapping It Erator
- Lesson Plan Math Discrete
- Problem Set 1 (theory of automota)
- Fix Free
- 18 Closures of Relations
- Export Ar 120606082144
- Syllabus Bs It Msc It Computer Science Uos
- SR2_DFA
- cd0309.pdf
- Wiki Snapshot
- data_structure_aima_third_full.ppt
- Placement Questions 2013-2014
- Awt Assignment 1
- UT Dallas Syllabus for cs2305.001.08s taught by Simeon Ntafos (ntafos)
- Community Detection in Graphs PDF

You are on page 1of 7

Minimization of DFA refers to the construction of finite automata with minimum no. of states which is equivalent to the given finite automata. For any given language, there may be many DFAs that accept it. To understand the minimization first of all one should be very clear about the dead state, Inaccessible states and indistinguishable states, so let us discuss them first. Dead State: Any transitions to a dead state become undefined. A state is a dead state if it is not accepting state and has no out-going transitions except to itself. For Example: Let = {0, 1}, q0 is the initial state, q1 is final state

Here, In above example q2 is a dead state as there is no such transition from q2 which reach final state i.e. q1 Unreachable / Inaccessible State: All those states which can never be reached from initial state are called inaccessible states. For example:

In above example, q3 is the state which is not reachable from q0 (initial state). So q3 is the unreachable state. Equivalent / Indistinguishable States: Two states q and r of DFA are called distinguishable if (q,w) F => (r,w) F and where (q,w) F => (r,w) F w *

Non-Equivalent / Distinguishable States: Two states q1 and q2 of DFA are called distinguishable if (q1,w) F and (q2,w) F where w *

Process of Minimization: 1. Detect unreachable states. 2. Eliminate unreachable states(if any). 3. Indentify equivalent states and merge them. (i) Divide all states into groups. Eg: Group A Final States Group B Non- Final or Rejected States (ii) Repeat for every group and for every state in the group. (iii) Find which groups input leads to differences i.e. if there are differences then partition the group into two sets containing states which go to same group under the input until no partition is required. 4. Detect dead states. 5. Eliminate dead states.

Minimization Algorithm for DFA Construct a partition = { A, Q - A } of the set of states Q ; }; new := new_partition( while ( ; new := new_partition( ; final :=

new

:=

new

function new_partition( ) for each set S of do partition S into subsets such that two states p and q of S are in the same subset of S if and only if for each input symbol, p and q make a transition to (states of) the same set of . The subsets thus formed are sets of the output partition in place of S. If S is not partitioned in this process, S remains in the output partition.

end

final

as follows:

Select one state in each set of the partition final as the representative for the set. These representatives are states of minimum DFA M 1. Let p and q be representatives i.e. states of minimum DFA M 1. Let us also denote by p and q the sets of states of the original DFA M represented by p and q, respectively. Let s be a state in p and t a state in q. If a transition from s to t on symbol a exists in M, then the minimum DFA M1 has a transition from p to q on symbol a. The start state of M1 is the representative which contains the start state of M. The accepting states of M1 are representatives that are in A. Note that the sets of final are either a subset of A or disjoint from A. Remove from M1 the dead states and the states not reachable from the start state, if there are any.

Example 1: Let us try to minimize the number of states of the following DFA.

Step1: Detect Unreachable states. In above example, Q= {q0,q1,q2,q3,q4,q5,q6,q7} U= Q-T ={q0,q1,q2,q3,q4,q5,q6,q7}- {q0,q1,q2,q4,q5,q6,q7} ={q3} Here, we detect q3 as unreachable state. Step2: Eliminate unreachable states. In above example, q3 is unreachable state so eliminate q3. After eliminating unreachable state transition table is: Transition Table: \ q0 q1 q2 q4 q5 q6 q7 0 q1 q6 q0 q7 q2 q6 q6 1 q5 q2 q2 q5 q6 q4 q2

Step3: Indentify Equivalent staes and merge them. Q01={q2} Q02 = { Q- Q01} = {q0,q1,q4,q5,q6,q7} 0={{q2},{q0,q1,q4,q5,q6,q7} 1={{q2},{q0,q4,q6},{q1,q7},{q5}} 2={{q2},{q0,q4},{q6},{q1,q7},{q5}} 3={{q2},{q0,q4},{q6},{q1,q7},{q5}} There is no further splitting possible as 2 and 3 becomes same. Now, design minimized DFA

Example 2 : Let us try to minimize the number of states of the following DFA.

Initially

= { { 1 , 5 } , { 2 , 3 , 4 } }.

new_partition is applied to . Since on b state 2 goes to state 1, state 3 goes to state 4 and 1 and 4 are in different sets in , states 2 and 3 are going to be separated from each other in new . Also since on a sate 4 goes to sate 4, state 3 goes to state 5 and 4 and 5 are in different sets in , states 3 and 4 are going to be separated from each other in new. Further, since on b 2 goes to 1, 4 goes to 4 and 1 and 4 are in different sets in , 2 and 4 are separated from each other in new. On the other hand 1 and 5 make the same transitions. So they are not going to be split. Thus the new partition is { { 1 , 5 } , { 2 } , { 3 } , { 4 ] }. This becomes the iteration. in the second remains

When new_partition is applied to this new , since 1 and 5 do the same transitions, unchanged. Thus final = { { 1 , 5 } , { 2 } , { 3 } , { 4 ] }.

Select 1 as the representative for { 1 , 5 }. Since the rest are singletons, they have the obvious representatives. Note here that state 4 is a dead state because the only transitionout of it is to itself. Thus the set of states for the minimized DFA is { 1 , 2 , 3 }. For the transitions, since 1 goes to 3 on a, and to 2 on b in the original DFA, in the minimized DFA transitions are added from 1 to 3 on a, and 1 to 2 on b. Also since 2 goes to 1 on b, and 3 goes to 1 on a in the original DFA, in the minimized DFA transitions are added from 2 to 1 on b, and from 3 to 1 on a.

Since the rest of the states are singletons, all transitions between them are inherited for the minimized DFA. Thus the minimized DFA is as given in the following figure:

Example 3 : Let us try to minimize the number of states of the following DFA.

Initially = { { 3 } , { 1 , 2 , 4 , 5 , 6 } }. By applying new_partition to this , new = { { 3 } , { 1 , 4 , 5 } , { 2 , 6 } } is obtained. Applyting new_partition to this , new = { { 3 } , { 1 , 4 } , { 5 } , { 2 } , { 6 } } is obtained. Applyting new_partition again, new = { { 1 } , { 2 } , { 3 } , { 4 } , { 5 } , { 6 } } is obtained. Thus the number of states of the given DFA is already minimum and it can not be reduced any further.

- 22Uploaded byRR
- A4Uploaded bybauemmvss
- 2. Minimization of DFAUploaded byGarvit Goyal
- 1 Set TheoryUploaded byAlex N. Mabalot
- Automata Syl lUploaded byRamendra Saxena
- Mapping It EratorUploaded byasjbhdsajhds
- Lesson Plan Math DiscreteUploaded byakula
- Problem Set 1 (theory of automota)Uploaded bymahesh
- Fix FreeUploaded byAliakbar Nematzadeh
- 18 Closures of RelationsUploaded byPreeti Khanna
- Export Ar 120606082144Uploaded byMargarita Enciso
- Syllabus Bs It Msc It Computer Science UosUploaded byHamza Masood
- SR2_DFAUploaded byArannya Monzur
- cd0309.pdfUploaded byTabassum
- Wiki SnapshotUploaded byjhannael5454
- data_structure_aima_third_full.pptUploaded bydinesh
- Placement Questions 2013-2014Uploaded byPrashant Kumar
- Awt Assignment 1Uploaded byAhson Khan SN
- UT Dallas Syllabus for cs2305.001.08s taught by Simeon Ntafos (ntafos)Uploaded byUT Dallas Provost's Technology Group
- Community Detection in Graphs PDFUploaded byRodney
- InheritanceUploaded bySai Raghu Teja
- precalculus 15 syllabus blickensderferUploaded byapi-455383099
- precalculus 15 syllabus blickensderfer 1Uploaded byapi-455383099
- CF FractionsUploaded byAndyBrooke
- 1Uploaded byKhushbu Tandon
- Mi h2 Math Solutions p1Uploaded byjimmytanlimlong
- PythonUploaded bymithrajoseph
- cpp4Uploaded byapi-3697260
- 01.Simulation Concepts.rev2.HoutsUploaded byrugal_z
- Open Educational Resources Textbook ListUploaded byJohn

- Assignment 2Uploaded bymanpreetsekhon
- CAUploaded bymanpreetsekhon
- Operating SystemUploaded bymanpreetsekhon
- Operating SystemUploaded bymanpreetsekhon
- Assignment 1Uploaded bymanpreetsekhon
- rptUploaded bymanpreetsekhon
- JoinsUploaded bymanpreetsekhon
- DBMSUploaded bymanpreetsekhon
- PROJECT REPORT.pptxUploaded bymanpreetsekhon
- Airways ReservationUploaded bymanpreetsekhon
- Project Report pptUploaded bymanpreetsekhon
- Project Report pptUploaded bymanpreetsekhon
- Report OnUploaded bymanpreetsekhon
- wireless networksUploaded bymanpreetsekhon
- wireless networksUploaded bymanpreetsekhon
- DBMSUploaded bymanpreetsekhon

- LM301AN.pdfUploaded byOsman Koçak
- 6_Jafari_MME_1802.pdfUploaded bydralism
- HIMAP A1 Communication EUploaded bymaronnam
- Carolyn Swanson - Reburial of NonexistentsUploaded byKK-bookslover
- Cognitive Dashboards With SAP UI5Uploaded bydeepnan12
- Catalogue Fuel Systems VDO_6_0Uploaded bybaracuda777
- Millionaire City GuideUploaded byMKardia
- RectriX August 2016Uploaded byaeroacademic
- bird beak labUploaded byapi-221446839
- KnowBrainer ManualUploaded byskalmari
- Getronics a Balanced Cloud Position WhitepaperUploaded byMauriceRemme
- Atacocha, El Porvenir Cu Ag Zn PbUploaded byLedPort David
- acomplete_illustrated_Guide_to_the_pc_hardware (1).docxUploaded bykathirdcn
- ReplenishmentUploaded byRAMAKRISHNA.G
- C++ Interview QuestionsUploaded byratnalajaggu
- Signifier MappingUploaded bymsprever
- afm butterflyUploaded byAna-Maria Dumitrică
- Logarithm RulesUploaded byArnab Nandi
- Chap12 SlidesUploaded byසම්පත් චන්ද්රරත්න
- CICC05.pdfUploaded byAboubakr Atef
- ZJ BrochureUploaded byibayraktar775208
- Homann Practical GeometryUploaded byEduardo Salgado Enríquez
- Heavy Metal Detection in Surface Water through Mesoporous MaterialUploaded byFun and Funny Videos
- Entity InstantiationUploaded byKumar Swamy Molugu
- psychometric paradigm.pdfUploaded byWilson Arias-Rojas
- HRanalytics GuideUploaded bydissidentme
- Mason Industries Seismic Guide.pdfUploaded byelidstone@hotmail.com
- BTEC HNDs Business Decision MakingUploaded bykillu87
- argumentative essay newUploaded byapi-318121444
- IJETT-V2I1P204Uploaded bysurendiran123