Professional Documents
Culture Documents
UNIVERSITY INSTITUTE OF
ENGINEERING
COMPUTER SCIENCE
ENGINEERING
Bachelor of Engineering
Theory of Computation (CST-353)
Topic: Undecidability
DISCOVER . LEARN .
University Institute of Engineering (UIE) EMPOWER
Department of Computer and Science Engineering (CSE)
Outcome:
Student will understand the
• To know about Context sensitive language and grammar.
• Relation between languages of classes.
Context-Sensitive Grammar –
A Context-sensitive grammar is an Unrestricted grammar in
which all the productions are of form –
Where
N = Set of non-terminal symbols
Σ = Set of terminal symbols
S = Start symbol of the production
P = Finite set of productions
Example –
Consider the following CSG.
S → abc/aAbc
Ab → bA
Ac → Bbcc
bB → Bb
aB → aa/aaA
• Explanation
• Using S->a and S->b,
• a and b can be generated.
• Similarly by using S->aSa
• ->aba
• aba can be generated.
• Other strings which can be generated from grammar are
as follows −
• a,b,aba,bab,aaa,bbb,ababa,.....
• Therefore, the language generated for the given grammar
over the alphabet {a,b} is the set of all odd length
palindromes.
Outcomes
• To know about Context sensitive language and
grammar.
• Relation between languages of classes.
9
University Institute of Engineering (UIE)
Department of Computer and Science Engineering (CSE)
FAQ
1. Convert the given expression to PDA
I --> a | b | Ia | Ib | I0 | I1
2. Design a PDA for accepting a language {L= anbn | n >=1}
3. What is the language generated by the grammar
G=(V,T,P,S) where P={S->aSb, S->ab}?
REFERENCES
• Sipser,” Theory Of Computation, Cengage Learning.
• Daniel I.A. Cohen, “Introduction to computer Theory”, John
Wiley.