Question Bank - UPCCCS504 - TOC

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

D.Y.

PATIL UNIVERSITY AMBI PUNE


School of Engineering & Technology
Department of Computer Engineering, Information
Technology & AI-DS

Theory of Computation (UPCCCS504)


Question Bank

Date: 30 Oct 2023

Unit 1:
1. Describe Finite State Machine? Construct a binary
adder as a FSM?
2. What is mean by Transition Diagram? Design FSM for
a divisibility by 3 tester for decimal numbers and draw
TG & simulation for input of 112 & 1416.
3. Design FSM for a divisibility by 5 tester for decimal
numbers and draw TG for the same.
4. What is mean by Finite Automata? Explain in detail with
the help of TG and notation used in the TG?
5. Define Accepting of a string? Design an FA that reads
string made up with CHARIOT and recognize those
strings that contain CAT as a sub string.
6. Explain DFA and NFA in details?
7. Explain Dead or Trap state and unreachable state with
suitable diagrams?
8. Convert NFA into equivalence DFA: M [{q0, q1}, {0, 1},
δ, q0, {q1}] where δ is a table given here.
Σ 0 1
Q
q0 {q0,q1} {q1}
q1 ɸ {q0,q1}

9. What is mean by equivalence of NFA and DFA?


10. What is Minimization and using minimization
concept convert the NFA [{p,q,r,s}, {0,1}, δ, p, {s}] to its
equivalent DFA where state transition function δ is
Σ 0 1
Q
p p,q p
q r r
r s ɸ
s s s

11. Explain the concept of DFA and NFA with ℇ-


Transition using indirect method? Construct an
equivalence DFA for the NFA with ℇ-moves

12. Explain Moore machine in detail with the help of


construct a Moore machine to find out the residue of
module-3 for binary number.
13. Explain the concept of Mealy machine with the help
of the given problem? To find the 2’s complement of
given binary number?
14. Explain the concept of Regular Expression and
how its works?
15. Using RE describe the language consisting of all
strings over Σ={0,1} with at least two consecutive 0’s.
16. Using RE describe the language consisting of all
strings over Σ={a,b} with all strings strting &ending with
a’s and any number of b’s in between.

Unit 2:
17. Define Regular Expression and describe the RE
formalism with parallel, serial and iteration path?
18. Using RE describe the language consisting of all
strings over Σ = {0,1} with at least two consecutive 0’s.
19. Using RE describe the language consisting of all
strings over Σ = {0,1,2} such that every string from the
language contain any numbers of 0’s followed by any
number of 1’s followed by any numbers of 2’s.
20. If L(r) = set of all strings over Σ = {0,1} ending with
011 then find r?
21. Show that (a . b) ≠ a*. b*
22. Show that (a + b) = (a + b)* + (a + b)*
23. Draw NFA with ℇ-moves for the regular expression
r = a . (a + b)*, which represent the language consisting
of string of a’s and b’s, starting with a.
24. Draw NFA with ℇ-moves for the regular expression
r = (a* + b*)
25. Construct a transition graph that recognized the set
r = [1. (00)* . 1 + 0 . 1* . 0]*
26. Construct a DFA that accept the language
represented by 0* . 1* . 2*
27. Explain all sets and their closure properties?
28. Describe the LEEMA properties of RE?
29. Explain all applications of RE & FA?

Unit 3:
30. Define Grammar? Explain formal definition of
grammar along with the notations used for the same?
31. Define and explain the concept of context Free
Grammar?
32. Explain Leftmost Derivation and Rightmost
derivation with an example.
33. Consider the following CFG: G = {(S,A), (a,b), P, S}
34. For the Grammar G which is defined as
a. S  aB | b A
b. A a | a S | b A A and
c. B  b | b S | a B B, Where S is the starting
symbol, write leftmost and rightmost derivation for
the string “bbaaba”

35. For the following grammar, give the leftmost and


rightmost derivation for the string “aaabbb”
SaSb|ab
36. Describe the concept of Derivation Tree along with
formal definition part?
37. Consider the grammar G = { (S, A), (a,b), P, S}
where P consists of
S  aAS | a
A  SbA | SS | ba, Draw derivations tree for the
string “aabbaa”
38. Let G be the context free grammar which is defined
as
S  a S b | a b, Find CFL generated by G

39. Write the grammar for generating all strings


consisting of a’s and b’s with at least two a’s.
40. Write the grammar for generating the variable
name which van be given by the RE (letter)(letter/digit)
which means a letter followed by nay number of letters
or digit.
41. Describe the Ambiguous Context Free Grammar?
Explain Removal of Ambiguity with an example?
42. Check whether or not the following grammar is
ambiguous? If it is ambiguous, remove the ambiguity
and write equivalent unambiguous grammar.
SiCtS|iCtSeS|a
Cb
And drive the string “ibtibtaea”
43. Describe the concept of simplification of context
free grammar? Explain the removal of useless symbol?
44. Consider the grammar G defined as G = { (A,B)
(a,b), P, A} where P consists of
AB
Ba|b
45. Describe the Chomsky Normal Form & Greibach
Normal Form in detail?
46. Covert the following CFG to CNF
S  aSa | bSb | a | b| aa | bb

47. Covert the following grammar to GNF


S  ABA | AB | BA | AA | A | B
AaA|a
B  bB | b

Unit 4:

48. Define Pushdown Automata? Explain elements of


PDM and formal definition of PDM?
49. Describe the pictorial representation of PDM
elements in detail?
50. Differentiate PA with PDA.
51. Construct a PDA that recognize the language
accepted by the DFA, for RE of b*a a* (b b* a a*) and
test it for bbaaba & baaabab along with DPDA
equivalent.

- +
a

b
a a

52. Construct a PDA that recognize the language


accepted by the DFA, test it for abaab along with DPDA
equivalent.

1- 2
a3
+
a
b
b a,b

Unit 5:

53. Define Turing Machine?


54. Differentiate TM with FA.
55. Explain elements of TM?
56. Describe Functional Matrix & Simplified Functional
Matrix?
57. Explain & TM formalism & Formal Definition of TM?
58. Consider an SFM for a TM with the following.
I={0, 1 , }
S={α, β, γ = halt)
D={L, R, N}
Initial State= α
Simulate for “0001” & Draw TG for the SFM provided.
0I 1
S
α R 0βR R
β --- --- γN
γ --- --- ---

59. Design a TM to find the 2’s complements of given


primary number.
I={0, 1 , ;}
S={q0, q1, q2, q3 = halt)
D={L, R, N}
Initial State= q0
Simulate for “01010” & Draw TG for the SFM provided.
0I 1 ;
S
q0 R R q1 L
q1 L q2 L q3 N
q2 1L 0L q3 N
q3 --- --- ---

60. Design a TM to that replace all occurrence of 111


by 101.
I={0, 1 , ;}
S={q0, q1, q2, q3, q4, q5 = halt)
D={L, R, N}
Initial State= q0
Simulate for “11110111” & Draw TG for the SFM
provided.

0I 1 ;
S
q0 R q1 R q5 N
q1 q0 R q2 R q5 N
q2 q0 R q3 L q5 N
q3 --- 0 q4 R ---
q4 --- q0 R ---
q5 --- --- ---

61. Design a TM to that recognize words of the form 0n


1n for n>=0.
I={0, 1, a, c, }
S={α, β, γ, δ, ℇ = halt)
D={L, R, N}
Initial State= α
Simulate for “0011” & Draw TG for the SFM provided.

0I 1 a c
S
α a β R --- --- δR ℇ N (accept)
β R cγL --- R ---
γ L --- αR L ---
δ --- --- --- R ℇ N (accept)
ℇ --- --- --- --- ---

62. Design a TM to that recognize binary palindromes.


I={0, 1, ; , F, T}
S={ q0, q1, q2, q3, q4, q5, q6= halt)
D={L, R, N}
Initial State= q0
Simulate for “0110” & Draw TG for the SFM provided.

0I 1 ; F T
S
q0 L L q1 R --- ---
q1 ; q2 R ; q4 R T q6 --- ---
N
q2 R R q3 L --- ---
q3 ; q0 L F q6 T q6 --- ---
N N
q4 R R q5 L --- ---
q5 F q6 ; q0 L T q6 --- ---
N N
q6 --- --- --- --- ---

Unit 6:

63. Explain Halting issue in detail?


64. Describe Decidable & undecidable problems?
65. Explain Recursive & Recursively Enumerable
languages?
66. Explain Rice Theorem in detail?
67. Explain post correspondence problem?
Prof. Anup Date
Subject Incharge

You might also like