MauryaHub PYQ Practice

cs3021_2026T2_Q1_NA.pdf

Theory of Computation · Quiz 1 · May 2026

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

Question 2 MCQ · 3.0 marks

Let [[IMAGE:7d82534159abbfa4_2_2]] be the language over [[IMAGE:7d82534159abbfa4_2_3]] accepted by a DFA such that every string in [[IMAGE:7d82534159abbfa4_2_4]] contains an odd number of symbols 1. Which of the following languages can be accepted by such a DFA?
Source diagram or notationSource diagram or notationSource diagram or notation
  1. [[IMAGE:7d82534159abbfa4_2_5]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_2_6]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_2_7]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_2_8]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 3 MCQ · 3.0 marks

Suppose an NFA has [[IMAGE:7d82534159abbfa4_2_9]] states and exactly one accepting state. If all subsets are reachable in subset construction, how many non-accepting states will the equivalent DFA contain?
Source diagram or notation
  1. [[IMAGE:7d82534159abbfa4_3_10]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_3_11]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_3_12]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_3_13]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 4 MCQ · 3.0 marks

Which of the following languages is NOT regular?
  1. [[IMAGE:7d82534159abbfa4_3_14]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_3_15]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_3_16]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_3_17]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 5 MCQ · 3.0 marks

Consider the following parse tree. [[IMAGE:7d82534159abbfa4_3_18]] Which grammar generates the above parse tree?
Source diagram or notation
  1. [[IMAGE:7d82534159abbfa4_4_19]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_4_20]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_4_21]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_4_22]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 6 MCQ · 3.0 marks

Consider the following DFA. [[IMAGE:7d82534159abbfa4_4_23]] Using state elimination, what regular expression describes the language accepted by the DFA?
Source diagram or notation
  1. [[IMAGE:7d82534159abbfa4_4_24]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_4_25]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_4_26]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_4_27]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 7 MSQ · 3.0 marks

Which of the following regular expressions generate only strings containing at least two [[IMAGE:7d82534159abbfa4_5_28]] 's?
Source diagram or notation
  1. [[IMAGE:7d82534159abbfa4_5_29]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_5_30]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_5_31]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_5_32]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 8 MSQ · 3.0 marks

Which grammars are ambiguous?
  1. [[IMAGE:7d82534159abbfa4_5_33]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_5_34]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_5_35]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_5_36]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 9 MSQ · 3.0 marks

Consider: [[IMAGE:7d82534159abbfa4_5_37]] and [[IMAGE:7d82534159abbfa4_6_38]] Which statements are TRUE?
Source diagram or notationSource diagram or notation
  1. [[IMAGE:7d82534159abbfa4_6_39]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_6_40]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_6_41]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_6_42]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 10 MSQ · 3.0 marks

Consider the following DFA over [[IMAGE:7d82534159abbfa4_6_43]] . [[IMAGE:7d82534159abbfa4_6_44]] Which of the following strings are accepted by the DFA?
Source diagram or notationSource diagram or notation
  1. [[IMAGE:7d82534159abbfa4_6_45]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_6_46]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_6_47]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_6_48]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 11 MCQ · 2.0 marks

Let [[IMAGE:7d82534159abbfa4_7_49]] Which language is represented by [[IMAGE:7d82534159abbfa4_7_50]] ?
Source diagram or notationSource diagram or notation
  1. All strings ending in [[IMAGE:7d82534159abbfa4_7_51]]
    Source diagram or notation
  2. All binary strings containing substring [[IMAGE:7d82534159abbfa4_7_52]]
    Source diagram or notation
  3. Strings with exactly one occurrence of [[IMAGE:7d82534159abbfa4_7_53]]
    Source diagram or notation
  4. Strings beginning with [[IMAGE:7d82534159abbfa4_7_54]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 12 MCQ · 2.0 marks

Which grammar is in Chomsky Normal Form (CNF)?
  1. [[IMAGE:7d82534159abbfa4_7_55]]
    Source diagram or notation
  2. [[IMAGE:7d82534159abbfa4_7_56]]
    Source diagram or notation
  3. [[IMAGE:7d82534159abbfa4_7_57]]
    Source diagram or notation
  4. [[IMAGE:7d82534159abbfa4_7_58]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 13 MCQ · 2.0 marks

Which statement correctly describes Greibach Normal Form (GNF)?
  1. Every production must begin with a variable.
  2. Every production begins with a terminal followed by zero or more variables.
  3. Productions may contain [[IMAGE:7d82534159abbfa4_8_59]] anywhere.
    Source diagram or notation
  4. Only two variables are allowed on RHS.

A published solution is not available for this question yet.

Question 14 NAT · 3.0 marks

A DFA has [[IMAGE:7d82534159abbfa4_8_60]] states. Using the infiniteness-testing theorem, strings of what minimum length must be checked to determine whether the language is infinite?
Source diagram or notation

    A published solution is not available for this question yet.

    Question 15 NAT · 3.0 marks

    Consider the grammar: [[IMAGE:7d82534159abbfa4_8_61]] How many production applications are required to derive [[IMAGE:7d82534159abbfa4_8_62]] using leftmost derivation?
    Source diagram or notationSource diagram or notation

      A published solution is not available for this question yet.

      Question 16 NAT · 3.0 marks

      Let [[IMAGE:7d82534159abbfa4_9_63]] Assume [[IMAGE:7d82534159abbfa4_9_64]] is regular with pumping length [[IMAGE:7d82534159abbfa4_9_65]] . Choose: [[IMAGE:7d82534159abbfa4_9_66]] If [[IMAGE:7d82534159abbfa4_9_67]] , how many [[IMAGE:7d82534159abbfa4_9_68]] 's appear after pumping with [[IMAGE:7d82534159abbfa4_9_69]] ?
      Source diagram or notationSource diagram or notationSource diagram or notationSource diagram or notationSource diagram or notationSource diagram or notationSource diagram or notation

        A published solution is not available for this question yet.

        Question 17 MSQ · 2.0 marks

        Which statements about DFA minimization are TRUE?
        1. Equivalent states cannot be distinguished by any continuation string.
        2. States with identical outgoing transitions are always equivalent.
        3. Minimal DFAs for the same language are unique up to isomorphism.
        4. Every DFA state can be merged with at least one other state.

        A published solution is not available for this question yet.

        Question 18 MSQ · 2.0 marks

        Which statements about Context-Free Languages is/are TRUE?
        1. CFLs are closed under union.
        2. CFLs are closed under intersection.
        3. CFLs are closed under intersection with regular languages.
        4. CFLs are closed under complementation.

        A published solution is not available for this question yet.

        Question 19 MSQ · 2.0 marks

        Consider the following NFA. [[IMAGE:7d82534159abbfa4_10_70]] Which strings are accepted by the NFA?
        Source diagram or notation
        1. [[IMAGE:7d82534159abbfa4_10_71]]
          Source diagram or notation
        2. [[IMAGE:7d82534159abbfa4_10_72]]
          Source diagram or notation
        3. [[IMAGE:7d82534159abbfa4_10_73]]
          Source diagram or notation
        4. [[IMAGE:7d82534159abbfa4_10_74]]
          Source diagram or notation

        A published solution is not available for this question yet.

        Question 20 NAT · 2.0 marks

        Consider the following DFA. [[IMAGE:7d82534159abbfa4_11_75]] What is the minimum length of a string accepted by this DFA that does not contain the symbol **1**?
        Source diagram or notation

          A published solution is not available for this question yet.