Professional Documents
Culture Documents
GLO161 Automata Theory: Bachelor of Technology
GLO161 Automata Theory: Bachelor of Technology
Bachelor of Technology
SEMESTER – IV
YEAR 2022
URN: 2020-B-19062002
School of Engineering
Ajeenkya D Y Patil University, Pune
CERTIFICATE
This is to certify that Mr/Miss Khan Anas Waqar bearing URN number 2020-B-
19062002 of B.Tech Second year Computer Engineering has successfully completed
Automata Theory practice session as per the university requirements during the
academic year 2022.
Faculty-In-charge
Abstract
In computer science, in particular in formal language
theory, the pumping lemma for context-free languages,
also known as the Bar-Hillel lemma, is a lemma that gives
a property shared by all context-free languages and
generalizes the pumping lemma for regular languages.
Introduction
The machine operates on an infinite memory tape divided into
discrete "cells". The machine positions its "head" over a cell and
"reads" or "scans" the symbol there. Then, based on the symbol
and the machine's own present state in a "finite table" of user-
specified instructions, the machine first writes a symbol (e.g., a
digit or a letter from a finite alphabet) in the cell (some models
allow symbol erasure or no writing), then either moves the tape
one cell left or right (some models allow no motion, some models
move the head), then, based on the observed symbol and the
machine's own state in the table, either proceeds to another
instruction or halts computation.
The Turing machine was invented in 1936 by Alan Turing, who
called it an "a-machine" (automatic machine). It was Turing's
Doctoral advisor, Alonzo Church, who later coined the term
"Turing machine" in a review. With this model, Turing was able
to answer two questions in the negative:
Proof Idea
o Recall our proof for the pumping lemma for regular
languages.
o How do we know that the DFA would visit the same state
twice?
o This time, we want the same variable to appear twice on some
path in the parse tree.
o Any idea? (Any hint?) Yes, the Pigeon-Hole Principle.
o Since we have |V| variables, if, on the parse tree, the path
from the start variable to some terminal is long enough (how
long?) we should see the same variable twice.
o How can we make sure that the parse tree is very tall?
G1
S → AB
A → 1A0|0A1|ε
B → BB|0|1
Let B= {0k1k2k|k≥0}
Show: B is not a CFL
Let A1-{0k1k2l|k,l≥0} (equal #s of 0s and 1s)
Let A2-{0l1k2k|k,l≥0} (equal #s of 1s and 2s)
Observe that PDAs can recognize A1 and A2. What can we now
conclude?
➢ The class of CFLs is not closed under intersection.
➢ The Pumping Lemma shows that A1 ∪ A2 is not a CFL.
➢ The class of CFLs is closed under complement.
Turing machine
A Turing machine is a mathematical model of computation that
defines an abstract machine that manipulates symbols on a strip of
tape according to a table of rules. Despite the model's simplicity,
given any computer algorithm, a Turing machine capable of
implementing that algorithm's logic can be constructed.
TM Example
TM recognises B= {akbkck|k ≥ 0}
1. Scan right until ˽ while checking if input is in a ∗b ∗c, reject if not.
2. Return head to left end.
3. Scan right, crossing off single a, b, and c.
4. If the last one of each symbol, accept.
5. If the last one of some symbols but not others, reject.
6. If all symbols remain, return to left end and repeat from (3).