Lecture-4: Deterministic Finite Automata (DFA)

preview_player
Показать описание
#DFA #DeterministicFiniteAutomata #FiniteAutomata #TOC #TheoryofComputation
Definition: A Deterministic finite automaton is a 5-tuple M = (Q, Σ, δ, q0, F), where
1. Q is a finite set, whose elements are called states,
2. Σ is a finite set, called the alphabet ; the elements of Σ are called symbols,
3. δ : Q × Σ → Q is a function, called the transition function. It takes state and input symbol as a argument and returns a state as ouput. It tells machine which state to go after reading a input symbol from a particular state.
4. q0 is an element of Q; it is called the start state,
5. F is a subset of Q; the elements of F are called accept states.

How DFA process strings? (i.e. How it determines whether the given string is accepted or rejected by the DFA.)

The language of DFA is the set of all strings which when processed by DFA leads its state to one of the accepting state. The DFA determines whether the given string belongs to the language of DFA with the help of transition function.
Initially, the DFA is in its start state. It then reads the input symbols of string one by one and changes its state according to the transition function. After reading all the input symbols if DFA reaches to its accepting state then the string is accepted by DFA otherwise not.
Suppose a1, a2, …… an is a sequence of input symbols. Initially, the DFA starts its work from the starting state, q0. It consult the transition function δ, say δ (q0, a1) = q1 to find the state that the DFA enters after processing the first input symbol a1. We then process the next input symbol a2, by evaluating δ (q1, a2); suppose this state be q2. It continue in this manner, finding states q3, q4, …, qn such that δ (qi-1, ai) = qi for each i. if qn is a member of F, then input a1, a2, --- an is accepted & if not then it is rejected.

Extended Transition Function of DFA

The extended transition function is a transition function that tells the DFA, which state to go after reading a string from the particular state.
Рекомендации по теме