CS402 Mid Term By JUANID.pdf

Verified academic study resource for CS402 (Theory of Automata) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS402 – Theory of Automata
Faculty
Computer Science
Format
PDF
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Tags
MIDTERM

Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS402.

What this file covers — CS402 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)

Frequently asked questions

Where can I download CS402 Mid Term By JUANID.pdf for free?

You can preview and download "CS402 Mid Term By JUANID.pdf" (CS402 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs402-mid-term-by-juanid-pdf-3) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS402 file?

This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS402 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS402 solved past papers and handouts verified for 2026 exams?

Yes. All CS402 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

AL-JUNAID INSTITUTE OF GROUP
1.Which of the following steps replaces multiple incoming transition edges
with a single one proving Kleene’s theorem part II?
      a. Step 1
      b. Step 2
      c. Step 3
      d. Step 4
2. Let FA1 accepts many strings and FA2 accepts no strings, then FA1+FA2
will be equal to:
a.FA1
b.FA2
C.FA2-FA1
d.(FA2)*
3. Let L be the language of all strings, defined over ∑ =(0,1), ending in 10.
Which of the following strings are indistinguishable w.r.t L with z being 0?
a.100.101
b.111.101
c. 110 .101
d.010.101
4. If r1=(aa+bb)and r2=(a+b) then the language (aa+bb)(a+b) will bhe
generated by_______
a.(r1)(r2)
b.(r1 +r2)
c.(r2)(r1)
d.(r1)*

pg. 1                      0304-1659294

AL-JUNAID INSTITUTE OF GROUP
5. Introducing a new start state in the case of multiple states is step
no.______ of proving Kleen’s theorem part II.
a.1
b.2
c.3
d.4
6. The language having even numbers of a’s and even number of b’s defined
over S={a,b} is called ______
a. EVEN-EVEN
B.ODD-ODD
c. PALINDROME
d. FACTORIAL
7. In NFA having no transition at a certain state, FA can be built by
introducing :
a.Empty state
b. Combination of states
c .initial state
d. final state
8. For every three regular expression R, S, and T. the language denoted by
R(S U T) and (RS)U(RT) are the _______
a .same
b. Different
c. R(SUT)is greater

 pg. 2                      0304-1659294

AL-JUNAID INSTITUTE OF GROUP
d. none of the given options
9. Which of the following string belongs to the language of the regular
expression (aa*b)?
a. baabab
b. abbbaa
c.aaaaaa
d.aabaab
10. If L1’ and L2’ are regular languages, then L1, L2 will be
a. non regular
b. may be regular
c. Regular
d. none of the mentioned
11. Suppose the language L1 has 2 L2 has 2 states. If we have a machine M
that accepts L1∩L2. Then the total number of states in M is equal to_______
a. 2
b. 4         AL-JUNAID INSTITUTE OF GROUP
c. 6
d. 8
12. If L is a regular language, then (L’)’ U L will be:
a. L
b.
c.

 pg. 3                     0304-1659294

AL-JUNAID INSTITUTE OF GROUP
d.
13. In Mealy machine, the output depends on______
a. Only present state
b. Present state and Present output
c. Nothing
d. Type of input

14. Strings x,y,z belongs to ∑* such that xz∈ L but yz∉ L where L ⊆∑* are:
a. indistinguishable
b. Undetermined
c. Both distinguishable and indistinguishable
d. Distinguishable
15. Melay machine to increase the output string in magnitude by 1 is called:
a. Complementing machine
b. Decrementing machine
c. Incrementing machine        AL-JUNAID INSTITUTE OF GROUP
d. Converting machine
16. Suppose we have FA3 (which is to FA1+FA2) then the final state of FA3
will be declared final if:
a. it corresponds to final states of both FA1 and FA2
b. it corresponds to final states FA1 only
c. it corresponds to final states FA2 only
d. It corresponds to any of the final states of FA1 or FA2

pg. 4                      0304-1659294

AL-JUNAID INSTITUTE OF GROUP
17. If we have the finite language and the number of states in the FA is n then
the maximum number of letter in each word of the language that will be
accepted by the given FA will be :
a. 1
b. n+1
c. n-1
d. n
18. Which of the following state is introduced while developing NFA for the
closure of FA?
a. An initial state which should be final as well
b. simply an initial      AL-JUNAID INSTITUTE OF GROUP
c. Final states
d. An initial state with loop for all letters
19. Length of EVEN-EVEN language is_______
a. Odd
b. such language doesn’t exist
c. Even
d. sometimes even & sometimes odd
20. If FA1 corresponds to (a+b)* then FA1 must accept_______
strings/strings.
a. No
b. Odd length
c. Every

 pg. 5                       0304-1659294

AL-JUNAID INSTITUTE OF GROUP
d. Even length
21. In FA, initial stage is represented by :
a. leaventh state empty
b. drawing a circle in that state
c. drawing ‘+’sign in transtate
d. Drawing an arrowhead before the state
22. Which one of the following machine is represented as a pictorial
representation with states and directed edges labeled by an input letter along
with an output character?
a. Moore machine
b. Finite state machine          AL-JUNAID INSTITUTE OF GROUP
c. Mealy machine
d. Deterministic finite state machine
23. Length of machine “AbBAbcd“ defined over ∑=(Ab,B,c,d) is_______.
a. three
b. four
c. five
d. six
24. An FA is a collection of:
a. Finite states , finite transition and finite input letters
b. infinite states , infinite transition and infinite input letters
c. Only finite states , finite transition

 pg. 6                        0304-1659294

AL-JUNAID INSTITUTE OF GROUP
d. Only infinite states , infinite transition
25. Given the language L={ab, aa, baa}, which of the following strings are in
L*?

      i) abaabaaabaa
      ii) aaaabaaaa
      iii) baaaaabaaaab
      iv) baaaaabaa
a. 1,2 & 3
b. 2, 3&4
c. 1,2 & 4         AL-JUNAID INSTITUTE OF GROUP
d. 1, 3&4
26. In the context to make NFA for the concentration of FA1 and FA2 (FA1
accepting null string) which of the following option is correct?
a. initial states in both FAs
b. FA2 having initial state only
c. FA2 having final state only
d. Final states in both FAs
27. Every ___ is a ___ as well, but the converse may not be true.
a. TG ,FA
b. TG, GTG
c. FA ,GTG
d. FA, TG
28. NFA with null string has ____ initial state(s).
a. One

pg. 7                         0304-1659294

AL-JUNAID INSTITUTE OF GROUP
b. Two
c. Three
d. Many
29. While finding RE corresponding to a TG, we connect the new start state
with the old start state by____ transition.
a. a
b. b
c. Null
d. Re
30. If S=(x). then S* will be_____.
a. {^,x,xxx,xxxx,xxxx….}
b. {^,x,xxx,xxxx,xxxxx….}
c. {^,x,xx,xxx,xxxx….}
d. {^,x,xxxx,xxxxx,xxxxxx….}
31. The minimum length of string (except null string) of a language that starts
and ends in the same letter will be:
a.1         AL-JUNAID INSTITUTE OF GROUP
b. 2
c.3
d. 4
32. If S={ab, bb} , then S* will not contain______.
a. abbbab

 pg. 8                     0304-1659294

AL-JUNAID INSTITUTE OF GROUP
b. bbbbab
c. ababbb
d. bbba
33. Which of the following machine has only one initial state?

More CS402 files

All CS402 files · Midterm Prep 2026 · MCQs Bank