cs402-Mid term Solved Subjectives With References by Moaaz.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 compiled by Moaaz Siddhu) 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)
Compiled by
Moaaz Siddhu
Tags
SUBJECTIVE, SOLVED, 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 Solved Subjectives With References by Moaaz.pdf for free?

You can preview and download "cs402-Mid term Solved Subjectives With References by Moaaz.pdf" (CS402 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs402-mid-term-solved-subjectives-with-references-by-moaaz-pdf) 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

                                      CS402 – Theory of Automata
                                             Solved Subjective                             Dec 07,2012
                                           From Midterm Papers
    MC100401285                Moaaz.pk@gmail.com      Mc100401285@gmail.com                   PSMD01

                                       MIDTERM SPRING 2012
                                      CS402 – Theory of Automata
Q. Point of Kleen Theory.
Answer:- (Page 25)
1. If a language can be accepted by an FA then it can be accepted by a TG as well.
2. If a language can be accepted by a TG then it can be expressed by an RE as well.
3. If a language can be expressed by a RE then it can be accepted by an FA as well.

Q. Difference and common between NFA & DFA
Answer:- (Page 25)           Click here for detail
Difference
1-In FA Finite number of states, having one initial and some (maybe none) final states. While in NFA Finite
many states with one initial and some final state.
2-In FA for each state and for each input letter there is a transition showing how to move from one state to
another while in NFA there may be more than one transition for certain letters and there may not be any
transition for certain letters.
3-In FA  is valid while in NFA  is not valid.

Common
Finite set of input letters,

                                       MIDTERM SPRING 2012
                                      CS402 – Theory of Automata
1) What is the function of mealy machine?
Answer:- (Page 60)
1’s complementing and incrementing machines which are basically Mealy machines are very much helpful in
computing.
The incrementing machine helps in building a machine that can perform the addition of binary numbers.

                                                                                                  1

2) Write the first step to convert GTG to FA?
Answer:- (Page 26)
Step 1 If a TG has more than one start states, and then introduces 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.

3) Explain with example that how in GTG's we directly join the initial state with the final state?
Answer:- (Page 27)
Eliminate the middle state and connect the first state with the last by a single transition (include the possibility
of circuit as well) labeled by the RE which is the concatenation of corresponding two REs in the existing
sequence.

                                      MIDTERM SPRING 2012
                                     CS402 – Theory of Automata
Q#1
Check the given statements or correct or not if not then correct it.
1. String in regular language can not be infinite              True
2. Concatenation of finite letters from alphabets called sigma False
3. There cannot be more than one FA,s for same language.       False

Q#2.What is the difference between the strings and the words of a language?
Answer:- (Page 3)
Concatenation of finite number of letters from the alphabet is called a string. Words are strings belonging to
some language.

Q#3. Is there any difference in PALINDROME and reverse of palindrome explain it?
Answer:- (Page 6)
PALINDROME is The language and words of PALINDROME are called reverse of palindromes

Q#6 explain Moor Machine?
Answer:- (Page 55)
A Moore machine consists of the following
A finite set of states q0, q1, q2, … where q0 is the initial state.
An alphabet of letters Σ
An alphabet  ={x,y,z,…} of output characters from which output strings are generated.
A transition table that shows for each state and each input letter what state is entered the next.
An output table that shows what character is printed by each state as it is entered.

                                                                                                       2

                                     MIDTERM SPRING 2012
                                    CS402 – Theory of Automata

Q. What are the difference & similarities b/w FA & NFA?
Answer:- rep

Q.How can we show transition table of NFA to FA?
Answer:- (Page 45)
there may be more than one transition for a certain letter and there may not be any transition for certain letter,
so starting from the initial state corresponding to the initial state of given NFA, the transition table along with
new labels of states, of the corresponding FA, can be built introducing an empty state for a letter having no
transition at certain state and a state corresponding to the combination of states, for a letter having more than
one transitions.

Q.Is Kleen's star & Kleen's closure are different?
Answer:- (Page 7)
there is no difference between both

Q. What is the difference b/w Mealy & Moore machine?
Answer:- Click here for detail
Moore machines
Safer do use because outputs change at clock edge
May take additional logic to decode state into outputs
For Moore machine, output is valid after state transition. Output associated with stable present state

Mealy machines
Typically have fewer states
React faster to inputs. don’t wait for clock
Asynchronous outputs can be dangerous
For Mealy machine, output is valid on occurrence of active clock edge. Output associated with transition from
present state to next state. Output in Mealy machine occurs one clock period before output in equivalent Moore
machine.

Q.Write a regular expression of length 6 which starts and end with the same double letters?

                                                                                                       3

                                      MIDTERM SPRING 2012
                                     CS402 – Theory of Automata

Can we accept the string going from final to initial state?
Answer:- (Page 15)
If any state starts from the final state it does not accept any string. Even it does not accept the null string,
because there is no path starting from initial state and ending in final state.

If there is no initial state in FA then that FA does not accept any language Discuss two situations when an

More CS402 files

All CS402 files · Midterm Prep 2026 · MCQs Bank