Lecture 1
Lecture 1
Lec-1
Automata
• Automata theory (also known as Theory Of Computation) is a theoretical branch of Computer Science and
Mathematics, which mainly deals with the logic of computation with respect to simple machines, referred to as automata.
• Automata enables scientists to understand how machines compute functions and solve problems.
• Automata originated from the word “Automaton” which is closely related to “Automation”.
Basic terminologies that are important and frequently used in automata
Symbols, Alphabets
Symbols:
Symbols are an entity or individual objects, which can be any letter, alphabet or any picture.
Example:
1, a, b, #
Alphabets:
Alphabets are a finite set of symbols. It is denoted by ∑.
Examples:
1. ∑ = {a, b}
2. ∑ = {A, B, C, D}
3. ∑ = {0, 1, 2}
String
It is a finite collection of symbols from the alphabet. The string is denoted by w.
Example 1:
If ∑ = {a, b}, various string that can be generated from ∑{ab, aa, aaa, bb, bbb, ba, aba.....}.
• A string with zero occurrences of symbols is known as an empty string. It is represented by ε.
• The number of symbols in a string w is called the length of a string. It is denoted by |w|.
Example 2:
w = 010
Number of Sting |w| = 3
Language
Language:
A language is a collection of appropriate string. A language which is formed over Σ can be Finite or Infinite.
Example: 1
Example: 2
L2 = {Set of all strings starts with 'a'} = {a, aa, aaa, abb, abbb, ababb} Infinite Language
DFA
Formal Definition of DFA
A finite automaton is a collection of 5-tuple (Q, ∑, δ, q0, F), where:
1. Q = {a, b, c},
2. ∑ = {0, 1},
3. q0 = {a}, 5.Transition function δ (Q X Σ --> Q )
as shown by the following table
4. F = {c} and
Exercise
Formal Definition of NFA
Nondeterministic Finite Automata(NFA):
NFA refers to Nondeterministic Finite Automaton. A Finite Automata(FA) is said to be non-
deterministic if there is more than one possible transition from one state on the same input
symbol. c
A non-deterministic finite automata is also a set of five tuples and represented as,
NFA
NFA is similar to DFA except following additional features:
1.Null (or ε) move is allowed i.e., it can move forward without reading symbols.
2.Ability to transmit to any number of states for a particular input.
NFA
One important thing to note is, in NFA, if any path for an input string leads to a final state, then the input
string is accepted. For example, in the above NFA, there are multiple paths for the input string “00”. Since one of the paths
leads to a final state, “00” is accepted by the above NFA.
DFA vs NFA
What is one difference between NFA and DFA?
Ans: In NFA, each input symbol has zero or more transitions from any
state. In DFA, however, each input symbol has precisely one transition
from each state.