Toc Imp Analysis
Toc Imp Analysis
Topic: Sets
Topic: Functions
• Q.1(a) Let f be a function from the set 𝐴 = {1,2,3,4} to 𝐵 = {𝑝, 𝑞, 𝑟, 𝑠} such that, 𝑓 = {(1, 𝑝)(2, 𝑝)(3,
𝑞)(4, 𝑠)}. Is 𝑓⁻¹ a function? (03) (S-23)
• Q.1(a) Suppose A and B are sets, 𝑓 = 𝐴 → 𝐵 and 𝑔 = 𝐵 → 𝐴. If 𝑓(𝑔(𝑦)) = 𝑦 for every 𝑦 ∈ 𝐵, then f is a
______ function and g is a ______ function. Give reasons for your answers. (03) (S-24)
• Q.5(a) State the following functions: Partial, Constant and Total. (03) (W-22)
• Q.1(b) Write and explain the principle of mathematical induction using example. (04) (S-22)
• Q.1(c) Write Principle of Mathematical Induction. Prove that for every n ≥ 1, 1 + 3 + 5 + … + (2n - 1) =
n² (07) (W-21)
• Q.1(c) Write Principle of Mathematical Induction. And prove for every n ≥ 1, ∑_{i=1}^n 1/(i(i+1)) =
n/(n+1) (07) (W-23)
• Q.1(b) Prove “There must be a prime number between n and n!” (04) (W-22)
Topic: Relations
• Q.1(b) The given relation R on set A= {1,2,3} determine whether the Relation is reflexive, symmetric
or transitive, give reason. R ={(1,1), (1,2), (1,3),(2,1), (2,2), (3,1),(3,3)} (04) (W-21)
• Q.1(b) The given relation R on set A= {1,2,3} determine whether the Relation is reflexive, symmetric
or transitive, give reason. R ={(1,1), (1,2), (2,1), (2,2), (3,2),(3,3)} (04) (W-23)
Topic: Languages
• Q.1(b) 𝐿 is defined recursively as follows: 1. 𝜖 ∈ 𝐿 2. ∀𝑥 ∈ 𝐿, both 0𝑥 and 0𝑥1 are in 𝐿. Prove that: For
every 𝑛 >= 0, every 𝑥 belongs to 𝐿 obtained by n applications of rule 2 is an element of L. (04) (S-23)
• Q.2(b) Find a regular expression corresponding to each of the following subsets of {0,1}*: (i). the
language of all strings that do not end with 01 (ii). the language of all strings that begin with or end with
00 or 11 (04) (S-22)
• Q.2(b) Find a regular expression of following subsets of {0, 1}*: 1. The language of all strings that
begin or end with 00 or 11. 2. The language of all strings ending with 1 and not containing 00. (04) (W-
21)
• Q.2(b) Find a regular expression of following subsets of {0, 1}*: 1. The language of all strings that
begin or end with 00 or 11. 2. The language of all strings ending with 1 and not containing 00. (04) (W-
23)
• Q.3(b) Construct the regular expressions for the following languages. L1 = {Where the no. of ‘a’ is
odd}, Σ = {a,b} L2 = {Where every string starts with ‘0’ and of even length}, Σ = {0,1} (04) (W-22)
• Q.3(b) Construct the regular expressions for the following languages. L1 = {Where every string starts
with ‘b’ and does not contain 2 consecutive a’s}, Σ = {a,b} L2 = {Where every string starts with ‘1’ and
of odd length}, Σ = {0,1} (04) (W-22)
• Q.1(b) Write regular expressions for the following. (i) Binary numbers that are multiple of 2. (ii) Strings
of a's and b's with no consecutive a's. (iii) Strings of a's and b's containing consecutive a's. (04) (W-24)
• Q.2(c) Given two languages 𝐿1 and 𝐿2, defined as: 𝐿1 = {𝑥 | 𝑎𝑙𝑙 𝑥 𝑠𝑡𝑎𝑟𝑡 𝑤𝑖𝑡ℎ 𝑎𝑏𝑎 } 𝐿2 = {𝑥 | 𝑎𝑙𝑙 𝑥
𝑒𝑛𝑑𝑠 𝑖𝑛 𝑏𝑏} Write the regular expression for both the languages and construct FAs 𝑀1 and 𝑀2 such
that 𝑀1 accepts 𝐿1 and 𝑀2 accepts 𝐿2. Derive 𝐿1 ∩ 𝐿2. (07) (S-23)
• Q.3(a) Given two languages L1 and L2 defined over Σ = {a, b}*, L1 accepts palindrome strings and L2
accepts strings with equal number of 0’s and 1’s. Which one of these languages is regular? Give reasons.
(03) (S-24)
• Q.5(b) Regular languages and CFLs are both decidable and Turing-recognizable. Explain whether true
or false. (04) (S-24)
• Q.3(a) Give the difference between moore machine and mealy machine. (03) (W-21)
• Q.3(b) Design and mealy machine that gives output 1 if input of sequence abb comes, otherwise 0. (04)
(W-21)
• Q.3(b) Define mealy machine. Design and mealy machine that gives output ‘x’ if input of sequence is
abb, otherwise z. (04) (W-23)
• Q.3(b) Convert the given Moore machine into Mealy machine. Draw state transition diagram of Mealy
machine. (04) (W-23)
• Q.2(c) Construct the Moore machine that counts the no. of occurrences of substring “bba” over Σ =
{a,b}. Now convert this Moore machine into Mealy machine. Show the transition table and transition
diagram for both the machines. (07) (W-22)
Topic: Finite Automata Concepts
• Q.1(c) Write down 5-tuple definition for the finite automata. Construct the minimal finite automata over
Σ = {a,b} for the following languages. L1 = {Where all the strings start and ends with different symbol}
L2 = {Where every string has odd occurrences of “ba”} (07) (W-22)
• Q.1(c) Discuss “Distinguishability” of one string from another and explain how it affects the number of
states in an FA. Considering the example of 𝐿 = {𝑎, 𝑏}*{𝑎𝑏𝑎}, how do the distinguishable strings in L
relate to the number of states in its FA? (07) (S-23)
• Q.3(a) Construct a Finite Automata that accepts all strings containing 010 or 111 as substring only. (03)
(S-24)
• Q.1(c) Draw Finite automata for following regular expression: (i). (0 + 1)∗(1 + 00)(0 + 1)∗ (ii). (111 +
100)∗0 (07) (S-22)
• Q.2(c) Draw Finite Automata to accept following over input alphabets Σ ={0, 1} (i) The language
accepting strings not ending with ’01’. (ii) The language accepting strings next to last symbol ‘0’ (07)
(W-21)
• Q.2(c) Draw Finite Automata to accept following over input alphabets Σ ={0, 1} (i) The language
accepting strings not ending with ’01’. (ii) The language accepting strings not containing substring ‘00’
(07) (W-23)
• Q.1(c) Construct a DFA for the language over {0, 1}* such that it contains “000” as a substring. (07)
(W-24)
• Q.2(b) Draw a DFA that accepts strings having odd number of 0’s and even number of 1’s over Σ =
{0,1}. (04) (W-22)
• Q.2(c) Let M1 and M2 be the FAs pictured in Figure, recognizing languages L1 and L2 respectively.
Draw FAs recognizing the following languages. a. L1 U L2 b. L1 - L2 (07) (W-21)
• Q.2(c) Let M1 and M2 be the FAs pictured in Figure, recognizing languages L1 and L2 respectively.
Draw FAs recognizing the following languages. a. L1 U L2 b. L1 - L2 (07) (W-23)
• Q.5(c) Prove that for two recursive languages L1 and L2 their union and intersection is recursive. (07)
(W-24)
• Q.2(b) State the difference between NFA and DFA. (04) (W-24)
• Q.3(a) Draw NFA lambda for the given regular expression: (0)* (00 + 11)* (001) (01 + 10) (03) (S-23)
• Q.3(a) Find the ꓥ-closure of a set of states for each state of the given NFA lambda in Figure-1. (03) (S-
23)
• Q.2(c) Draw the given NFA in Table-1 and convert it to FA and identify the language. q0 is the initial
state and q1 is the accepting state. (07) (S-23)
• Q.2(c) Draw the NFA-λ for r = (0)11* + (101)* 0 and also construct the equivalent NFA and FA for the
same. (07) (S-24)
• Q.2(c) Apply the rules and convert the given NFA-λ to FA. (07) (S-24)
• Q.2(c) Define the steps to convert ε -NFA into NFA. Then convert the following ε -NFA into NFA. (07)
(W-22)
• Q.4(b) Using kleene's Theorem Draw NFA-Λ for ((0+1)10 + (00))* (04) (W-21)
• Q.4(b) Using kleene's Theorem Draw NFA-Λ for a given RE aa(ba)+baba* (04) (W-23)
• Q.2(b) Define pumping lemma for regular language. Show that the language L= {aⁿbⁿcⁿ / n>=1} is non-
regular using pumping lemma theory. (04) (W-22)
• Q.2(c) Prove by pumping lemma, that the language 0ⁿ1ⁿ is not regular. (07) (W-24)
• Q.5(c) Prove that the language L = {aⁿbⁿ | n ≥ 0} is not regular using pumping lemma. (07) (W-22)
• Q.3(a) Define Context free grammar & context free language (03) (S-22)
• Q.3(b) Define Context Free Grammar. Find context-free grammar for the language: L= {aⁱbʲcᵏ | j=i+k}
(04) (W-21)
• Q.3(a) Find context-free grammar for the language: L= {aⁱbʲcᵏ | i=j+k} (03) (W-23)
• Q.4(a) Construct a CFG for set of strings that contain equal number of a’s and b’s over ∑ = {a,b}. (03)
(W-24)
• Q.4(a) Find the CFG for the regular expression : (011 + 1)(01)* (03) (W-21)
Topic: Union, Concatenation, and Kleene’s Closure of CFL
• Q.3(b) Write CFG for following (i) L={aⁱbʲcᵏ | i=j or j=k} (ii) L={aⁱbʲcᵏ | j>i+k} (04) (S-22)
• Q.3(c) If a regular expression is given as (001)*(01 + 10). Apply the rules to construct a regular
grammar for this language. (07) (S-24)
• Q.3(a) Define Ambiguous grammar. for following grammar say whether the grammar is ambiguous or
not. give reason S→ABA, A→aA | Λ , B→bB | Λ (03) (W-21)
• Q.3(a) Define Ambiguous grammar. for following grammar say whether the grammar is ambiguous or
not. give reason S→ABA, A→aA | Λ , B→bB | Λ (03) (W-23)
• Q.2(c) What is ambiguous grammar? Is the following grammar ambiguous? 1. E→ E+E |EE | id 2. E→
E+E|EE|(E)|a Justify your answer. (07) (W-24)
• Q.4(c) Explain ambiguous and unambiguous context free grammar with example. (07) (W-22)
• Q.3(c) Show Bottom Up Parsing of the string “id + id * id” using the following grammar. E → E + T | T
T → T * F | F F → (E) | id (07) (S-23)
• Q.4(b) Give the difference between top down and bottom up parsing. (04) (S-22)
• Q.4(b) Give an unambiguous grammar for SIMPLE CALCULATOR contain +, -, *, /,(,) operator for
terminal ‘id’. And draw a parse tree for (id+id)*id-id (04) (W-21)
• Q.3(c) Convert following CFG to CNF: S->aX/Yb X->S/^ Y->bY/b (07) (S-22)
• Q.4(c) Given the context-free grammar G, find a CFG G’ in Chomsky Normal Form. S -> AaA | CA |
BaB A -> aaBa | DC B -> bb | aS C -> Ca | bC | D D -> bD | Λ (07) (W-21)
• Q.4(c) Given the context-free grammar G, find a CFG G’ in Chomsky Normal Form. S -> AaA | CA |
BaB A -> aaBa | DC B -> bb | aS C -> Ca | bC | D D -> bD | Λ (07) (W-23)
• Q.3(c) Define: CNF. Show the steps to convert CFG into CNF. Convert the following CFG into
equivalent CNF. S → T U T → 0T1 | ε U → 1U0 | ε (07) (W-22)
• Q.3(c) Apply the rules and show step by step conversion of the following grammar to CNF. S → ASA |
aB A → B | S B → b | ϵ (07) (S-24)
• Q.4(b) What is chomsky normal form? Explain with an example (04) (W-24)
• Q.4(c) Convert the following grammar into CNF S→cBA, S→A, A→cB, A→AbbS, B→aaa (07) (W-
24)
• Q.4(c) Convert the following grammar G in greibach normal form. S→ABb|a A→aaA|B B→bAb (07)
(W-24)
• Q.3(a) Define the following operations for Push Down Automata: PUSH, POP, and SKIP. (03) (W-22)
Topic: Deterministic PDA
• Q.4(a) Define DPDA with clear definition of δ (transition function). (03) (S-24)
• Q.4(a) The language of DPDA is called DCFL. Explain whether this statement is true or false. (03) (S-
24)
• Q.3(b) Is NPDA (Nondeterministic PDA) and DPDA (Deterministic PDA) equivalent? Illustrate with an
example. (04) (W-24)
• Q.3(b) Compare Deterministic PDA and Non deterministic PDA. (04) (W-24)
• Q.3(c) Is it true that non deterministic PDA is more powerful than that of deterministic PDA? Justify
your answer. (07) (W-24)
• Q.4(b) Show that if there are strings 𝑥 and 𝑦 in the language 𝐿 so that 𝑥 is a prefix of 𝑦 and 𝑥 ≠ 𝑦, then
no DPDA can accept 𝐿 by empty stack. (04) (S-23)
• Q.4(b) Construct PDA for S → 0AB A → 1A | 1 B → 0B | 1A | 0 Trace the string 01011 using PDA.
(04) (W-23)
• Q.3(b) Explain the Pumping Lemma for Context Free Languages. (04) (S-23)
• Q.4(a) State pumping lemma for context free language. (03) (W-23)
• Q.4(b) Define pumping lemma for context free language. Show that the language L= {ww / w ∈{a,b}*}
is not context free language using pumping lemma theory. (04) (W-22)
• Q.3(b) Apply pumping lemma to show that the language 𝐿 = {𝑎ⁿbⁿcⁿ | 𝑛 ≥ 0} is not context free. (04) (S-
24)
• Q.3(a) State and prove the pumping lemma for CFL. What is its main application? Give an example.
(03) (W-24)
• Q.3(b) What are non-CFLs? Give at-least two examples of non-CFLs. (04) (S-23)
• Q.4(c) Design and draw PDA to accept string with more a’s than b’s. (07) (S-22)
• Q.5(b) Design a PDA to accept L = {xcy | x, y∈ (a,b)* and |x| = |y|}. (04) (W-21)
• Q.5(b) Design a PDA to accept L = {xcy | x, y∈ (a,b)* and |x| = |y|}. (04) (W-23)
• Q.3(c) Construct PDA for the language L={wwᴿ ∣ w∈(a+b)* } (07) (W-24)
• Q.3(c) What is Instantaneous Description? Construct the pushdown automata over Σ = {a,b} for the
language L = {aⁿc bⁿ / n>=1}. (07) (W-22)
• Q.4(c) Write down 7-tuple definition for the turing machine. Construct the turing machine and its
transition table over Σ = {a,b} for the language L = {aⁿbⁿ / n>=1}. (07) (W-22)
Topic: Model of Computation
• Q.4(c) For the given Turing Machine in Table-2, trace the transition for the strings 1011 and 10101 and
identify the language recognized by this TM. TM is defined as TM = (Q, Σ, Γ, q0, δ ) where
{q0,q1,q2,q3,q4,q5,q6} ∈ Q, Σ = {0,1}, {0,1,X,Y,B} ∈ Γ, q0 ∈ Q, B ∈ Γ , B ∉ Σ, {q6} is the accepting
state. (07) (S-23)
• Q.4(c) Draw a TM for the Language of strings with balanced parenthesis “(” and “)” only. (07) (S-23)
• Q.4(c) Apply the rules and step by step create a Turing Machine to accept 𝐿 = {𝑎ⁿbⁿ} (07) (S-24)
• Q.4(c) Construct a Turing machine to accept even palindrome over Σ = {a,b}* (07) (S-24)
• Q.5(c) Develop a Turing Machine to accept palindromes over {a,b}* (07) (W-21)
• Q.5(c) Develop a Turing Machine to accept palindromes over {a,b}* (07) (W-23)
• Q.5(c) Develop a Turing Machine to accept the language L = {X / Na(X)=Nb(X) , X ∈ {a,b}*} (07)
(W-21)
• Q.5(c) Develop a Turing Machine to accept the language L = {X / Na(X)=Nb(X) , X ∈ {a,b}*} (07)
(W-23)
• Q.4(b) Design a Turing machine with no more than three states that accepts the language a(a+b)*.
Assume ∑ = {a,b} (04) (W-24)
Topic: TM for Partial Function Computation
• No questions explicitly cover this topic.
• Q.5(b) Draw only the transition table of Turing Machine to accept the language 𝐿 = {0ⁿ1ⁿ : 𝑤ℎ𝑒𝑟𝑒 𝑛 ≥
1} (04) (S-23)
• Q.5(b) Show that a Turing Machine to recognize the language 𝐿 = 𝐿(0*1) can accept the string without
moving the head in L direction. (04) (S-23)
Topic: TM Variations
Topic: Non-Deterministic TM
• Q.5(a) A language is decidable if and only if some nondeterministic Turing machine decides it. Explain
the statement. (03) (S-24)
Topic: Universal TM
• Q.5(a) When can the language be called a recursive language or a recursively enumerable language?
(03) (S-23)
• Q.5(a) Define the following terms: Recursive language, and Recursive Enumerable Language. (03) (W-
22)
• Q.5(a) What is a recursively enumerable language? (03) (W-24)
• Q.4(a) Enlist closure properties for the context sensitive language. (03) (W-22)
Topic: TM Design
• Q.5(c) Define: Bounded Minimalization and show that, if P is a primitive recursive (𝑛 + 1) place
predicate, its bounded minimalization 𝑚𝑃 is a primitive recursive function. (07) (S-23)
• Q.5(c) Describe: Recursive function. Prove that every recursive function is computable. (07) (W-22)
Topic: μ-Recursive Functions
• Q.5(c) Define: 𝜇-Recursive functions and show how all computable functions are 𝜇-recursive. (07) (S-
23)
Chapter 7: Undecidability
• Q.5(a) When we say a problem is decidable? Give an example of an undecidable problem. (03) (W-24)
• Q.5(b) Mention the difference between decidable and undecidable problems. (04) (W-24)