Unit 1 TAFL
Unit 1 TAFL
Unit: 1
TAFL
Course Details
(B Tech 4th Sem)
• Introduction
• Theory of computation
• Basic Definitions
• Deterministic Finite Automata
• DFA Examples
• Non Deterministic Finite Automata
• NDFA Example
• Equivalence of DFA and NDFA
• Minimization of NDFA
• Machines with Output
Theory of
Computation
Theory of
Computability Complexity
Automata and
Theory Theory
Formal Languages
Computability Theory:
• It deals with what can and what cannot be computed by model.
Complexity Theory:
• It deals with computable problems based on their hardness.
Purpose of TOC:
• In order to develop formal mathematical model of computations that
reflect real world computers.
Symbol:
It is a character.
For Example : a,b,c,…….z
0,1,2,3,4…9
+,-,%,&........ Special characters.
Alphabet:
An alphabet is defined as a finite non empty set of symbols. It is representd
by symbol : Σ
Example: Σ: {0,1} set of binary alphabets.
Σ: {a,b,c,……z- set of all lower case letters.
Σ: {+,-,*,/,……- set of all special characters.
String
Length of a String
Kleene Star
• Definition − The Kleene star, ∑*, is a unary operator on a set of symbols
or strings, ∑, that gives the infinite set of all possible strings of all possible
lengths over ∑ including λ.
• Representation − ∑* = ∑0 ∪ ∑1 ∪ ∑2 ∪……. where ∑p is the set of all
possible strings of length p.
• Example − If ∑ = ,a, b-, ∑* = ,λ, a, b, aa, ab, ba, bb,………..-
Language
Example
Let a deterministic finite automaton be →
•Q = {a, b, c},
•∑ = ,0, 1-,
•q0 = {a},
•F = {c},
a
q0 q1
q0
1 0
1 0
q0 q1 q2
a,b
a b b
q0 q1 q2 q3
b a
a,b
a b b
q0 q1 q2 q3
b a
a a,b
a b b
q0 q1 q2 q3
R=0
a,b
q0 q1 R=1
a,b a,b
q2 R=2
0,1 0,1
0 1 0 1
q0 q1 q2 q3 q4
δ/Σ a b
*→q0+ [q0,q1] [q0]
[q0,q1] [q0,q1,q2] [q0,q1]
[q0,q1,q2] *[q0,q1,q2,q3] *[q0,q1,q3]
*[q0,q1,q3] [q0,q1,q2] [q0,q1,q2]
*[q0,q1,q2,q3] *[q0,q1,q2,q3] *[q0,q1,q2,q3]
Step-02:
Draw a state transition table-
a b
→q0 q1 q2
q1 q1 q3
q2 q1 q2
q3 q1 *q4
*q4 q1 q2
Step-03:
Initial DFA
Final DFA
Link: https://www.youtube.com/watch?v=RBDE-vO7Ux0
Link: https://www.youtube.com/watch?v=vcNRb2cj1GI
• The non- Kleene Star operation accepts the following string of finite length
over set A = {a,b} | where string s contains even number of 0 and 1
A. ab,aabb,ababab
B. aabb,bbaabbaa
C. ε,aabb,bbaabbaa
D. ε,aabb,bbaabbaa
A. Union
B. Concatenation
C. Kleene*
D. All of the mentioned
a. Input alphabet
b. Transition function
c. Initial State
d. Output Alphabet
• All type of Finite Automata (DFA, NDFA ) are equal in power and
convert one type of automata to other.