Gtu Pyqs Toc-separated
Gtu Pyqs Toc-separated
o 𝑝: 𝑎 = 1, 𝑞: 𝑏 = 0, 𝑟: 𝑐 = 3
Given three statements p, q, and r:
Either 𝑎 = 1 or 𝑏 ≠ 0.
and → only:
SUMMER-2023
Q1(a): Function Inversion - Is f−1f^{-1}f−1 a function? (03)
Q1(b): Proof using Structural Induction (04)
WINTER-2022
1. Define the following functions:
o One-One (Injective)
o On-To (Surjective)
o Inverse
2. Prove: "There must be a prime number between n and n!"
3. Define the following functions:
o Partial Function
o Constant Function
o Total Function
SUMMER-2022
1. Define:
o Set
o Subset
o Complement
2. Write and explain the Principle of Mathematical Induction with an
example.
3. Explain:
o Regular Languages
o Regular Expressions
4. Find a Regular Expression corresponding to each of the following
subsets of {0,1}*:
o Strings that do not end with "01"
o Strings that begin with or end with "00" or "11"
5. Prove Kleene’s Theorem (Part 1).
WINTER-2021
1. Define:
o One-to-one function
o Onto function
o Bijection function
2. Determine whether the given relation R on A = {1,2,3} is:
o Reflexive
o Symmetric
o Transitive
Give reasons for your answer.
Relation R = {(1,1), (1,2), (1,3), (2,1), (2,2), (3,1), (3,3)}
3. State the Principle of Mathematical Induction and use it to prove:
1 + 3 + 5 + … + (2n - 1) = n² for n ≥ 1.
SUMMER-2024
Discuss the pumping lemma for regular languages.
Define a Moore machine.
Apply the rules and convert the given NFA-λ to FA.
Draw the NFA-λ for r = (0)11* + (101)* 0 and construct the equivalent NFA
and FA.
Given two languages L₁ and L₂ defined over Σ = {a, b}* where:
o L₁ accepts palindrome strings.
o L₂ accepts strings with equal numbers of 0’s and 1’s.
o Which one of these languages is regular? Give reasons.
Construct a Finite Automata that accepts all strings containing 010 or 111
as substrings only.
Apply the rules to construct a regular grammar for the given regular
expression (001)* (01 + 10).
WINTER-2023
SUMMER-2023
Q1(c): Distinguishability in FA & example for L={a,b}∗{aba}L = \{a,
b\}^* \{aba\}L={a,b}∗{aba} (07)
Q2(a): Define Grammar (03)
Q2(b): Compare Moore and Mealy Machines (04)
Q2(c): Regular Expressions and FA construction for:
o L1={x∣x starts with aba}L_1 = \{x | x \text{ starts with } aba\}L1
={x∣x starts with aba}
o L2={x∣x ends with bb}L_2 = \{x | x \text{ ends with } bb\}L2
={x∣x ends with bb}
o Find L1∩L2L_1 \cap L_2L1∩L2 (07)
Q2(c) OR: Convert given NFA to FA and identify the language (07)
WINTER-2022
6. Write the 5-tuple definition of Finite Automata.
7. Construct the Minimal Finite Automata over Σ = {a, b} for:
o L₁: Strings that start and end with different symbols
o L₂: Strings with odd occurrences of "ba"
8. Define the Pumping Lemma for regular languages.
9. Prove that L = {aⁿbⁿcⁿ | n ≥ 1} is non-regular using the Pumping
Lemma.
10.Construct Regular Expressions for:
o L₁: Strings where the number of 'a' is odd, Σ = {a, b}
o L₂: Strings that start with '0' and have even length, Σ = {0,1}
11.Construct Regular Expressions for:
o L₁: Strings that start with 'b' and do not contain two consecutive
'a's, Σ = {a, b}
o L₂: Strings that start with '1' and have odd length, Σ = {0,1}
12.Define the steps to convert ε-NFA to NFA and apply them to a given ε-
NFA.
13.Explain the minimization of Finite Automata with an example.
SUMMER-2022
6. Draw Finite Automata for the following Regular Expressions:
o (0+1)∗(1 + 00)(0+1)∗
o (111+100)∗0
7. Explain the procedure to minimize a finite automaton.
WINTER-2021
4. Define Finite Automaton (FA) and write a recursive definition of NFA.
5. Find a Regular Expression for the following languages:
o Strings that begin or end with "00" or "11".
o Strings that end with "1" and do not contain "00".
6. Draw Finite Automata to accept the following languages over Σ =
{0,1}:
o Strings not ending with "01".
o Strings where the next-to-last symbol is '0'.
7. Given two finite automata (M₁ and M₂) recognizing L₁ and L₂, construct
o L₁ ∪ L₂ (Union).
FAs for:
o L₁ - L₂ (Difference).
CH-3 Context-free Grammar
WINTER 2024
What is ambiguous grammar? Check if the given grammar is ambiguous.
Construct a CFG for the set of strings that contain equal numbers of a’s
and b’s over Σ = {a, b}.
What is Chomsky Normal Form? Explain with an example.
Convert the given grammar into Greibach Normal Form (GNF).
Convert the given grammar into Chomsky Normal Form (CNF).
SUMMER-2024
Define Chomsky Normal Form of grammar.
Show how, if a pushdown automaton recognizes some language, then it is
not context-free.
Apply the rules and show step-by-step conversion of the given grammar to
CNF:
o S → ASA | aB
o A→B|S
o B→b|ϵ
k}.
Define Mealy Machine.
Design a Mealy Machine that gives output ‘x’ if the input sequence is
"abb", otherwise output 'z'.
Convert the given NFA-Λ to FA.
SUMMER-2023
Q3(a): Draw NFA-λ for (0)∗(00+11)∗(001)(01+10)(0)^* (00 + 11)^* (001)
(01 + 10)(0)∗(00+11)∗(001)(01+10) (03)
Q3(b): Explain Pumping Lemma for CFLs (04)
Q3(c): Convert given CFG to CNF (07)
Q3(a) OR: Compute λ-closure for states of given NFA-λ (03)
Q3(b) OR: Define Non-CFLs and give examples (04)
Q3(c) OR: Show Bottom-Up Parsing for “id + id * id” (07)
WINTER-2022
14.Define Type-2 Grammar with an example.
15.Define Chomsky Normal Form (CNF) and show the steps to convert
CFG into CNF.
16.Convert the following CFG to CNF:
o S→TU
o T → 0T1 | ε
o U → 1U0 | ε
17.Explain ambiguous and unambiguous CFG with examples.
18.Define Instantaneous Description (ID).
19.Construct Pushdown Automata (PDA) over Σ = {a, b} for L = {aⁿc
bⁿ | n ≥ 1}.
SUMMER-2022
8. Define:
o Context-Free Grammar (CFG)
o Context-Free Language (CFL)
9. Write CFG for the following languages:
o L = {aⁱbʲcᵏ | i = j or j = k}
o L = {aⁱbʲcᵏ | j > i + k}
10.Convert the following CFG into CNF:
o S → S(S) | ε
11.Define Regular Grammar and give an example.
12.Explain Types of Derivation and Ambiguity in CFGs.
13.Convert the following CFG into CNF:
o S → aX | Yb
o X→S|ε
o Y → bY | b
WINTER-2021
8. Difference between Moore and Mealy Machine.
9. Define Context-Free Grammar (CFG) and construct CFG for the
language:
L = {aⁱbʲcᵏ | j = i + k}
10.Convert NFA-Λ to FA for a given figure.
11.Define Ambiguous Grammar. Determine whether the grammar is
ambiguous:
S → ABA, A → aA | Λ, B → bB | Λ
12.Design a Mealy Machine that outputs 1 when the input sequence "abb"
appears; otherwise, it outputs 0.
13.Find the minimum-state FA for a given figure.
State and prove the pumping lemma for CFL. What is its main application?
Give an example.
Compare Deterministic PDA and Non-deterministic PDA.
Is it true that Non-deterministic PDA is more powerful than Deterministic
PDA? Justify your answer.
SUMMER-2024
Define DPDA with a clear definition of δ (transition function).
Discuss the intersection of CFLs with an example.
Apply the rules and step-by-step create a Turing Machine to accept L =
{𝑎ⁿ𝑏ⁿ}.
The language of DPDA is called DCFL. Explain whether this statement is
true or false.
Discuss the complement of CFLs with an example.
SUMMER-2023
Q4(a): Define PDA & CFL acceptance (03)
Q4(b): Closure properties of CFLs (04)
Q4(c): Trace TM transitions for given strings & identify language (07)
Q4(a) OR: Compare NPDA with DPDA (03)
Q4(b) OR: Prove that DPDA can’t accept L by empty stack (04)
Q4(c) OR: Design TM for balanced parentheses (07)
WINTER-2022
20.Define the following operations for Pushdown Automata (PDA):
o PUSH
o POP
o SKIP
22.Prove that L = {ww | w ∈ {a, b}*} is not a CFL using the Pumping
21.Define the Pumping Lemma for Context-Free Languages (CFLs).
Lemma.
23.Enlist the closure properties of Context-Sensitive Languages.
24.Explain the intersection and complement of CFLs.
SUMMER-2022
14.What is a Pushdown Automaton (PDA)? Explain.
15.Explain the difference between Top-Down Parsing and Bottom-Up
Parsing.
16.Design and draw a Deterministic PDA accepting Balanced Strings of
Brackets.
17.Explain Deterministic Pushdown Automata (DPDA).
18.Explain the Conversion from PDA to CFG.
19.Design and draw a PDA that accepts strings with more 'a's than 'b's.
WINTER-2021
14.State the Pumping Lemma for Regular Languages.
15.Give an unambiguous grammar for a SIMPLE CALCULATOR supporting
+, -, *, /, (, ), and terminal id.
Draw the Parse Tree for (id + id) * id - id.
16.Write Kleene’s Theorem (Part 1).
17.Construct a CFG for the regular expression:
(011 + 1) (01)*
18.Using Kleene's Theorem, draw an NFA-Λ for:
((0+1)10 + (00))*
19.Convert the following CFG to Chomsky Normal Form (CNF):
o S → AaA | CA | BaB
o A → aaBa | DC
o B → bb | aS
o C → Ca | bC | D
o D → bD | Λ
CH-5 Turing Machine
WINTER 2024
What is a Turing machine?
Design a Turing machine with no more than three states that accepts the
language a(a+b)*. Assume Σ = {a, b}.
SUMMER-2024
Apply the rules and construct a Turing Machine to accept even
palindromes over Σ = {a, b}*.
Discuss multi-tape Turing machines.
SUMMER-2023
Turing Machine, Computability, and Undecidability
Q5(a): Define decidable vs undecidable languages (03)
Q5(b): Draw TM transition table for L={0n1n∣n≥1}L = \{0^n1^n | n \geq
1\}L={0n1n∣n≥1} (04)
Q5(c): Define Bounded Minimalization & show its primitive recursive
property (07)
Q5(a) OR: Define Recursive & Recursively Enumerable Languages (03)
Q5(b) OR: Show TM for L=L(0∗1)L = L(0^*1)L=L(0∗1) accepting string
without moving left (04)
Q5(c) OR: Define μ\muμ-Recursive functions & prove all computable
functions are μ\muμ-recursive (07)
WINTER-2022
25.Write the 7-tuple definition of a Turing Machine.
26.Enlist and explain the operations performed by tape in a Turing
Machine.
27.Discuss the Universal Turing Machine (UTM) with an example.
28.Construct a Turing Machine for L = {aⁿbⁿ | n ≥ 1}, showing its
transition table.
29.Explain the model of computation using a Turing Machine.
30.Explain the Church-Turing Thesis.
31.Discuss different variations of Turing Machines.
SUMMER-2022
20.What is a Turing Machine? Explain its capabilities.
21.Explain the Church-Turing Thesis.
22.Design a Turing Machine to copy a string.
23.Explain Primitive Recursive Functions.
24.Explain the Universal Turing Machine (UTM).
25.Design a Turing Machine to delete a symbol.
WINTER-2021
20.Define Pushdown Automaton (PDA).
SUMMER-2023
WINTER-2022
Prove that every recursive function is computable.
Explain in detail the following function classes:
Partial
Total
Constant
Explain Primitive Recursive Functions.
Discuss μ-Recursive Functions and the concept of Minimalization.
CH-7 Undecidability
SUMMER-2024
Explain the concept of undecidable problems.
A language is decidable if and only if some nondeterministic Turing
machine decides it. Explain the statement.
Regular languages and CFLs are both decidable and Turing-recognizable.
Explain whether this is true or false.
SUMMER-2023
WINTER-2022
37.Discuss Post’s Correspondence Problem (PCP) with an example.
38.Explain the concept of a language that cannot be accepted and a
problem that cannot be decided.
39.Explain Non-Recursive Enumerable (RE) Languages and their
Undecidable Problems.
40.Discuss Undecidable Problems about Turing Machines (TM).
41.Explain Undecidable Problems involving Context-Free Languages
(CFLs).
42.Explain in detail Class P and Class NP.