2024 question paper

FORMAL LANGUAGE & AUTOMATA THEORY

26 questions

  1. Q1a. If an infinite language is passed to Machine M, the subsidiary which gives a finite solution to the infinite input tape is: (i) Compiler (ii) Interpreter (iii) Loader and Linkers (iv) None of the mentioned20242m

    Module 4: Turing Machines (TM)

    If an infinite language is passed to Machine MM, the subsidiary which gives a finite solution to the infinite input tape is:

    (i) Compiler
    (ii) Interpreter
    (iii) Loader and Linkers
    (iv) None of the mentioned

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (iv) None of the mentioned

    Explanation

    An infinite language requires a machine with unbounded memory. In the Turing Machine model M=(Q,Σ,Γ,δ,q0,B,F)M = (Q, \Sigma, \Gamma, \delta, q_0, B, F) the tape is infinite, but the finite control itself is finite.

    • Compiler: Translates a high-level program to target code before execution. It does not provide run-time handling of an infinite input tape; it assumes input is finite source text.
    • Interpreter: Executes source line-by-line, still requires entire input to be presented finitely; it does not make an infinite tape finite.
    • Loader and Linkers: Perform loading / relocation of object code into memory. They handle finite modules, not an infinite language / infinite tape.

    The subsidiary that actually gives a finite description of an infinite computation is the finite control (finite automaton) + the Turing Machine’s transition function or, in language theory, the finite representation (regular expression / grammar / TM description) itself. None of the three listed system softwares fulfills this role.

    The theoretical concept is:

    • Infinite language L⊆Σ∗L \subseteq \Sigma^* is described finitely by a grammar / regular expression / TM encoding ⟨M⟩\langle M \rangle, not by compiler/interpreter/loader.

    Hence none of (i)-(iii) is correct.

    Final Answer

    None of the mentioned. The finite solution is provided by the finite control / finite encoding ⟨M⟩\langle M\rangle of the machine, not by compiler / interpreter / loader.

  2. Q1b. Which of the following is a regular language? (i) Strings whose length is a sequence of prime numbers (ii) Palindrome strings (iii) Strings containing substring ww^r (iv) Strings with even number of 0’s20242m

    Module 1: Introduction & Regular Languages

    Which of the following is a regular language?

    (i) Strings whose length is a sequence of prime numbers
    (ii) Palindrome strings
    (iii) Strings containing substring wwrww^r
    (iv) Strings with even number of 00’s

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (iv) Strings with even number of 00’s

    Explanation

    (iv) Even number of 00’s — Regular

    Language L4={w∈{0,1}∗∣#0(w) is even}L_4 = \{ w \in \{0,1\}^* \mid \#_0(w) \text{ is even} \} is regular. DFA with 2 states suffices:

    • q0q_0: even count (start, accepting)
    • q1q_1: odd count
      δ(q0,0)=q1,  δ(q1,0)=q0,  δ(q,1)=q\delta(q_0,0)=q_1,\;\delta(q_1,0)=q_0,\;\delta(q,1)=q.

    Regular expression: (1∗0 1∗0)∗1∗(1^*0\,1^*0)^*1^* or (1∗01∗01∗)∗(1^*01^*01^*)^*.

    By Myhill-Nerode, only 2 equivalence classes.

    (i) Length is prime — Not regular

    L1={w∣∣w∣∈PRIMES}L_1 = \{ w \mid |w| \in \text{PRIMES} \}. Use Pumping Lemma. Let pp be pumping length, choose w=0pw = 0^p where pp prime, pump gives length p+k∣y∣p + k|y| which will be composite for suitable kk (e.g., k=pk=p). So not regular. Primes set not ultimately periodic.

    (ii) Palindromes — Not regular

    L2={wwr∣w∈Σ∗}?L_2 = \{ ww^r \mid w\in\Sigma^*\}^{? } Classic non-regular. Requires unbounded stack to compare second half with first reversed. Pumping lemma: w=0p1 0pw = 0^p1\,0^p in palindrome form fails. Needs PDA, is CFL but not regular.

    (iii) Contains wwrww^r as substring — also Not regular

    L3={x wwr y∣… }L_3 = \{ x \, ww^r \, y \mid \dots\} Need to remember arbitrarily long ww to check wrw^r follows. This is not regular (can be shown via Myhill-Nerode with infinitely many distinct suffixes). It is context-sensitive.

    Final Answer

    Only (iv) is regular.

  3. Q1c. NFA has 'non-deterministic' in its name because: (i) The result is undetermined (ii) The choice of path is nondeterministic (iii) The next state is nondeterministic (iv) All of the mentioned20242m

    Module 1: Introduction & Regular Languages

    NFA has 'non-deterministic' in its name because:

    (i) The result is undetermined
    (ii) The choice of path is nondeterministic
    (iii) The next state is nondeterministic
    (iv) All of the mentioned

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (ii) The choice of path is nondeterministic (and equivalently (iii); if “All of the mentioned” is offered, (iv) is also defensible)

    Explanation

    Deterministic FA: δ:Q×Σ→Q\delta: Q \times \Sigma \rightarrow Q — exactly one next state for each (q,a)(q,a).

    Nondeterministic FA: δ:Q×Σ→2Q\delta: Q \times \Sigma \rightarrow 2^{Q} — a set of possible next states. The machine may:

    • be in several states simultaneously (subset view), or
    • guess a path.

    So “non-deterministic” means:

    • Next state is not uniquely determined → (iii)
    • Choice of computation path is nondeterministic → (ii)

    The “result” (accept/reject) is determined (exists some accepting path ⇔ accept), so (i) “result undetermined” is misleading.

    In many textbooks the canonical answer is (ii) Choice of path is nondeterministic (or (iii)). If option (iv) “All of the mentioned” lumps (ii)+(iii), some keys mark (iv) as correct.

    Formal

    N=(Q,Σ,δ,q0,F)N = (Q,\Sigma,\delta,q_0,F), δ(q,a)={p1,p2,… }\delta(q,a) = \{p_1,p_2,\dots\}. On input ww, NN accepts iff there exists a path q0→wf∈Fq_0 \xrightarrow{w} f\in F.

    Final Answer

    NFA is nondeterministic because the next state / path is not uniquely determined → Option (ii) (and (iii)).

  4. Q1d. Which of the following is NOT a component of a finite automaton? (i) States (ii) Input alphabet (iii) Transition function (iv) Output tape20242m

    Module 1: Introduction & Regular Languages

    Which of the following is NOT a component of a finite automaton?

    (i) States
    (ii) Input alphabet
    (iii) Transition function
    (iv) Output tape

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (iv) Output tape (is NOT a component)

    Explanation

    Finite Automaton (DFA/NFA) formal definition: M=(Q,Σ,δ,q0,F)M = (Q, \Sigma, \delta, q_0, F)

    Components:

    1. QQ: Finite set of states
    2. Σ\Sigma: Input alphabet
    3. δ\delta: Transition function Q×Σ→QQ\times\Sigma \rightarrow Q (or 2Q2^Q for NFA)
    4. q0∈Qq_0 \in Q: Start state
    5. F⊆QF \subseteq Q: Set of accepting states

    Output tape belongs to Turing Machine or Transducer (Mealy/Moore), not to basic finite automaton. FA has no output tape; it only accepts/rejects.

    Note: ϵ\epsilon and stack are for PDA, tape for TM.

    Final Answer

    Output tape is not a component of FA → Option (iv).

  5. Q1e. A DFA can have: (i) Multiple start states (ii) Multiple accepting states (iii) Transitions on \varepsilon (iv) None of the above20242m

    Module 1: Introduction & Regular Languages

    A DFA can have:

    (i) Multiple start states
    (ii) Multiple accepting states
    (iii) Transitions on ε\varepsilon
    (iv) None of the above

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (ii) Multiple accepting states

    Explanation

    DFA definition: M=(Q,Σ,δ,q0,F)M = (Q,\Sigma,\delta,q_0,F)

    • q0q_0: Exactly one start state → (i) multiple start states false. (NFA can have multiple, DFA has one).
    • F⊆QF \subseteq Q: Set of final/accepting states. Can be 0, 1, or multiple → (ii) true. Example even number of 0's DFA has 1 accept, but language (a+b)∗ab(a+b)^*ab needs 1, language “ends with 00 or 11” needs 2.
    • Transitions: δ:Q×Σ→Q\delta: Q \times \Sigma \rightarrow Q is total deterministic, no ϵ\epsilon-moves. ϵ\epsilon-transitions allowed only in ϵ\epsilon-NFA → (iii) false.

    Final Answer

    DFA can have multiple accepting states → Option (ii).

  6. Q1f. Which of the following is a type of grammar in the Chomsky hierarchy? (i) Regular (ii) Context-Free (iii) Context-Sensitive (iv) All of the above20242m

    Module 1: Introduction & Regular Languages

    Which of the following is a type of grammar in the Chomsky hierarchy?

    (i) Regular
    (ii) Context-Free
    (iii) Context-Sensitive
    (iv) All of the above

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (iv) All of the above

    Explanation

    Chomsky Hierarchy classifies grammars into 4 types:

    Type Name Production Form Language Class
    Type-0 Unrestricted α→β\alpha \rightarrow \beta, no restriction Recursively Enumerable (TM)
    Type-1 Context-Sensitive ∣α∣≤∣β∣|\alpha| \le |\beta|, α→β\alpha \rightarrow \beta with context CSL (LBA)
    Type-2 Context-Free A→γA \rightarrow \gamma, A∈VA\in V CFL (PDA)
    Type-3 Regular A→aB∣aA \rightarrow aB \mid a, A→aA\rightarrow a Regular (FA)
    • (i) Regular → Type-3 ✓
    • (ii) Context-Free → Type-2 ✓
    • (iii) Context-Sensitive → Type-1 ✓

    All three are in Chomsky hierarchy (Type-0 is the super-set).

    Final Answer

    All are types → Option (iv) All of the above.

  7. Q1g. A Turing Machine has: (i) A finite tape (ii) An infinite tape (iii) A stack (iv) A queue20242m

    Module 4: Turing Machines (TM)

    A Turing Machine has:

    (i) A finite tape
    (ii) An infinite tape
    (iii) A stack
    (iv) A queue

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (ii) An infinite tape

    Explanation

    Turing Machine model: M=(Q,Σ,Γ,δ,q0,B,F)M = (Q,\Sigma,\Gamma,\delta,q_0,B,F) with

    • Finite control (states QQ),
    • One infinite tape divided into cells, each holds symbol from Γ\Gamma (Σ⊂Γ\Sigma \subset \Gamma), extends infinitely in one direction (or both in some definitions), with a read/write head.
    • Initially tape contains input ww + blanks BB to the right (infinite blanks).

    It does not have a stack (that's PDA) or queue as primary memory, nor finite tape (that would be LBA / finite automaton).

    Final Answer

    TM has an infinite tape → Option (ii).

  8. Q1h. Which of the following problems is undecidable? (i) DFA acceptance (ii) NFA acceptance (iii) The Halting Problem (iv) Regular expression matching20242m

    Module 5: Undecidability

    Which of the following problems is undecidable?

    (i) DFA acceptance
    (ii) NFA acceptance
    (iii) The Halting Problem
    (iv) Regular expression matching

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (iii) The Halting Problem

    Explanation

    Decidability:

    Problem Decidable?
    DFA acceptance w∈L(DFA)w \in L(DFA)? Decidable — simulate DFA O(∣w∣)O(|w|)
    NFA acceptance Decidable — subset simulation or convert to DFA
    Regex matching w∈L(R)w \in L(R)? Decidable — convert to DFA/NFA
    Emptiness L(DFA)=∅L(DFA)=\emptyset? Decidable
    Halting Problem MM halts on ww? Undecidable (Turing 1936)

    Proof sketch: Assume H(⟨M,w⟩)H(\langle M,w\rangle) decides halting, diagonalize with D(⟨M⟩)=D(\langle M\rangle)= loop if MM halts on ⟨M⟩\langle M\rangle else halt. D(⟨D⟩)D(\langle D\rangle) contradicts.

    Final Answer

    Undecidable is Halting Problem → Option (iii).

  9. Q1i. Which of these represents a regular language? (i) \{ a^n b^n \mid n \ge 0 \} (ii) Strings with equal number of a’s and b’s (iii) \{ a^n \mid n \text{ is prime} \} (iv) \{ w \mid w \text{ starts with 'a' and ends with 'b'} \}20242m

    Module 1: Introduction & Regular Languages

    Which of these represents a regular language?

    (i) {anbn∣n≥0}\{ a^n b^n \mid n \ge 0 \}
    (ii) Strings with equal number of aa’s and bb’s
    (iii) {an∣n is prime}\{ a^n \mid n \text{ is prime} \}
    (iv) {w∣w starts with ’a’ and ends with ’b’}\{ w \mid w \text{ starts with 'a' and ends with 'b'} \}

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (iv) {w∣w starts with ’a’ and ends with ’b’}\{ w \mid w \text{ starts with 'a' and ends with 'b'} \}

    Explanation

    Test each:

    • (i) {anbn}\{a^n b^n\} → Not regular (needs stack, CFL).
    • (ii) Equal number of aa's and bb's → {w∣#a=#b}\{ w \mid \#_a = \#_b \} not regular (needs counting). Pumping fails.
    • (iii) {an∣n prime}\{a^n \mid n \text{ prime}\} → Not regular (non-periodic), also not CFL.
    • (iv) Starts with a and ends with b → Regular.

    DFA for (iv): 3 states

    • q0q_0 start (no symbol yet, non-accepting)
    • q1q_1 = last symbol a? Actually needs start a, so q0→aq1q_0 \xrightarrow{a} q_1, q0→bqdeadq_0 \xrightarrow{b} q_{dead}.
    • q1q_1 = seen start a, last is a (non-accepting)
    • q2q_2 = seen start a, last is b (accepting)
      Transitions: q1→aq1q_1 \xrightarrow{a} q_1, q1→bq2q_1 \xrightarrow{b} q_2, q2→aq1q_2 \xrightarrow{a} q_1, q2→bq2q_2 \xrightarrow{b} q_2.

    Regular expression: a(a+b)∗ba(a+b)^*b (plus handle length 1? Actually abab inclusive). More precisely aΣ∗ba\Sigma^*b.

    Hence regular.

    Final Answer

    Only (iv) is regular.

  10. Q1j. Which of the following is a PDA? (i) Finite automaton with a stack (ii) Turing machine with a stack (iii) Finite automaton with a queue (iv) Turing machine with a queue20242m

    Module 2: Context-Free Languages (CFL) and PDA

    Which of the following is a PDA?

    (i) Finite automaton with a stack
    (ii) Turing machine with a stack
    (iii) Finite automaton with a queue
    (iv) Turing machine with a queue

    View this question on its own page →
    Worked Solution

    Answer

    Correct Option: (i) Finite automaton with a stack

    Explanation

    PDA definition: P=(Q,Σ,Γ,δ,q0,Z0,F)P = (Q,\Sigma,\Gamma,\delta,q_0,Z_0,F)

    • Essentially a finite automaton (finite control) augmented with a stack (LIFO memory).
    • Stack provides unbounded memory but restricted access (push/pop at top only).
    • Enables recognition of CFLs: e.g., {anbn}\{a^n b^n\} by pushing aa's, popping for bb's.

    Options:

    • (ii) TM with stack → equivalent to TM (stack is not needed)
    • (iii) FA with queue → queue automaton = TM-powerful
    • PDA = FA + stack.

    Final Answer

    PDA = FA + stack → Option (i).

  11. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  12. Q2a. What is Automata? Explain classification of Automata.20247m

    Module 1: Introduction & Regular Languages

    What is Automata? Explain classification of Automata.

    View this question on its own page →
    Worked Solution

    Answer

    1. What is Automata?

    Automata (plural of Automaton) is an abstract mathematical model of computation. It is a finite representation of an infinite computation that reads input symbols, changes states according to transition rules, and decides acceptance. It is the theoretical foundation for compiler design, lexical analysis, and computability.

    Formally, automaton = (Input + Finite Control + Memory + Output/Acceptance).

    No physical infinite hardware is needed; the model studies what can be computed with given memory.

    2. Classification of Automata

    Classification follows memory power and matches Chomsky hierarchy:

    MermaidDiagram
    Rendering diagram…

    A. Finite Automata (FA) — Type-3, Regular

    • Memory: Only finite control (QQ), no auxiliary memory.
    • Types: DFA (δ:Q×Σ→Q \delta: Q\times\Sigma\rightarrow Q), NFA, ϵ\epsilon-NFA (all equivalent).
    • Power: Regular languages. Example: L={w∣#0(w) even}L = \{ w \mid \#_0(w) \text{ even}\}, (a+b)∗ab(a+b)^*ab.
    • Use: Lexical analyzer, pattern matching.

    B. Pushdown Automata (PDA) — Type-2, Context-Free

    • Memory: Stack (LIFO). P=(Q,Σ,Γ,δ,q0,Z0,F)P = (Q,\Sigma,\Gamma,\delta,q_0,Z_0,F).
    • Types: DPDA vs NPDA (different power).
    • Power: CFLs. Example: L={anbn∣n≥0}L = \{a^n b^n \mid n\ge0\}, balanced parentheses, arithmetic expressions.
    • Use: Syntax analysis (parsing).

    C. Linear Bounded Automaton (LBA) — Type-1, Context-Sensitive

    • Memory: Tape bounded by input length ∣w∣|w| (plus two endmarkers). Can read/write but not beyond bounds.
    • Power: CSLs. Example: L={anbncn}L = \{a^n b^n c^n\}, {an2}\{a^{n^2}\}.
    • Use: Rare in practice, studies context-sensitive features.

    D. Turing Machine (TM) — Type-0, RE

    • Memory: Infinite tape, read/write head, finite control.
    • Types: Deterministic, Nondeterministic, Multi-tape, Universal (all equivalent in power).
    • Power: Recursively Enumerable (Type-0) and Recursive (Decidable) with always-halting variant.
    • Example: L={ww∣w∈{a,b}∗}L = \{ ww \mid w\in\{a,b\}^*\}, Halting, any computable function.
    • Use: Model of general-purpose computer.

    Summary Table

    Automaton Memory Grammar Type Language Decidability
    FA (DFA/NFA) QQ Type-3 Regular Regular Decidable (all properties)
    PDA QQ + Stack Type-2 CFG CFL Emptiness decidable, equivalence undecidable
    LBA QQ + tape ∣w∣|w| Type-1 CSG CSL Membership decidable (PSPACEPSPACE)
    TM QQ + ∞\infty tape Type-0 unrestricted RE Halting undecidable

    Hierarchy: FA⊂PDA⊂LBA⊂TM\text{FA} \subset \text{PDA} \subset \text{LBA} \subset \text{TM} and Regular⊂CFL⊂CSL⊂RE\text{Regular} \subset \text{CFL} \subset \text{CSL} \subset \text{RE}.

    Final Answer

    Automata are abstract computing models; classification by memory gives FA → PDA → LBA → TM corresponding to Chomsky Types 3→2→1→0.

  13. Q2b. Tabulate the Chomsky hierarchy of grammars with an example of each.20247m

    Module 1: Introduction & Regular Languages

    Tabulate the Chomsky hierarchy of grammars with an example of each.

    View this question on its own page →
  14. Q3a. Construct DFA for all strings over \{0,1\} interpreted as binary numbers divisible by 4.20247m

    Module 1: Introduction & Regular Languages

    Construct DFA for all strings over {0,1}\{0,1\} interpreted as binary numbers divisible by 44.

    View this question on its own page →
    Worked Solution

    Answer

    Language: L={w∈{0,1}∗∣value2(w)≡0(mod4)}L = \{ w \in \{0,1\}^* \mid \text{value}_2(w) \equiv 0 \pmod 4 \}

    Interpret string as binary number (most significant bit first), check divisibility by 4.


    Key Observation

    A binary number is divisible by 4 iff its last two bits are 00 (or the string is just "0" or empty, treated as 0).

    • Binary x≡0(mod4)  ⟺  xx \equiv 0 \pmod 4 \iff x ends in 00.
    • Special case: empty string ϵ\epsilon and "0" represent 0, divisible by 4.

    DFA Construction (4 states)

    Track value modulo 4. States = residues {0,1,2,3}\{0,1,2,3\}.

    DFA: M=(Q,Σ,δ,q0,F)M = (Q, \Sigma, \delta, q_0, F)

    • Q={q0,q1,q2,q3}Q = \{q_0, q_1, q_2, q_3\} where qrq_r = value ≡r(mod4)\equiv r \pmod 4
    • Σ={0,1}\Sigma = \{0,1\}
    • q0q_0 = start (value 0)
    • F={q0}F = \{q_0\} (residue 0)

    Transition: On input bit b∈{0,1}b \in \{0,1\}:

    δ(qr,b)=q(2r+b) mod 4\delta(q_r, b) = q_{(2r + b) \bmod 4}

    Transition Table:

    State \ Input 0 1
    q0q_0 (0) q0q_0 q1q_1
    q1q_1 (1) q2q_2 q3q_3
    q2q_2 (2) q0q_0 q1q_1
    q3q_3 (3) q2q_2 q3q_3

    Derivation:

    • 2×0+0=0→q02 \times 0 + 0 = 0 \to q_0
    • 2×0+1=1→q12 \times 0 + 1 = 1 \to q_1
    • 2×1+0=2→q22 \times 1 + 0 = 2 \to q_2
    • 2×1+1=3→q32 \times 1 + 1 = 3 \to q_3
    • 2×2+0=4≡0→q02 \times 2 + 0 = 4 \equiv 0 \to q_0
    • 2×2+1=5≡1→q12 \times 2 + 1 = 5 \equiv 1 \to q_1
    • 2×3+0=6≡2→q22 \times 3 + 0 = 6 \equiv 2 \to q_2
    • 2×3+1=7≡3→q32 \times 3 + 1 = 7 \equiv 3 \to q_3

    State Diagram

    MermaidDiagram
    Rendering diagram…

    Simplified 3-State DFA (Using Last-Two-Bits Insight)

    Since divisibility by 4 depends only on last 2 bits = 00:

    DFA with 3 states:

    • q0q_0: start, also accept (0 or empty or ...00)
    • q1q_1: last bit = 1
    • q2q_2: last bit = 0, previous ≠ 0 (i.e., ends in 10)
    State \ Input 0 1
    q0q_0 (accept) q0q_0 q1q_1
    q1q_1 q2q_2 q1q_1
    q2q_2 q0q_0 q1q_1

    F={q0}F = \{q_0\}. q0q_0 = last two bits 00 (or empty/"0").

    Why 3 states minimal: Myhill-Nerode: ϵ,1,10\epsilon, 1, 10 are pairwise distinguishable mod 4.


    Test Cases

    Input Value Path Accept?
    ϵ\epsilon 0 q0q_0 Yes
    0 0 q0→0q0q_0 \xrightarrow{0} q_0 Yes
    100 4 q0→q1→0q2→0q0q_0 \to q_1 \xrightarrow{0} q_2 \xrightarrow{0} q_0 Yes
    1000 8 q0→q1→q2→q0→q0q_0 \to q_1 \to q_2 \to q_0 \to q_0 Yes
    10 2 q0→q1→0q2q_0 \to q_1 \xrightarrow{0} q_2 No ($q_2
    otin F$)
    101 5 q0→q1→0q2→1q1q_0 \to q_1 \xrightarrow{0} q_2 \xrightarrow{1} q_1 No
    1100 12 ends in q0q_0 Yes

    Regular Expression

    (0+1)∗00+0(0+1)^*00 + 0

    (All strings ending in 00 plus the single 0; ϵ\epsilon can be included as (0+1)*00 | 0 | \epsilon)


    Final Answer

    DFA with 4 states (mod 4 tracking) or minimal 3 states:

    • States: residues 0,1,2,3 (or 3-state: 00, ends-in-1, ends-in-10)
    • Transitions: δ(qr,b)=q(2r+b) mod 4\delta(q_r, b) = q_{(2r+b)\bmod 4}
    • Accept: q0q_0 only
    • Binary divisible by 4 ⇔ ends in 00 (or is 0/ε)
    DFA(3 states):
    q0 --0--> q0
    q0 --1--> q1
    q1 --0--> q2
    q1 --1--> q1
    q2 --0--> q0
    q2 --1--> q1
    Accept: q0
    
  15. Q3b. Construct DFA that accepts strings over \Sigma = \{a,b\} which start with aba.20247m

    Module 1: Introduction & Regular Languages

    Construct DFA that accepts strings over Σ={a,b}\Sigma = \{a,b\} which start with abaaba.

    View this question on its own page →
  16. Q4a. Prove that L = \{ a^i b^i \mid i \ge 0 \} is not regular using the pumping lemma.20247m

    Module 1: Introduction & Regular Languages

    Prove that L={aibi∣i≥0}L = \{ a^i b^i \mid i \ge 0 \} is not regular using the pumping lemma.

    View this question on its own page →
  17. Q4b. Convert the following NFA to DFA. ![NFA](https://res.cloudinary.com/djkpavwmp/image/upload/v1764448480/portfolio_assets/iu08cu9n2cx5gpr1qvv5.png)20247m

    Module 1: Introduction & Regular Languages

    Convert the following NFA to DFA.

    NFA

    View this question on its own page →
  18. Q5a. Design a Turing Machine that increments a binary number by 1.20247m

    Module 4: Turing Machines (TM)

    Design a Turing Machine that increments a binary number by 11.

    View this question on its own page →
  19. Q5b. Write the difference between Pushdown Automata and Finite Automata.20247m

    Module 2: Context-Free Languages (CFL) and PDA

    Write the difference between Pushdown Automata and Finite Automata.

    View this question on its own page →
  20. Q6a. Construct a PDA for the language: L = \{ 0^m 1^n 0^k \mid k \ge 1, m \ge 1, m > n + 2 \}20247m

    Module 2: Context-Free Languages (CFL) and PDA

    Construct a PDA for the language:

    L={0m1n0k∣k≥1,m≥1,m>n+2}L = \{ 0^m 1^n 0^k \mid k \ge 1, m \ge 1, m > n + 2 \}

    View this question on its own page →
  21. Q6b. Explain the various types of Turing Machines.20247m

    Module 4: Turing Machines (TM)

    Explain the various types of Turing Machines.

    View this question on its own page →
  22. Budget App•POCKETLY

    Pocketly on Android

    Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

    Install Pocketly
  23. Q7a. Construct a PDA for the grammar: S \to 0BB B \to 0S \mid 1S \mid 0 Test whether 0104 is accepted by this PDA.20247m

    Module 2: Context-Free Languages (CFL) and PDA

    Construct a PDA for the grammar:

    S→0BBS \to 0BB
    B→0S∣1S∣0B \to 0S \mid 1S \mid 0

    Test whether 01040104 is accepted by this PDA.

    View this question on its own page →
  24. Q7b. Check whether the grammar is ambiguous: S \to a \mid abSb \mid aAb A \to bS \mid aAAb20247m

    Module 2: Context-Free Languages (CFL) and PDA

    Check whether the grammar is ambiguous:

    S→a∣abSb∣aAbS \to a \mid abSb \mid aAb
    A→bS∣aAAbA \to bS \mid aAAb

    View this question on its own page →
  25. Q8a. Define NFA with \varepsilon-transitions with an example.20247m

    Module 1: Introduction & Regular Languages

    Define NFA with ε\varepsilon-transitions with an example.

    View this question on its own page →
  26. Q8b. Prove the pumping lemma for regular languages.20247m

    Module 1: Introduction & Regular Languages

    Prove the pumping lemma for regular languages.

    View this question on its own page →
  27. Q9a. Write short notes on: 1. Minimization of DFA 2. Type 2 grammar (Context-Free Grammar)20247m

    Module 1: Introduction & Regular Languages

    Write short notes on:

    1. Minimization of DFA
    2. Type 2 grammar (Context-Free Grammar)
    View this question on its own page →
  28. Q9b. Write short notes on: 1. Post Correspondence Problem (PCP) 2. NP-hard problem20247m

    Module 5: Undecidability

    Write short notes on:

    1. Post Correspondence Problem (PCP)
    2. NP-hard problem
    View this question on its own page →
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.