0% found this document useful (0 votes)
162 views6 pages

Flat Unit-2

This document contains a syllabus for a course on Formal Languages and Automata Theory. The syllabus covers regular expressions, finite automata, regular languages, context-free languages, context-free grammars, and derivations from grammars. It provides examples of context-free grammars that can generate languages of strings with an equal number of a's and b's, the string "ab", and strings with any number of a's and b's. The document explains key concepts related to formal languages and automata theory.

Uploaded by

Mr. RAVI KUMAR I
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views6 pages

Flat Unit-2

This document contains a syllabus for a course on Formal Languages and Automata Theory. The syllabus covers regular expressions, finite automata, regular languages, context-free languages, context-free grammars, and derivations from grammars. It provides examples of context-free grammars that can generate languages of strings with an equal number of a's and b's, the string "ab", and strings with any number of a's and b's. The document explains key concepts related to formal languages and automata theory.

Uploaded by

Mr. RAVI KUMAR I
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

FORMAL LANGUAGES AND AUTOMATA THEORY

(FLAT)

U Narasimhulu
Assistant Professor

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

BHARAT INSTITUTE OF ENGINEERING AND TECHNOLOGY


SYLLABUS

UNIT - II
Regular Expressions: Finite Automata and Regular Expressions, Applications of Regular
Expressions, Algebraic Laws for Regular Expressions, Conversion of Finite Automata to Regular
Expressions.
Pumping Lemma for Regular Languages, Statement of the pumping lemma, Applications of the
Pumping Lemma.
Closure Properties of Regular Languages: Closure properties of Regular languages, Decision
Properties of Regular Languages, Equivalence and Minimization of Automata.
CONTEXT FREE LANGUAGE

In formal language theory, a Context Free Language is a language generated by


some Context Free Grammar.
The set of all CFL is identical to the set of languages accepted by the Pushdown
Automata.

CONTEXT FREE GRAMMAR

Context Free Grammar is defined by 4 tuples as G={V, ⅀, S, P}


Where,
V= Set of Variables or Non-Terminal Symbols
⅀=Set of Terminal Symbols
S=Start Symbol
P=Production Rule

Context Free Grammar has Production Rule of the form,


A α
Where, α ={VU ⅀}* and A ℇ V
Derivations from a Grammar

The set of all strings that can be derived from a Grammar is said to be the
LANGUAGE generated from that Grammar.

Example-1:
For generating a language that generates equal number of a’s and b’s in the form a n bn ,
the CFG will be defined as
G = {(S, A), (a, b), (SaAb, AaAb | ε)}

SaAb

aaAbb (by AaAb)

aaaAbbb (by AaAb)

aaabbb (by Aε)

a3 b3

an bn
L(G) = {an bn | n >0}
Example-2:
G = {(S, A, B), (a, b), (SAB, Aa, Bb)}

SAB
aB (by Aa)
ab (by Bb)

L(G) = {ab}
Example-3:
G = {(S, A, B), (a, b), (SAB, AaA | a, BbB | b)}

Case-1: Case-2:
SAB
aB (by Aa) SAB
ab (by Bb) aB (by Aa)
abB (by BbB)
abb (by Bb)

Case-3: Case-4:

SAB SAB
aAB (AaA) aAB (by AaA)
aAb (Bb) aAbB (by BbB)
aab (Aa) aabB (by Aa)
aabb (by Bb)

L(G) = {am bn | m>0, n>0}

You might also like