Presentation is loading. Please wait.

Presentation is loading. Please wait.

Deterministic Finite Automaton (DFA)

Similar presentations


Presentation on theme: "Deterministic Finite Automaton (DFA)"— Presentation transcript:

1 Deterministic Finite Automaton (DFA)
Cpt S 317: Spring 2009 Deterministic Finite Automaton (DFA) Sampath Kumar S, AP/CSE, SECE School of EECS, WSU

2 Deterministic Finite Automaton (DFA)
22 February 2019 Deterministic Finite Automaton (DFA) In DFA, for each input symbol, one can determine the state to which the machine will move. Hence, it is called Deterministic Automaton.  As it has a finite number of states, the machine is called Deterministic Finite Machine or Deterministic Finite Automaton.

3 Formal definition of DFA:
22 February 2019 Formal definition of DFA: A DFA can be represented by a 5-tuples (Q, ∑, δ, q0, F) where − Q is a finite set of states. ∑ is a finite set of symbols, called the alphabet of the automaton. δ is the transition function. q0 is the initial state from where any input is processed (q0 ∈ Q). F is a set of final state/states of Q (F ⊆ Q). Note: δ is called Delta and ∑ is called Sigma

4 Graphical Representation of a DFA
22 February 2019 Graphical Representation of a DFA A DFA is represented by digraphs called state diagram or Transition Diagram . The vertices represent the states. The arcs labeled with an input alphabet show the transitions. The initial state is denoted by an empty single incoming arc. The final state is indicated by double circles.

5 22 February 2019 Transition Table: It is a tabular representation of a function like δ that takes 2 arguments and returns a value. The rows of the table correspond to the state and the columns correspond to the inputs. The entry for the row corresponding to state q and the column corresponding to input a is the state δ(q, a)

6 Example Let a deterministic finite automaton be → Q = {a, b, c},
22 February 2019 Example Let a deterministic finite automaton be → Q = {a, b, c}, ∑ = {0, 1}, q0={a}, F={c}, and Transition function δ as shown by the following table − Present State Next State for Input 0 Next State for Input 1 ->a a b c c*

7 22 February 2019 Example Cont.., Its graphical representation would be as follows: Can you guess the language of above DFA?

8 Extended Transition Function:
22 February 2019 Extended Transition Function: Describes what happens when we start in any state and follow any sequence of inputs If δ is our transition function, then the extended transition function is denoted by δ* The extended transition function is a function that takes a state q and a string w and returns a state p (the state that the automaton reaches when starting in state q and processing the sequence of inputs w) Formal definition :δ*(q, ǫ) = q

9 22 February 2019 Problems to Discuses: Design DFA to accept string over ∑={0,1} with 2 consecutive 0’s. Construct a DFA that accepts all strings on ∑={0,1} except those contains substring 101. L= { w|w is of even length and begins with 01 over ∑={0,1} }. Give DFA accepting the string starting with substring 101 over ∑={0,1} Design DFA to accept string contain number of 1’s is in multiples of 3 over ∑={0,1}. Design DFA to accept string contain number of 1’s is not in multiples of 3 over ∑={0,1}.

10 22 February 2019 Problems (Cont..,): Construct a DFA that accepts all strings on ∑={0,1} that contain exactly 4 zeros. Construct a DFA over ∑={a,b} where the number of b’s is divisible by 3. Construct a DFA that accepts even binary numbers on ∑={0,1}. Construct a DFA that accepts odd binary numbers on ∑={0,1}.

11 22 February 2019

12 22 February 2019 நன்றி 


Download ppt "Deterministic Finite Automaton (DFA)"

Similar presentations


Ads by Google