SAL Institute of Technology and Engineering Research

You might also like

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

SAL Institute of Technology and

Engineering Research
Computer Engineering Department

Theory of Computation (3160704)


Question Bank
Year: 2022-2023
Topic Marks
TOPIC:1 Review of Mathematical Theory

Explain on to, one to one, and Bijection Function with suitable example.( WINTER 2021,SUMMER
1 2020) 3

2 Explain reflexivity, symmetry, and transitivity properties of relations.( WINTER 2021, SUMMER 2019) 4

3 What is PMI? Prove 7+ 13+19+…..+(6n+1)= n(3n+4) using PMI. ( WINTER 2021, SUMMER 2019) 7
Discuss Recursive definition. Also define the language L defined by the following recursive definition
4 3
over ∑ = {a, b}: ^ ∈ L; For every x ∈ L, xa, bx, and abx are in L; Nothing else is in L. (WINTER 2020)
Let relation R = {(a,b) : a + b = 10 and a, b ∈ N}. Decide whether R is an equivalence relation or not.
5 4
Justify your answer with proper reason. (WINTER 2020, SUMMER 2020)
Define – bijection function. Check whether the function 𝑓 ∶ 𝑍 → 𝑍 defined by 𝑓(𝑥) = 2𝑥 is a bijection
6 4
function or not. Justify your answer.(WINTER 2019, SUMMER 2020)
Use the principle of mathematical induction to prove that 1 +3 +5 + … +(2n-1) = n2 for all n>0 where r
7 7
is an odd integer & n is the number of terms in the sum .(SUMMER 2021)

TOPIC:2 Regular Languages and Finite Automata


Find regular expression for following I. Language of all strings containing exactly two 0’s. II. Language
1 of all strings that begins or ends with 00 or 11. ( WINTER 2021, WINTER 2020) 3

2 Compare FA, NFA and NFA-^.( WINTER 2021, WINTER 2020) 4


Draw Finite Automata (FA) for following languages: L1 = {x / 00 is not a substring of x } L2 = {x / x
3 ends with 01 } Find FA accepting languages (i) L1 ∩ L2 and (ii) L2 – L1.( WINTER 2021, 7
Summer2020)
Define NFA – Λ. Explain how to convert NFA – Λ into NFA and FA with suitable example .(
4 WINTER2021, Summer 2020) 7

5 Draw FA for each of the following RE. (a+b)*baaa.( WINTER 2021, Summer 2021) 3

6 Define pumping lemma and its application. ( WINTER 2021, Summer 2018) 4

7 Explain moore machine and mealy machine. ( WINTER 2021, Summer 2019) 4

Write regular expressions for the following languages defined over ∑ = {0, 1}: 03
(i) The language of all the strings that do not end with 01.
8 3
(ii) The language of all the strings containing even number of 0’s and even number of 1’s. (WINTER
2020)
Draw DFA for the following languages defined over ∑ = {a, b}: 04
9 (i) The language of all the strings with next-to-last symbol is a. 4

(ii) The language of all the strings containing substring bba. (WINTER 2020, Summer 2019)

10 Define DFA and NFA and NFA- Λ.(SUMMER 2021, Summer 2018) 3
Using constructive approach determine NFA- Λ for the regular expression (0 + 1)*1(0 + 1).
11 (SUMMER2021, Summer 2019) 4
Develop an FA corresponding to following regular expression 𝑟 = (11 + 110) ∗0 Explain the properties
12 of Distinguishability of Strings and Equivalence classes, show minimum numbers of states necessary 7
forthis FA. (SUMMER 2020, Summer 2019)
TOPIC: 3 Context free grammar (CFG)

Prove that – “If there is a CFG for the language L that has no Ʌ-productions, then there is a CFG for
Lwith no Ʌ-productions and no unit productions”. Support your answer with the help of the following
CFG: S → A | bb
1 7
A→B|b
B → S | a (WINTER 2019)

For the following CFG, Find Chomsky normal


formS→AACD
2 A→aAb|ᴧ 7
C→ aC|a
D→aDa|bDb|ᴧ ( WINTER 2021, Summer 2020)
Consider the grammar:
S→aAS | a 03 2
3 A→ SbA | SS | ba 3
Derive left most and right most derivation of string aabbaa using given grammar. ( WINTER
2021,Summer 2020)
4 Define CFG. Create CFG for (011+1)*(01)* ( WINTER 2021, Summer 2019) 4
Explain Ambiguous Grammar and remove ambiguity with suitable example. ( WINTER 2021, Summer
5 2019) 4
6 Prove that the context-free languages are closed under union. (WINTER 2020, Summer 2018) 3
For the following CFG, find out two left most derivations for the string “aaabb” and also draw
thecorresponding parse trees.
7 S → XY 4
X → XX | a
Y → YY | b (WINTER 2020, Summer 2019)
What language over {a, b}* does the CFG with productions
8 S → aT | bT 3
T → aS | bS | ^ generate? Prove your answer. (WINTER 2020, Summer 2020)
Find the CFG for the regular expression : (011 + 1) ∗ (01) ∗ . (WINTER 2020, . WINTER 2019, Summer
9 3
2020)

TOPIC: 4 Pushdown Automata, CFL And NCFL


Design PDA for L={x∈x r /x∈{a,b}*}. The string in L are odd length palindromes over {a,b}. (
1 7
WINTER 2021, Summer 2020)
2 Write a note on DPDA and NPDA ( WINTER 2021, WINTER 2020) 4

3 Design a deterministic PDA Accepting “Balance string of brackets” ( WINTER 2021, WINTER 2019) 7
4 Define - A Pushdown Automaton and acceptance by a PDA. (WINTER 2020, Summer 2020) 3
5 Design a PDA to accept L = {wcwR | w ∈ (a,b)*} (WINTER 2020 , Summer 2021) 7
6 Design a PDA to accept L = {xcy | x, y∈ (a,b)* and |x| = |y|}. (WINTER 2020, Summer 2019) 7
7 Give transition table for PDA accepting the language of all odd-length strings over {a, b} with middle
symbol a. Also draw a PDA for the same.( WINTER 2019, Summer 2018 7
Convert the following CFG into its equivalent PDA.
S → AB
8 A → BB
3
B → AB
A→a
B → a | b (WINTER 2019, Summer 2021)
4
TOPIC: 5 Turing Machine (TM)

1 Design a TM for accepting Palindromes for odd and even length. ( WINTER 2021, SUMMER 2017) 7
2 What is Turing Machine? Write advantages of TM over FSM. ( WINTER 2021, SUMMER 2017) 3
3 Enlist limitations of Turing machines. ( WINTER 2021, SUMMER 2017) 3

4 Discuss Universal Turing Machine with suitable example. ( WINTER 2021, WINTER 2020, SUMMER 7
2018)
5 Write Short note on Church-Turing Thesis. ( WINTER 2021, SUMMER 2017) 3
6 Discuss - recursively enumerable languages. (WINTER 2020, SUMMER 2020) 3
7 Discuss chomsky hierarchy. (WINTER 2020, SUMMER 2019) 4
Draw a Turing Machine that accepts the language {a nb n a n | n ≥ 0} over {a, b} ∗ . Also trace the TM
8 7
on input string aaabbbaaa. (WINTER 2019, SUMMER 2018)
9 Write a Turing Machine to copy strings. (SUMMER 2021, SUMMER 2018) 7

TOPIC: 6 Computable Functions

Define Constant functions, Successor functions and Projection function. ( WINTER 2021,
1
SUMMER 2018)
2 Explain Halting Problem with suitable example. ( WINTER 2021, SUMMER 2017) 7
3 Discuss primitive recursive function using proper example(WINTER 2020, SUMMER 2018) 4
Define - Primitive recursive functions and also give complete primitive recursive derivations for the
4 4
function, f ∶ N → N defined by Add(x, y) = x + y. ( WINTER 2019, SUMMER 2020)

TOPIC: 7 Undecidability

Define P, NP, NP-Hard and NP-Complete problem? ( WINTER 2021, SUMMER 2020,SUMMER
1 4
2017)

2 Define Bounded Minimalization of a predicate P.( SUMMER 2020, SUMMER 2017) 3

You might also like