CS402 Midterm MCQs 2020 with Reference.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
- Type
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Tags
- MCQ, 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
- Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
- Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
- Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
- 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 Midterm MCQs 2020 with Reference.pdf for free?
You can preview and download "CS402 Midterm MCQs 2020 with Reference.pdf" (CS402 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs402-midterm-mcqs-2020-with-reference-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
It may be noted that in Mealy machine, the length of output string is equal to that of input string.
A pictorial representation with states and directed edges labeled by an input letter along with an output character.
If a TG has more than one start states, then introduce a new start state connecting the new state to the old
start states by the transitions labeled by Λ and make the old start states the non-start states.
Hence an FA is also called a Deterministic Finite Automaton (DFA).
Recursive definition of Regular Expression(RE)
Step 1: Every letter of Σ including Λ is a regular expression.
Step 2: If r1 and r2 are regular expressions then
(r1)
r1 r2
r1 + r2 and
r1*
are also regular expressions.
Step 3: Nothing else is a regular expression.
Kleene’s Theorem Part III
If a language can be expressed by a RE then it can be accepted by an FA as well.
NFA corresponding to Union of FAs
Method
Introduce a new start state and connect it with the states originally connected with the old start state with the
same transitions as the old start state, then remove the –ve sign of old start state. This creates non-determinism
and hence results in an NFA.
Now consider another language L3 of strings of length three or more, defined over Σ = {a,b}, and the third letter
from the right is a. As discussed by Martin, there is a straight forward method to build an FA recognizing L3 i.e. a
distinct state for every possible substring of length less then or equal to 3. It is obvious that for each length i,
i=0,1,2,3, of substring, the number of states are 2i and thus total number of states required to recognize the language
L3 are20+21+22+23 = 23+1-1=15 (using 20+21+22+…+ 2n= 2n+1-1)
It is to be noted that according to the Kleene’s theorem, if a language can be accepted by an FA, then there
exists a TG accepting that language. Since, an NFA is a TG as well, therefore there exists an NFA accepting the
language accepted by the given FA.
It may be noted that the length of output string is l more than that of input string as the initial state prints out the
extra character 1, before the input string is read.
sahir
Closure of an FA, is same as concatenation of an FA with itself,
It may be noted that corresponding to a given language there may be more than one FA accepting that language,
but for a given FA there is a unique language accepted by that FA
sahir
Method
Thus, to accommodate this situation, introduce an initial state which should be final as well
Since the language corresponding to r1+ r2 is the union of cor-
responding languages L1 and L2, consists of the
strings belonging to L1or L2 or both, therefore a final state of
FA3 must correspond to a final state of FA1 or FA2
or both.
It is to be noted that an NFA can be considered to be an intermediate
structure between FA and TG.
Two regular expressions are said to be equivalent if they generate the same language.
The language EQUAL, of strings with number of a’s equal to number of
b’s, defined over Σ={a,b}, can be
written as
{Λ ,ab,ba,aabb,abab,baba,abba,…}
Finite Automaton with output
Finite automaton discussed so far, is just associated
with the RE or the language.
There is a question whether does there exist an FA
which generates an output string corresponding to
each input
string ? The answer is yes. Such machines are
called machines with output.
There are two types of machines with output.
Moore machine and Mealy machine
More CS402 files
- CS402 Grand Quiz file for Mid Term Prepration by VU Stars.pd (PDF · Midterm)
- CS402 Grand Quiz file for Mid Term Prepration by VU Stars.pd (PDF · Midterm)
- CS402 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS402 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS402 MIDTERM FILE 2 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS402 MIDTERM FILE 3 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS402 MIDTERM SOLVED MCQS By JUNAID-1.pdf (PDF · Midterm)
- CS402 MIDTERM SOLVED MCQS By JUNAID.pdf (PDF · Midterm)