Professional Documents
Culture Documents
Home Assignment 1
Home Assignment 1
Note: This home assignment has due date 31-08-2023. This assignment helps you in preparing
T1. For this assignment, refer to the study material given in classroom folder shared with you.
You have to keep the solution of this home assignment in your notebook as announce in the
classroom.
1. Briefly describe what theory of computation is.
2. Describe P and NP Class problem with example.
3. For each of the following languages, (i) give a plain English description of the
language, and (ii) give two examples of strings in the language and two examples
of strings that are in Σ*but are outside the language.
(a) L1 = {0x1 | x ∈ {0, 1}*}
(b) L2 = {w ∈ {a, b} ∗ | |w| ≥ 4} ∩ {xabbay | x, y ∈ {a, b}*}
4. For each of the following languages, (i) describe the language using set-builder
notation and union/intersection/complement/reverse/concatenation operations
(the notation used in Problem 3), and (ii) give two examples of strings in the
language and two examples of strings that are in Σ* but are outside the language.
(a) L3 = the set of all strings over alphabet {a, b, c} that are palindromes (read
the same forwards and backwards) or start with a. (For example, bacab and
cabbac are palindromes.)
(b) L4 = the set of all strings over alphabet {1, 2, . . . , 9} whose length is divisible
by a, where a is the first symbol of the string.
5. Prove the following equivalences using logical identities:
(a) (¬P => (¬P => (¬P ^ Q))) ≡ P v Q
(b) P ≡ (P v Q) ^ (P v ¬Q)
6. Obtain the principal disjunctive normal form of the following:
(a) P => (P => Q ^ (¬ (¬ Q v ¬P)))
(b) (Q ^ ¬R ^ ¬ S) v (R ^ S).
7. Draw the deterministic finite automata accepting each of the following languages
a a
a
e
a s
p f
s
e
b
a a a a
b
e
q
p q
b
a
a
Figure 2