0% found this document useful (0 votes)
93 views17 pages

v3 TCS PAPER SOLUTIONS - 2023

This document provides a paper solution index for formal language theory topics including: 1) Finite state machines, regular expressions, NFAs, DFAs, Moore and Mealy machines, grammars, pushdown automata, Turing machines, pumping lemma, and short notes on related concepts. Each topic includes video lecture links for reference.

Uploaded by

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

v3 TCS PAPER SOLUTIONS - 2023

This document provides a paper solution index for formal language theory topics including: 1) Finite state machines, regular expressions, NFAs, DFAs, Moore and Mealy machines, grammars, pushdown automata, Turing machines, pumping lemma, and short notes on related concepts. Each topic includes video lecture links for reference.

Uploaded by

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

Page - 1

Paper Solution Index

Topic Page Number


1: FSM 2
2: Regular Expression 3
3: NFA and DFA 5
4: Moore and Mealy Machine 7
5: Grammars 9
6: Push Down Automata 13
7: Turing Machine 14
8: Pumping Lemma 16
9: Short Notes 17
Page - 2

Finite State Machine


DEC 19/10M
Q2 A Design FSM for strings that start with 0 and has odd
length or strings that start with 1 and has even length
Link: https://youtu.be/3MGFdtFOK4M
Page - 3

REGULAR EXPRESSION:
DEC 18/5M
Q1 C Define Regular Expression & Write Regular Expression
for Strings that end with “1” has no substring 00 over ∑={0,1}
Link: https://youtu.be/QiFY6HWeClE

JUNE 19/5M
Q1 C Explain applications of Regular Expression
Link: https://youtu.be/p-Z7zGPyPZo

DEC 19/5M
Q1 C Define Regular Expression & Write Regular Expression
for Strings that
contain atmost 3 0’s over ∑={0, 1}
Link: https://youtu.be/jqLo_zxEwiY
Page - 4

May 2023 / 10M


Q3B Write a regular expression on {0,1}:
a. string starts and ends with different letter
b. string contains atleast 2 1’s
c. string contains atmost 2 0’s
d. string contains exactly 2 0’s
e. input contains even number of 0's and odd numbers of 1's

Link: https://youtu.be/PyGmAARYal4
Page - 5

NFA and DFA:


DEC 18/10M & DEC 19/10M
Q5 A Convert (0+ 1)(10)*(0+1) into NFA with ε moves over ∑
= {0, 1} . Obtain DFA
Link: https://youtu.be/eMSQ-CRW4cY

June 19 / 5M
Q1 A Differentiate between DFA and NFA
Link: https://youtu.be/nlY8VJSlUD0

June 19 / 5M
Q1 B Design DFA to recognize strings ending in 100 over ∑ =
{0, 1}
Link: https://youtu.be/TYfWHK6lffk

Nov 2022 / 5M
Q1 A. Differentiate between DFA and NFA
Link: https://youtu.be/J3rrfYqGi2o
Page - 6

Nov 2022 / 10M


Q2 A Convert (0+ )(10)*(+1) into NFA with ε moves over ∑
= {0, 1} . Obtain DFA
Link: https://youtu.be/vZnLkKUVyAU

May 2023 / 5M
Q1 B Differentiate between DFA and NFA
Link: https://youtu.be/n7F4CTaez5o

May 2023 / 10M


Q2B DESIGN Finite Automata which accept the string which
ends with "bba" or "abb"
Link: https://youtu.be/GnZDpGvAcpU
Page - 7

MOORE AND MEALY MACHINE:


DEC 18/10M & DEC 19/10M
Q) Design Moore Machine & Meal Machine to change each
occurrence of 100 to 101 over ∑ = {0, 1}
Link: https://youtu.be/Jnw4_3-e3CQ

DEC 18/5M
Q6 D Write Short note on Moore and Mealy Machine
Link: https://youtu.be/d-rjVsCbzdg

NOV 2022 / 5M
Q1 B COMPARE AND CONTRAST MOORE AND MEALY
MACHINE
Link: https://youtu.be/eQH0FSlZvvU

NOV 2022 / 10M


Q4a) Design Mealy machine for r = (0+1)*(00+11) and
convert into Moore Machine.
Link: https://youtu.be/Vwu0RgKxuCY
Page - 8

MAY 2023 / 5M
Q1C) Difference between Moore and Mealy machine
Link: https://youtu.be/F1RJsIUAnP8

MAY 2023 / 10M


Q2a) Design Moore Machine to convert each occurrence Of
120 To 122. Convert Into Mealy Machine.
Link: https://youtu.be/Sb0f1HDt9VA
Page - 9

GRAMMARS:
Dec 18 / 5M & Dec 19 / 5M
Q)Explain Chomsky’s Hierarchy
Link: https://youtu.be/EmovChAyDGI

Dec 19 / 5M
Q1 D) What is ambiguous grammar? Check if the following
grammar is ambiguous or not?
E → E + E | E – E | E * E | (E) | id
Link: https://youtu.be/UMVz9n2heAE

Dec 18/10M & Dec 19/10M


Q) Consider the following grammar: -
S → iCtS | iCtSeS | a
C→ b
For the string “ibtaeibta”
find the following:
i) LMD ii) RMD iii) check if the above grammar is
ambiguous.
Link: https://youtu.be/LQR41Lyh15o
Page - 10

Dec 19 / 10M
Q4 B ) Express the following in CNF:
S→0A0|1B1|BB
A→C
B→S|A
C→S|ε
Link: https://youtu.be/myjULEXp58k

Nov 2022 / 10M


Q1d) show that grammar is ambiguous
S ➔ aSbS |bSaS | 
Link: https://youtu.be/BpV_d5M9Cpg

Nov 2022 / 10M


Q2 B Express the following in GNF:
S → aSb | aX
X → Xa | Sa | a
Link: https://youtu.be/7azWSytLPWs
Page - 11

Nov 2022 / 10M


Q4B Consider the following grammar: -
S → iCtS | iCtSeS | a
C→b
For the string “ibtaeibta”
find the following:
i) LMD
ii) RMD
iii) check if the above grammar is ambiguous.
Link: https://youtu.be/-g2RKeA4on8

Nov 2022 / 10M


Q6a) Write Short Note on Chomsky Hierarchy
Link: https://youtu.be/XljenkI0EAM
Page - 12

May 2023 / 5M
Q1A Explain Chomsky's Hierarchy for grammar
Link: https://youtu.be/0KjVlZlPgb8

May 2023 / 10M


Q3A Using following grammar:
S -> aB | bA
A -> a | aS | bAA
B -> b | bS | aBB
Derive 1) aabb 2) baab 3) aab
using LMD and RMD. Draw parse tree.
Also check if the grammar is ambiguous or not.
Link: https://youtu.be/5qhlPwYm-WQ

May 2023 / 10M


Q5B) Convert the following grammar to GNF:
S -> AB
A -> BSB | BB | b
B -> a
Link: https://youtu.be/p40OJxW1SX8
Page - 13

Push Down Automata:


Dec 18 / 5M
Q1 B Differentiate between DPDA & NPDA
Link: https://youtu.be/0sS5KHt1VVw

Dec 18 / 10M and Dec 19 / 10M


Q)Construct PDA accepting the language
L = {a2nbn | n > 0}
Link: https://youtu.be/alkZufHZheI
Logic 1
Logic
Nov 2022 / 10M
Q3 A Construct PDA accepting the language
L = {a2nbn | n >= 0} Logic 2

Link: https://youtu.be/WarRwDc5SZ8

Nov 2022 / 10M


Q6d) Write Short Note on Definition and Working of PDA
Link: https://youtu.be/nvvIPMQh_lQ

May 2023 / 10M


Q4B Design PDA to accept a language L = { an-1b2n+1 | n >= 1}
Link: https://youtu.be/fVdthgoFFhE
Page - 14

Turing Machine:
June 19 / 10M
Q3 B. Explain different types of Turing Machine.
Link: https://youtu.be/PjKLlRoYcMU

June 19 / 10M
Q4 A Design TM that computes function(m,n) = m + n
Link: https://youtu.be/ampGmY-o0MU

Dec 18 / 10M
Q4 A Construct TM to check for well-formedness of
parenthesis
Link: https://youtu.be/kfrL3bQCUck

Nov 2022 / 5M
Q1C VARIANTS OF TURING MACHINE
Link: https://youtu.be/tf1DZ0KiAjY

Nov 2022 / 5M
Q3B) Design TM to check for well formedness of parenthesis.
Link: https://youtu.be/4wHuJpliIuA
Page - 15

May 2023 / 5M
Q1D Explain Recursive and Recursively Enumerable
Languages.
Link: https://youtu.be/ELiVNz_iIt0

May 2023 / 10M


Q4A Design TM to recognize L = {anbn| n >= 1}
Link: https://youtu.be/E8VR2QIYdDs

May 2023 / 10M


Q6 D Explain any 5 variants of Turing Machine –
Link: https://youtu.be/8CGfL3PYg7M
Page - 16

Pumping Lemma:
Nov 2022 / 10M
Q5B) Give the formal definition of Pumping Lemma for
Regular Language and then prove that the following language
is not regular: L = { 0m1m+1 | m > 0}

Link: https://youtu.be/XmhYgmXZ4xY

May 2023 / 10M


Q5A Give and explain formal definition of pumping lemma
for regular language. using pumping lemma prove that
{anbn | n >= 1} is not regular
Link: https://youtu.be/UwnuLf6ujL4
Page - 17

Short Notes:
Dec 19 / 5M & June 19 / 5M
Q1 A) Explain Post Correspondence Problem
Link: https://youtu.be/8WSKfqtGdfE

Dec 19 / 5M
Q1 B) Differentiate between FA and PDA
Link: https://youtu.be/ugVM2lFtUoI

May 23 / 10M
Q6 A Explain PCP with an example
Link: https://youtu.be/a7IWPc7_ABY

You might also like