FORMAL LANGUAGE & AUTOMATA THEORY

100406
Back to FORMAL LANGUAGE & AUTOMATA THEORY

Module 1: Introduction & Regular Languages

  1. Q1a. The minimum number of states required to recognize an octal number divisible by 3 is: (i) 1 (ii) 3 (iii) 5 (iv) 720222m

    Module 1: Introduction & Regular Languages

    The minimum number of states required to recognize an octal number divisible by 3 is:

    (i) 1
    (ii) 3
    (iii) 5
    (iv) 7

    View this question on its own page →
  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 →
  3. Q1b. Regular languages belong to which type in the Chomsky hierarchy? (i) Type-0 (ii) Type-2 (iii) Type-1 (iv) Type-320252m

    Module 1: Introduction & Regular Languages

    Regular languages belong to which type in the Chomsky hierarchy?

    (i) Type-0
    (ii) Type-2
    (iii) Type-1
    (iv) Type-3

    View this question on its own page →
  4. Q1b. For a given Moore machine, given input = 101010, the output would be of length: (i) |Input| + 1 (ii) |Input| (iii) |Input| − 1 (iv) Cannot be predicted20222m

    Module 1: Introduction & Regular Languages

    For a given Moore machine, given input = 101010, the output would be of length:

    (i) |Input| + 1
    (ii) |Input|
    (iii) |Input| − 1
    (iv) Cannot be predicted

    View this question on its own page →
  5. Q1b. Let N be an NFA with n states and let M be the minimized DFA with m states recognizing the same language. Which of the following is necessarily true? (i) m \le 2^n (ii) n \le m (iii) M has one accept state (iv) m = 2^n20232m

    Module 1: Introduction & Regular Languages

    Let NN be an NFA with nn states and let MM be the minimized DFA with mm states recognizing the same language. Which of the following is necessarily true?

    (i) m2nm \le 2^n
    (ii) nmn \le m
    (iii) MM has one accept state
    (iv) m=2nm = 2^n

    View this question on its own page →
  6. Q1c. A minimum state deterministic FA accepting the language: L = \{ w \mid w \in \{0,1\}^* \} where the number of 0's and 1's in w are divisible by 3 and 5 respectively, has: (i) 15 states (ii) 11 states (iii) 10 states (iv) 9 states20232m

    Module 1: Introduction & Regular Languages

    A minimum state deterministic FA accepting the language:

    L={ww{0,1}}L = \{ w \mid w \in \{0,1\}^* \}

    where the number of 0's and 1's in ww are divisible by 3 and 5 respectively, has:

    (i) 15 states
    (ii) 11 states
    (iii) 10 states
    (iv) 9 states

    View this question on its own page →
  7. Q1c. Which of the following languages is NOT regular? (i) {a^n b^n | n \ge 0} (ii) {a, b}* (iii) Finite languages (iv) Languages accepted by DFA20252m

    Module 1: Introduction & Regular Languages

    Which of the following languages is NOT regular?

    (i) {anbnn0a^n b^n | n \ge 0}
    (ii) {a,ba, b}*
    (iii) Finite languages
    (iv) Languages accepted by DFA

    View this question on its own page →
  8. 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 →
  9. Q1c. The total number of states and transitions required to form a Moore machine that produces residue mod 3 are: (i) 3 and 6 (ii) 3 and 5 (iii) 2 and 4 (iv) 2 and 520222m

    Module 1: Introduction & Regular Languages

    The total number of states and transitions required to form a Moore machine that produces residue mod 3 are:

    (i) 3 and 6
    (ii) 3 and 5
    (iii) 2 and 4
    (iv) 2 and 5

    View this question on its own page →
  10. 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 →
  11. Q1d. Which of the following is a correct statement? (i) Moore machine has no accepting states. (ii) Mealy machine has accepting states. (iii) We can convert Mealy to Moore but not vice versa. (iv) All of the above20222m

    Module 1: Introduction & Regular Languages

    Which of the following is a correct statement?

    (i) Moore machine has no accepting states.
    (ii) Mealy machine has accepting states.
    (iii) We can convert Mealy to Moore but not vice versa.
    (iv) All of the above

    View this question on its own page →
  12. Q1d. The maximum number of states of a DFA converted from an NFA with n states is: (i) n (ii) n^2 (iii) 2^n (iv) None of the above20212m

    Module 1: Introduction & Regular Languages

    The maximum number of states of a DFA converted from an NFA with nn states is:

    (i) nn
    (ii) n2n^2
    (iii) 2n2^n
    (iv) None of the above

    View this question on its own page →
  13. 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 →
  14. Q1e. The string 1101 does not belong to the set represented by: (i) 1^* 0^* (0+1) (ii) 1(0+1)^*101 (iii) (1(0)^*(0+1)^*(0+1))^* (iv) \{00 + (11)^*0\}^*20232m

    Module 1: Introduction & Regular Languages

    The string 11011101 does not belong to the set represented by:

    (i) 10(0+1)1^* 0^* (0+1)
    (ii) 1(0+1)1011(0+1)^*101
    (iii) (1(0)(0+1)(0+1))(1(0)^*(0+1)^*(0+1))^*
    (iv) {00+(11)0}\{00 + (11)^*0\}^*

    View this question on its own page →
  15. Q1e. The minimum number of transitions to reach the final state as per the regular expression: \{a, b\}^* baaa is: (i) 4 (ii) 5 (iii) 6 (iv) 320222m

    Module 1: Introduction & Regular Languages

    The minimum number of transitions to reach the final state as per the regular expression:

    {a,b}baaa \{a, b\}^* baaa

    is:

    (i) 4
    (ii) 5
    (iii) 6
    (iv) 3

    View this question on its own page →
  16. 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 →
  17. Q1f. Let w = xyz, y is the middle portion and |y| > 0. Repeating y zero or more times before checking membership in L is known as: (i) Generating (ii) Pumping (iii) Producing (iv) None of the above20222m

    Module 1: Introduction & Regular Languages

    Let w=xyzw = xyz, yy is the middle portion and y>0|y| > 0. Repeating yy zero or more times before checking membership in LL is known as:

    (i) Generating
    (ii) Pumping
    (iii) Producing
    (iv) None of the above

    View this question on its own page →
  18. Q1g. For an NFA with n states, the minimized DFA has: (i) m \le 2^n (ii) n \le m (iii) one accept state (iv) m = 2^n20212m

    Module 1: Introduction & Regular Languages

    For an NFA with nn states, the minimized DFA has:

    (i) m2nm \le 2^n
    (ii) nmn \le m
    (iii) one accept state
    (iv) m=2nm = 2^n

    View this question on its own page →
  19. Q1g. If \Sigma = \{a, b\}, then \Sigma^* contains (i) Only finite strings (ii) Only infinite strings (iii) All finite strings over \Sigma including \epsilon (iv) Only strings of equal length20252m

    Module 1: Introduction & Regular Languages

    If Σ={a,b}\Sigma = \{a, b\}, then Σ\Sigma^* contains

    (i) Only finite strings
    (ii) Only infinite strings
    (iii) All finite strings over Σ\Sigma including ϵ\epsilon
    (iv) Only strings of equal length

    View this question on its own page →
  20. Q1h. The \epsilon-closure of a state is (i) The set of states reachable using \epsilon only (ii) The set of unreachable states (iii) The set of final states (iv) The dead states20252m

    Module 1: Introduction & Regular Languages

    The ϵ\epsilon-closure of a state is

    (i) The set of states reachable using ϵ\epsilon only
    (ii) The set of unreachable states
    (iii) The set of final states
    (iv) The dead states

    View this question on its own page →
  21. 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) {anbnn0}\{ a^n b^n \mid n \ge 0 \}
    (ii) Strings with equal number of aa’s and bb’s
    (iii) {ann is prime}\{ a^n \mid n \text{ is prime} \}
    (iv) {ww 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 →
  22. Q1i. A minimum state DFA for the language: L = \{ w \in \{0,1\}^* : \#0(w) \equiv 0 \mod 3,\; \#1(w) \equiv 0 \mod 5 \} has: (i) 15 states (ii) 11 states (iii) 10 states (iv) 9 states20212m

    Module 1: Introduction & Regular Languages

    A minimum state DFA for the language:

    L={w{0,1}:#0(w)0mod3,  #1(w)0mod5} L = \{ w \in \{0,1\}^* : \#0(w) \equiv 0 \mod 3,\; \#1(w) \equiv 0 \mod 5 \}

    has:

    (i) 15 states
    (ii) 11 states
    (iii) 10 states
    (iv) 9 states

    View this question on its own page →
  23. Q1j. If P and Q are regular expressions (P is not null), then R = Q + RP has the unique solution: (i) R = QP (ii) R = PQ^* (iii) R = QP^* (iv) R = QP^*20232m

    Module 1: Introduction & Regular Languages

    If PP and QQ are regular expressions (PP is not null), then R=Q+RPR = Q + RP has the unique solution:

    (i) R=QPR = QP
    (ii) R=PQR = PQ^*
    (iii) R=QPR = QP^*
    (iv) R=QPR = QP^*

    View this question on its own page →
  24. Q1j. The construction time for DFA from NFA with m nodes is: (i) O(m^2) (ii) O(2^m) (iii) O(m) (iv) O(\log m)20212m

    Module 1: Introduction & Regular Languages

    The construction time for DFA from NFA with mm nodes is:

    (i) O(m2)O(m^2)
    (ii) O(2m)O(2^m)
    (iii) O(m)O(m)
    (iv) O(logm)O(\log m)

    View this question on its own page →
  25. 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 →
  26. Q2a. Discuss the Chomsky hierarchy of grammars with suitable examples.20237m

    Module 1: Introduction & Regular Languages

    Discuss the Chomsky hierarchy of grammars with suitable examples.

    View this question on its own page →
  27. Q2a. Design a DFA for strings over \{a, b\} containing at least three occurrences of bbb (overlapping allowed). Example: bbbbbb is accepted.20227m

    Module 1: Introduction & Regular Languages

    Design a DFA for strings over {a,b}\{a, b\} containing at least three occurrences of bbb (overlapping allowed). Example: bbbbbb is accepted.

    View this question on its own page →
  28. Q2a. Tabulate the Chomsky hierarchy of grammars with an example for each.20217m

    Module 1: Introduction & Regular Languages

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

    View this question on its own page →
  29. Q2b. Explain the Chomsky hierarchy of languages with examples.20257m

    Module 1: Introduction & Regular Languages

    Explain the Chomsky hierarchy of languages with examples.

    View this question on its own page →
  30. 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 →
  31. Q2b. Let L \subseteq \{0,1,2\}^* be strings without consecutive identical symbols (no 00, no 11, no 22). Design a DFA for L.20227m

    Module 1: Introduction & Regular Languages

    Let L{0,1,2}L \subseteq \{0,1,2\}^* be strings without consecutive identical symbols (no 0000, no 1111, no 2222). Design a DFA for LL.

    View this question on its own page →
  32. Q2b. Design a finite-state machine (FSM) for a parity checker.20217m

    Module 1: Introduction & Regular Languages

    Design a finite-state machine (FSM) for a parity checker.

    View this question on its own page →
  33. 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 →
  34. Q3a. Construct an NFA accepting strings over \{0,1,2\} beginning with 0, followed by an odd number of 1s, ending with any number of 2s.20217m

    Module 1: Introduction & Regular Languages

    Construct an NFA accepting strings over {0,1,2}\{0,1,2\} beginning with 0, followed by an odd number of 1s, ending with any number of 2s.

    View this question on its own page →
  35. 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 →
  36. Q3b. Given the regular expression: (0+1)^*01(0+1) Describe the language generated, and construct an equivalent DFA.20257m

    Module 1: Introduction & Regular Languages

    Given the regular expression:
    (0+1)01(0+1)(0+1)^*01(0+1)

    Describe the language generated, and construct an equivalent DFA.

    View this question on its own page →
  37. 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={aibii0}L = \{ a^i b^i \mid i \ge 0 \} is not regular using the pumping lemma.

    View this question on its own page →
  38. Q4a. Design Mealy and Moore machines to detect the sequence 1010 (overlapping allowed). Then convert the Moore machine into a Mealy machine and prove equivalence.20227m

    Module 1: Introduction & Regular Languages

    Design Mealy and Moore machines to detect the sequence 1010 (overlapping allowed). Then convert the Moore machine into a Mealy machine and prove equivalence.

    View this question on its own page →
  39. Q4a. Given a DFA D over the alphabet {a, b}, perform DFA minimization and draw the equivalent minimal DFA accepting the same language. ![image](https://res.cloudinary.com/djkpavwmp/image/upload/v1766402014/portfolio_assets/ixqepvuicnt6ji19qb3o.png)20257m

    Module 1: Introduction & Regular Languages

    Given a DFA D over the alphabet {a, b}, perform DFA minimization and draw the equivalent minimal DFA accepting the same language. image

    View this question on its own page →
  40. 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 →
  41. Q4b. Obtain the regular expression for the given DFA. ![image](https://res.cloudinary.com/djkpavwmp/image/upload/v1766231140/portfolio_assets/fbcklkz4il80phefuvuo.png)20237m

    Module 1: Introduction & Regular Languages

    Obtain the regular expression for the given DFA.

    image

    View this question on its own page →
  42. Q4b. Design a DFA for the regular expression: 1^*(10)^*20217m

    Module 1: Introduction & Regular Languages

    Design a DFA for the regular expression:

    1(10) 1^*(10)^*

    View this question on its own page →
  43. Q4b. Use the pumping lemma to prove that the language L = \{a^n b^n : n \ge 1\} is not regular.20257m

    Module 1: Introduction & Regular Languages

    Use the pumping lemma to prove that the language L={anbn:n1}L = \{a^n b^n : n \ge 1\} is not regular.

    View this question on its own page →
  44. Q5a. Prove that if L_1 and L_2 are regular, then L_1 \cup L_2 is regular.20237m

    Module 1: Introduction & Regular Languages

    Prove that if L1L_1 and L2L_2 are regular, then L1L2L_1 \cup L_2 is regular.

    View this question on its own page →
  45. Q5a. Give examples of L_1 and L_2 such that: (i) L_1 is regular, L_2 is not regular, and L_1 - L_2 is regular. (ii) L_1 and L_2 are not regular but L_1 \cup L_2 is regular.20227m

    Module 1: Introduction & Regular Languages

    Give examples of L1L_1 and L2L_2 such that:

    (i) L1L_1 is regular, L2L_2 is not regular, and L1L2L_1 - L_2 is regular.
    (ii) L1L_1 and L2L_2 are not regular but L1L2L_1 \cup L_2 is regular.

    View this question on its own page →
  46. Q5b. Show that the language of palindromes over \{a, b\} is not regular.20227m

    Module 1: Introduction & Regular Languages

    Show that the language of palindromes over {a,b}\{a, b\} is not regular.

    View this question on its own page →
  47. Q5b. Construct an NFA that accepts all strings over the alphabet {0, 1, 2} that begin with one or more 0s, followed by an odd number of 1s, and end with any number of 2s.20257m

    Module 1: Introduction & Regular Languages

    Construct an NFA that accepts all strings over the alphabet {0, 1, 2} that begin with one or more 0s, followed by an odd number of 1s, and end with any number of 2s.

    View this question on its own page →
  48. Q6a. Given the \varepsilon-NFA, compute \varepsilon-closures and convert to DFA. | State | \varepsilon-transition | a-transition | b-transition | |-------|--------------------------|--------------|--------------| | → | {r} | {q} | {p,r} | | q | ∅ | {p} | ∅ | | r | {p,q} | {r} | {p} |20237m

    Module 1: Introduction & Regular Languages

    Given the ε\varepsilon-NFA, compute ε\varepsilon-closures and convert to DFA.

    State ε\varepsilon-transition a-transition b-transition
    {r} {q} {p,r}
    q {p}
    r {p,q} {r} {p}
    View this question on its own page →
  49. Q6a. Show that the language: L = \{ a^{n!} : n \ge 0 \} is not regular or not context-free.20217m

    Module 1: Introduction & Regular Languages

    Show that the language:

    L={an!:n0} L = \{ a^{n!} : n \ge 0 \}

    is not regular or not context-free.

    View this question on its own page →
  50. Q6b. Construct NFA for the regular expression: (0+1)^*00(0+1)^*20237m

    Module 1: Introduction & Regular Languages

    Construct NFA for the regular expression:

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

    View this question on its own page →