Set B

You might also like

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

Register number _____________________________

SRM Institute of Science and Technology


College of Engineering and Technology
School of Computing
SRM Nagar, Kattankulathur – 603203, Chengalpattu District, Tamilnadu
Academic Year: 2022-23 (ODD)
B.Tech-Computer Science & Engineering

Test: CLA-T3 Date: 23.12.2022


Course Code & Title: 18CSC301T & Formal Languages and Automata
Duration: 2 periods
Year & Sem: III Year /V Sem Max. Marks: 50
Set -A
Course articulation matrix:
P P P P P P P P P P P P
PS PS PS
O O O O O O O O O O O O
O1 O2 O3
1 2 3 4 5 6 7 8 9 10 11 12
CO- 3 3
1
CO- 3 2 3
2
CO- 3 3 3
3
CO- 3 3 3
4
CO- 3 1 2 3
5
Part - A
Instructions: Answer any two questions
Q. Question Mark B C P PI
No s L O O Code
1 We saw a case a while back where someone used their gmail 25 3 4 4 4.2.1
account at a computer lab on campus. She made sure her
gmail account was no longer open in the browser window
before leaving the lab. Someone came in behind her and used
the same browser to re-access her account. They started
sending emails from it and caused all sorts of mayhem. So she
plans to group n number of character ‘a’ first and then group
n/2 number of character ‘b’ next. After grouping the string
she wants to use it as password through encoding using 0s
and 1s. Help her to protect her password by encoding the
string.
a) If L and L are recursively enumerable then L is
______________
i. Undecidable
ii. Diagonalization Language
iii. Recursively Enumerable
iv. Recursive
Register number _____________________________

b) A Language is said to be decidable if


i. TM accepts L
ii. TM rejects L
iii. L is recursively enumerable
2
iv. L is recursive
c) Generate the accepting language L for the above scenario.
8
d) Design the Turing machine transition rules for the
5
generated language.
e) Draw a transition diagram and transition table for the
4
constructed Turing machine.
4
f) Is the language generated is context free? Justify.
g) Use instantaneous description and find out the solution for
doing it for the count of three.
2 On a festival day, a shop keeper decided to give a discount of Rs.4 3 4,5 4 4.2.1
for every purchase from the total purchase made by the customers.
a) Turing machines are more powerful than finite state
machines because
i) it is bidirectional
ii) It can remember long input sequence
iii) has a tape
iv) can write on the tape
b) In what circumstances the statement "P=NP" holds true?
i) If there is a Polynomial algorithm for any NP hard
problem, then all other NP hard problems may have
polynomial solution
ii) If there is a Polynomial algorithm for any NP hard
problem, then all other NP problems may have
polynomial solution
iii) If there is a Polynomial algorithm for any NP
problem, then all other NP problems may have
polynomial solution
iv) If there is a Polynomial algorithm for any NP
problem, then all other NP hard problems may have
polynomial solution
c) Automate the given problem using a TM by writing the 7
transition rules to help the shopkeeper.
d) Give the transition diagram and table for the same. 5
e) Compute the output of the TM when a customer makes a 4
purchase for Rs.7 using instantaneous description
f) Also, encode the constructed TM in binary language. 7
3 A hackathon event is conducted at SRMIST. The below table 4 5 4 4.2.1
consists list of questions to be solved.
S.N List List
o A B

1 1 111
2 1011 10
Register number _____________________________

1
3 10 0
a) Which of the following is not decidable?
i) Given a Turing machine M, string s, and an integer k, M
accepts s within k steps
ii) The equivalence of two given Turing machines
iii) The language accepted by a given finite state machine
is not empty.
iv) The language generated by a context-free grammar is
non-empty.

b) S1: There exists a deterministic Turing machine corresponding


to each non-deterministic Turing Machine.
S2: There exists a single tape Turing machine corresponding to
each multi-tape Turing machine.
Which of the following is correct?
i) Both S1 and S2 are true
ii) Neither S1 and S2 are true
iii) Only S1 is true
iv) Only S2 is true 8
c) In a Hackathon activity, the aim is to arrange blocks of two
categories in such an order that string framed by concatenation of 6
these blocks in some sequence yield same result.
d) Assume that the above is a Modified PCP problem. Reduce it to
PCP. 5

e) Can the blocks of two categories be arranged in such an order


that string framed by concatenation of these blocks in some
sequence yield same result (after reducing to PCP) 4

f) Is the given instance of PCP and MPCP decidable? Justify the


answer.

Blooms
Taxonomy
L4,33%

L3,67%
Register number _____________________________

CO
45

40

35

30

25

20

15

10

0
CO4 CO5

You might also like