Assignment 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

KIET Group of Institutions

Department of CSE
COURSE B.Tech., VI SEM,
Assignment No.-3, (2019-20) Even Semester
Theory of Automata and Formal Languages (KCS402)

Q. No. Questions Marks BL


1 Identify whether each of the below-stated language as (I) decidable, (II) semi-decidable 5 BL-1
but not decidable, or (III) not semi-decidable.
a) L = {< M1, M2 > |M1, M2 are TMs and ε ∈ L(M1) ∩ L(M2)}
b) L = {< M1, M2 > |M1, M2 are TMs and ε ∈ L(M1) − L(M2)}
c) L = {< M, x, k > |M is a TM, and M does not halt on x within k steps}
d) L = {< M > | M is a TM, and L(M) is countable}
2 Let S = {< M > |M is a TM that accepts wR whenever it accepts w}. Show that S is 5 BL-3
undecidable
3 n 5 BL-6
Design a Turing machine M that recognizes {02 |n ≥ 0}
4 Predict a PDA that accepts exactly the strings over {a, b} that contain the same number of 5 BL-3
a’s and b’s. For example, aabbaabbab is accepted but aba is not. Also bbbbaaaa and
aaaabbbb are both accepted.
5 Consider this CFG G: 5 BL-2
S → D|E
D → dD|dDe|dF
E → Ec|dEe|Fe
F→ε
Restate G in Chomsky Normal Form.
6 Demonstrate the TM that computes the function 10 BL-3
a) f(n) = 3n
b) f(n) = n*(n-1)
c) f(n, m) = n+m+3
7 Indicate whether each of the following statements are true or false, and justify your 10 BL-5
answer.
a) If L1, L2, L3, ... are context-free languages, then L = ∪ Li is context-free.

b) If L1, L2 are languages such that L1∩L2 is regular, then L1 and L2 are context-
free.
8 Outline a PDA that accepts exactly the strings with correctly matched parentheses in the 10 BL-4
alphabet containing just two symbols, left and right parentheses. Exhibit an accepting
computation by the machine on the input (()()).
9 Design a PDA that accepts strings in the alphabet {a, b, ), (} such that the parentheses are 10 BL-6
correctly matched, and between each left parenthesis and the next right parenthesis,
and in the whole string, there are equal numbers of a’s and b’s. For example, ((abab)(ab))
is accepted but ((aab)(ab)) is not accepted. Also ((abab)ab(ab)) is accepted, but not
((abab)aba(ab)). The stated conditions guarantee that, as you proceed from left to right,
each time you encounter either kind of parenthesis, the numbers of a’s and b’s already
processed are equal.
10 Interpret a PDA that accepts palindromes, that is strings that are equal to their own 10 BL-2
reverse. Further, consider the problem of making a PDA to accept “doubled strings”, that
is, strings formed by repeating a string, such as abcabc, which is the double of abc.
Explain why an approach like the PDA for palindromes won’t work to make a PDA for this
language.

Bloom Level:
S
Level Skill Demonstrated
No.
 Ability to recall of information like, facts, conventions, definitions, jargon, technical terms,
classifications, categories, and criteria.
Rememb
1.  Ability to recall methodology and procedures abstractions, principles, and theories in the field.
er
 Knowledge of dates, events, places.
 Mastery of subject matter
 Understanding information
 Grasp meaning
Understa  Translate knowledge into new context
2.
nd  Interpret facts, compare, contrast
 Order, group, infer causes
 Predict consequences
 Use information
 Use methods, concepts, laws, theories in new situations
3. Apply
 Solve problems using required skills or knowledge
 Demonstrating correct usage of a method or procedure
 Break down a complex problem into parts.
 Identify the relationships and interaction between the different parts of complex problem.
4. Analyse
 Identify the missing information, sometimes the redundant information and the contradictory
information, if any.
 Compare and discriminate between ideas
 Assess value of theories, presentations make
5. Evaluate
 Choices based on reasoned argument verify value of evidence recognize subjectivity use of definite
criteria for judgments
 Use old ideas to create new ones
6. Create  Combine parts to make (new) whole,
 Generalize from given facts relate knowledge from several areas predict, draw conclusions

You might also like