Automata
The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting".
An automaton (Automata in plural) is an abstract self-propelled computing device which follows a predetermined sequence of operations automatically.
An automaton with a finite number of states is called a Finite Automaton (FA)
or Finite State Machine (FSM).
or Finite State Machine (FSM).
Formal definition of a Finite Automaton
An automaton can be represented by a 5-tuple (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).
Related Terminologies
Alphabet> Definition: An alphabet is any finite set of symbols.
> Example: Σ = {a, b, c, d} is an alphabet set where ‘a’, ‘b’, ‘c’, and ‘d’
are alphabets.
String
Definition: A string is a finite sequence of symbols taken from Σ.
Example: ‘cabcad’ is a valid string on the alphabet set Σ = {a, b, c,d}
Length of a String
Definition : It is the number of symbols present in a string. (Denoted by|S|).
Examples:
o If S=‘cabcad’, |S|= 6
o If |S|= 0, it is called an empty string (Denoted by λ or ε)
o If S=‘cabcad’, |S|= 6
o If |S|= 0, it is called an empty string (Denoted by λ or ε)
Kleene Star
Definition: The set Σ *is the infinite set of all possible strings of all
possible lengths over Σ including λ.
Representation:
Σ* = Σ0 U Σ1 U Σ2 U…….
Example: If Σ = {a, b},
Σ*= {λ, a, b, aa, ab, ba, bb,………..}
Kleene Closure / Plus
Definition: The setΣ+ is the infinite set of all possible strings of all possible lengths over Σ excluding λ.
Representation:
Σ+ = Σ0 U Σ1 U Σ2 U…….
Σ+ = Σ* − { λ }
Example: If Σ = { a, b } , Σ+ ={ a, b, aa, ab, ba, bb,………..}
Language
Definition : A language is a subset of Σ* for some alphabet Σ. It can be
finite or infinite.
Example : If the language takes all possible strings of length 2 over Σ =
{a, b}, then L = { ab, bb, ba, bb}
Deterministic and Nondeterministic Finite Automaton
Finite Automaton can be classified into two types: Deterministic Finite Automaton (DFA)
Non-deterministic Finite Automaton (NDFA / NFA)
Deterministic Finite Automaton (DFA)
In DFA, for each input symbol, one can determine the state to which themachine 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.
Formal Definition of a DFA
A DFA can be represented by a 5-tuple (Q, Σ, δ, q0, F) where:
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:
A DFA can be represented by a 5-tuple (Q, Σ, δ, q0, F) where:
- Q is a finite set of states.
- Σ is a finite set of symbols called the alphabet.
- δ is the transition function where δ: Q × Σ → Q
- 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).
Graphical Representation of a DFA
A DFA is represented by digraphs called state 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.
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:
| إضافة تسمية توضيحية |
Non-deterministic Finite Automaton (NDFA)
In NDFA, for a particular input symbol, the machine can move to anycombination of the states in the machine. In other words, the exact state to
which the machine moves cannot be determined. Hence, it is called Non-deterministic Automaton. As it has finite number of states, the machine iscalled Non-deterministic Finite Machine or Non-deterministic Finite
Automaton.
Formal Definition of an NDFA
An NDFA can be represented by a 5-tuple (Q, Σ, δ, q0, F) where:- Q is a finite set of states.
- Σ is a finite set of symbols called the alphabets.
- δ is the transition function where δ: Q × {Σ U ε} → 2Q
(Here the power set of Q (2Q) has been taken because in case of NDFA,
from a state, transition can occur to any combination of Q states)
- 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).
Graphical Representation of an NDFA: (same as DFA)
An NDFA is represented by digraphs called state 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.
Moore Machine The output depends both on the current input as well
as the current state
ends in an accepting state (any of the final states) after reading the string
wholly.
A string S is accepted by a DFA/NDFA (Q, Σ, δ, q0, F), iff
δ*(q0, S) ∈ F
The language L accepted by DFA/NDFA is
{S | S ∈ Σ* and δ*(q0, S) ∈ F}
A string S′ is not accepted by a DFA/NDFA (Q, Σ, δ, q0, F), iff
δ*(q0, S′) ∉ F
The language L′ not accepted by DFA/NDFA (Complement of accepted language
L) is
{S | S ∈ Σ* and δ*(q0, S) ∉ F}
Example
Let us consider the DFA shown in Figure 1.3. From the DFA, the acceptable
strings can be derived.
Acceptability of strings by DFA
Strings accepted by the above DFA: {0, 00, 11, 010, 101, ...........}
Strings not accepted by the above DFA: {1, 011, 111, ........}
as the current state
Acceptability by DFA and NDFA
A string is accepted by a DFA/NDFA iff the DFA/NDFA starting at the initial stateends in an accepting state (any of the final states) after reading the string
wholly.
A string S is accepted by a DFA/NDFA (Q, Σ, δ, q0, F), iff
δ*(q0, S) ∈ F
The language L accepted by DFA/NDFA is
{S | S ∈ Σ* and δ*(q0, S) ∈ F}
A string S′ is not accepted by a DFA/NDFA (Q, Σ, δ, q0, F), iff
δ*(q0, S′) ∉ F
The language L′ not accepted by DFA/NDFA (Complement of accepted language
L) is
{S | S ∈ Σ* and δ*(q0, S) ∉ F}
Example
Let us consider the DFA shown in Figure 1.3. From the DFA, the acceptable
strings can be derived.
Acceptability of strings by DFA
Strings accepted by the above DFA: {0, 00, 11, 010, 101, ...........}
Strings not accepted by the above DFA: {1, 011, 111, ........}
0 comments :
Post a Comment
Comment here