THEORY OF FORMAL LANGUAGES
EXERCISE BOOK
A Suite of Exercises with Solutions
DRAFT COPY
Luca Breveglieri
collaborators
Giampaolo Agosta
Alessandro Barenghi
Anna Beletska
Stefano Crespi Reghizzi
Bernar
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 16: Decidable Properties of Regular and CFLs
Raghunath Tewari
1
IIT Kanpur
Decidability Properties of Regular Languages
We will look at some pr
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 7: DFA Minimization
Raghunath Tewari
IIT Kanpur
Given a DFA D = (Q, , , q0 , F ) we define a equivalence relation on the states of the DFA. For
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 15: Closure Properties of Decidable Languages
Raghunath Tewari
IIT Kanpur
We will study the closure properties of decidable and Turing recogniz
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 17: Undecidability
Raghunath Tewari
IIT Kanpur
We shall prove that not all problems/languages are decidable. In other words there exists
langua
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 14: Turing Machines
Raghunath Tewari
IIT Kanpur
So far we have seen the following:
Finite Automaton: Finite control (set of states). Input is r
Name:
Rollno:
CSE340: Theory of Computation (Homework Assignment 2)
Due Date: 12th September, 2017 (in class)
Total Number of Pages: 4
Total Points 40
Question 1. (5 points) Give a regular expression
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 8: Context-Free Grammar
Raghunath Tewari
IIT Kanpur
So far we have studied the class of languages known as regular languages. They can be expre
CSE340: Theory of Computation (Problem Set)
Question 1. Construct DFAs for the following languages.
1. L1 = cfw_w cfw_0, 1 |#0 (w) is even and #1 (w) is odd
2. L2 = cfw_w cfw_0 |w| is divisible by 2 o
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 12: Properties of Context-free Languages
Raghunath Tewari
1
IIT Kanpur
Closure Properties
Let us study the various closure properties of CFLs.
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 6: Non-regular languages
Raghunath Tewari
IIT Kanpur
Limitations of finite automata.
1. Not all languages are regular.
2. Intuitively languages
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 9: Chomsky Normal Form
Raghunath Tewari
IIT Kanpur
Normal forms are CFGs whose substitution rules have a special form. Usually normal forms are
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 10: Non Context-Free Languages
Raghunath Tewari
1
IIT Kanpur
Pumping Lemma for Context-free Languages
We will prove a pumping lemma for context
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 7: DFA Minimization
Raghunath Tewari
IIT Kanpur
Given a DFA D = (Q, , , q0 , F ) we define a equivalence relation on the states of the DFA. For
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 11: Pushdown Automata
Raghunath Tewari
1
IIT Kanpur
Pushdown Automata
It is an -NFA appended with a stack.
1.1
Reviewing a Stack
A stack is a d
Name:
Rollno:
CSE340: Theory of Computation (Homework Assignment 1)
Due Date: 21st August, 2017 (in class)
Total Number of Pages: 4
Total Points 50
Question 1. (18 points) Give DFAs for the following
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 2: Deterministic Finite Automata
Raghunath Tewari
1
IIT Kanpur
Deterministic Finite Automaton
Consider the following language,
L = cfw_x cfw_0,
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 13: Deterministic Pushdown Automata
Raghunath Tewari
1
IIT Kanpur
Deterministic Pushdown Automata
Definition 1.1. A deterministic pushdown auto
CS340: Theory of Computation
Sem I 2015-16
Lecture Notes 6: Non-regular languages
Raghunath Tewari
IIT Kanpur
Limitations of finite automata.
1. Not all languages are regular.
2. Intuitively languages
8. (10 marks) Is the following language regular? Prove or disprove.
L =(o'-+3'=1n In 2 0,1: e Z).
Solution: Observe that, we can rephrase L as set of strings of the form Olj such that i and 1' leave t
CS340: Theory of Computation
Sem I 2017-18
Lecture Notes 21: Hierarchy Theorems
Raghunath Tewari
IIT Kanpur
Definition 0.1. A function f : N N is said to be space constructible if there exists a TM M
Name:
Rollno:
CSE340: Theory of Computation (Quiz 3)
24th October, 2017
Total Number of Pages: 2
Total Points 20
Instructions
1. Cheating or resorting to unfair means will be severely penalized.
2. Us
Theory of Computation (CS340)
Semester I, 2017-18
July 31, 2017
Course Logistics
Instructor:
Raghunath Tewari
Room No. 514 RM Building
email: [email protected]
Venue: RM101
Class Time: Mon and
Name:
Rollno:
CSE340: Theory of Computation (Quiz 4)
10th November, 2017
Total Number of Pages: 2
Total Points 15
Instructions
1. Cheating or resorting to unfair means will be severely penalized.
2. U
CSE340: Theory of Computation (Problem Set 3)
Total Number of Pages: 2
Total Points 0
Question 1. For two languages A, B define
A/B = cfw_x | y B, xy A.
Show that if A and B are TR then A/B is also TR
Name:
Rollno:
CSE340: Theory of Computation (Homework Assignment 4)
Due Date: 7th November, 2017 (in class)
Total Number of Pages: 1
Total Points 55
Question 1. Which of the following languages are de
Under Western Eyes: Feminist Scholarship and Colonial Discourses
Author(s): Chandra Talpade Mohanty
Source: boundary 2, Vol. 12/13, Vol. 12, no. 3 - Vol. 13, no. 1, On Humanism and the
University I: T
IIT Madras beef fest: Students protest
against Centre's cattle slaughter ban
Students had bread and beef curry and claimed that the
event was to passively protest against the Centre's curb over
sellin
Case for Caste-Based Quotas in Higher Education
Author(s): Jayati Ghosh
Source: Economic and Political Weekly, Vol. 41, No. 24 (Jun. 17-23, 2006), pp. 2428-2432
Published by: Economic and Political We