TOC Tutorial 1 2
TOC Tutorial 1 2
TUTORIAL
Name of Student
Enrollment No.
COs
Course Outcome (CO)
Students will be able to
Course CO Statement
Outcome
CO1 Use the concepts and techniques of discrete mathematics for theoretical computer
science.
CO2 Identify different formal languages and their relationship.
CO3 Classify and construct grammars for different languages and vice-versa.
CO4 Build finite automata, push down automata and turing machines.
CO5 Analyze various concepts of undecidability and Computable Function and Discuss
analytically and intuitively for problem-solving situation
Outcome
PSO1 Students will be able to analyze, innovate and design systems to solve
real world engineering challenges by applying the concepts of computer
engineering.
PSO2 Students will have the professional capabilities and adaptation of recent
trends in computer engineering for the betterment of society.
C.K.PITHAWALA COLLEGE OF ENGINEERING AND TECHNOLOGY, SURAT
Name of Student
Enrollment No.
INDEX
Sr.No Title Date Grade Sign
1 Basics of mathematical theory concepts
2 Regular, non regular and formal languages
3 Context Free Grammar and Languages
4 Push Down Automata and Turing Machines
5 Theory of Computation in the computer field to solve
computational problems
COMPUTER ENGINEERING DEPARTMENT, CKPCET, SURAT.
Theory of Computation
Tutorial –I:
[Batch1]
Q. No Questions (Total Marks: 10) Level of
Bloom’s
Taxonomy
Q.1 Define one-to-one, onto and bijection function. RU
Check whether the function f: R ---> R+, f(x) = x2 is one to one and onto.
Q.2 What do you mean by recursive definition? Give the recursive definition of R
factorial.
1. Set
2. Subset
[Batch 2]
Σ i = n (n+1) / 2
i=0
Q.2 Check the equivalence for following relation over the set {1,2,3} along UA
with justification for each:
Q.3 In each case below, construct a truth table for the statement UA
a. (p → q) ∧ (p → ¬q)
b. p ∨ (p → q)
Q.4 Define One-to-one and Onto Functions. Also explain Compositions and R U
Inverse of functions.
Q.2 Explain one-to-one, onto and bijection functions with suitable examples. RU
Q.3 Prove that : The Product to two integer Odd numbers is ODD UA
L 1 = {x / 00 is not a substring of x }
L 2 = {x / x ends with 01 }
(i) The language of all strings in {0,1}* that do not end with 11.
(ii) The language of all strings containing both 101 and 010 as substrings.
(ii) Strings of the language in {0,1}* with odd no. of zeroes and odd no. of
ones.
Q.4 State and Prove Kleene’s Theorem Part 1 with illustration. UN
Q.6 Explain procedure to minimize finite automata RU
Q.7 Convert following NFA- Λ to NFA and FA. UA
A {B, D} {A} Ø
B Ø {C} {E}
C Ø Ø {B}
D Ø {E} {D}
E Ø Ø Ø
Q.8 Find a regular expression corresponding to each of the following subsets of U
{0, 1}*.
i. The language of all strings that do not contain the substring 110.
ii. The language of all strings containing both 101 and 010 as substrings.
iii. The language of all strings in which both the number of 0's and the
number of l's are odd.
Q.10 Give the minimum pumping length and justify your answer. 0001∗ UN
[Batch 2]
Q.2 Let M1, M2 and M3 be the FAs pictured in Figure below, recognizing U N
languages L1, L2 and L3 respectively.
i. L 1 U L 2
ii. L 1 ∩ L 2
iii. L 1 - L 2
iv. L 1 ∩ L 3
v. L 3 - L 2
Q.3 Use the pumping lemma to show that the following languages are not UA
regular :
A {B} {A} Ø
B {D} {C} Ø
C Ø Ø {B}
D Ø {D} Ø
(i) The language of all strings in {0,1}* that do not end with 11.
(ii) The language of all strings containing both 101 and 010 as substrings.
Q.8 Write Regular Expression and draw FA for the following languages. U
2) Write a Regular Expression for the String of 0’s and 1’s in which number
of 0’s and 1’s are even.
Q. 10 Minimize the following DFA (Using Equivalence Theorem and Table Filling UN
Method).
[Batch 3]
Q. No Questions (Total Marks: 10) Level of
Bloom’s
Taxonomy
Q.1 Attempt the following : U
2) Write a Regular Expression for the String of 0’s and 1’s in which
number of 0’s and 1’s are even.
Q.2 Write Regular Expressions for the following languages of all strings in U
{0,1}*
(i) Strings that start with 1 and do not end with 10.
(0 + 1) * (10+110) * 1
Q.4 Draw FA for accepting: U
(ii)The strings with odd no. of 1’s and odd no. of 0’s
Q.5 Write theorem: For any NFA M =(Q,Σ,q0,A,δ) accepting a language L, there UA
is an FAM1=(Q,Σ,q1,A1,δ1) that also accepts L.
A {B, D} {A} Ø
B Ø {C} {E}
C Ø Ø {B}
D Ø {E} {D}
E Ø Ø Ø
2. Let M1 and M2 be the FA in fig below for the language L1 and L2,
[Batch 4]
Q. Questions (Total Marks: 10) Level of
Bloom’s
No
Taxonomy
Q.1 Write theorem: For any NFA M =(Q,Σ,q0,A,δ) accepting a language L, UA
there is an FAM1=(Q,Σ,q1,A1,δ1) that also accepts L.
Q.2 Write Kleene’s Theorem part-I, Any regular language can be accepted by R A
a finite automaton.
Q.3 Convert following NFA- Λ to NFA and FA. UA
A {B, D} {A} Ø
B Ø {C} {E}
C Ø Ø {B}
D Ø {E} {D}
E Ø Ø Ø
Q.4 Answer the following: UA
Q.5 Write Regular Expressions for the following languages of all strings in U
{0,1}*
Q.7 Compare FA , NFA and NFA- Λ. For the following Regular Expression U
draw an NFA-Λ recognizing the corresponding language.
(0 + 1) * (10+01) * 11
2. Let M1 and M2 be the FA in fig below for the language L1 and L2,