CS402_FINAL2.doc

Verified academic study resource for CS402 (Theory of Automata) under the Computer Science at Virtual University of Pakistan. This DOC document (Final-Term Solved Past Paper & Examination Pack) covers Final-Term Exam Scope (Lectures 23 to 45) spanning approximately 320 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
DOC
Type
Final-Term
Coverage
Final-Term Exam Scope (Lectures 23 to 45)

Virtual University regulations strictly require achieving at least 20% marks in the Final-Term exam paper alone (typically 12+ marks out of 60) to pass CS402, regardless of midterm scores.

What this file covers — CS402 syllabus roadmap

  1. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  2. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  3. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  4. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download CS402_FINAL2.doc for free?

You can preview and download "CS402_FINAL2.doc" (CS402 DOC, ~320 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs402-final2-doc-2) with 100% free high-speed downloads and zero registration requirements.

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

This document covers Final-Term Exam Scope (Lectures 23 to 45) across 4 distinct lecture units (Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), 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

Q1
Who invented the Turing machine?
    (a) Alan Mathison Turing
    (b) N. P. Completeness
    (c) E. Post
    (d) None of these
Q2
Consider the following TM

Which of the following is true
    (a) The string aaabbbaaa can be observed to be accepted by the above TM. It can also be observed that the above TM accepts the non-CFL {a b c}.
    (b) The string aaabbbaaa can be observed to be accepted by the above TM. It can also be observed that the above TM accepts the non-CFL {anbnan}.
    (c) The string bbbaaabbb can be observed to be accepted by the above TM. It can also be observed that the above TM accepts the non-CFL {anbnan}.
    (d) The string abbbaaabb can be observed to be accepted by the above TM. It can also be observed that the above TM accepts the non-CFL {anbnan}.
Q3
Can a turing machine's head ever be in the same location in two successive steps?
    (a) Yes
    (b) Yes but only in finite languages
    (c) No
      (d)Yes but only in infinite langauges
Q4:
PALINDROME is proved to be regular language by using
    (a) FA
    (b) TG
    (c) Pumping Lemma
    (d) PDA

Q5:
   A CFG is said to be ambiguous if there exists one word of its language that cannot be generated by different production trees.
    (a) True
    (b) False
    (c) Depend on language
    (d) None of the given
Q6:
Every regular expression can be expressed as CFG but every CFG cannot be expressed as a regular expression. This statement is:
    (A) True
    (B) False
    (C) Depends on the language
    (D) None of the given options
Q7:
If R is regular language and Q is any language (regular/ nonregular), then Pref(Q in R) is ______
    (a) Regular
    (b) Non-Regular
    (c) Finite
    (d) Infinite

Q8:
One GTG can generate more than one language”. This statement is _______
    (a) True
    (b) False
    (c) Depends on alphabet
    (d) None of these
Q9:

    (a) Begins and ends with different letters
    (b) Begins and ends with same letters
    (c) Have length greater than 1
    (d) None of these
Q10:
Even-palindrome is a ______ language
    (a) non-regular
    (b) regular
    (c) egular but infinite
    (d) none of the given
Q11:

    (a) (a + b)*a
    (b) Λ + (a + b)*a
    (c) Λ + (a + b)*a*
    (d) None of these
Q12:
Every FA should be __________
    (a) Deterministic
    (b) Non- Deterministic
    (c) Deterministic & Non- Deterministic
    (d) None of these
Q13:

    (a) Ending in a
    (b) Starting with a
    (c) Ending & starting with same letter.
    (d) All of these
Q14:
An FSM can be considered as TM
    (a) Of finite tape length, rewinding capability and unidirectional tape movement
    (b) Of finite tape length, without rewinding capability and unidirectional tape movement
    (c) Of finite tape length, without rewinding capability and bidirectional tape movement
    (d) Of finite tape length, rewinding capability and bidirectional tape movement
Q15:

    (a) Mealy machine
    (b) Moore machine
    (c) Kleene machine
    (d) None of these
Q16:
An alphabet of  is valid if
    (a) No letter of  appears in middle of any other letter
    (b) No letter of  appears at end of any other letter
    (c) No letter of  appears at start of any other letter
    (d) All of above
Q16:

The product of two regular languages is _____
    (a) Regular Language
    (b) Non-Regular Language
    (c) Depend on alphabets
    (d) None of these
Q17
Pumping lemma is generally used for proving
    (a) A given grammar is infinite
    (b) A given grammar is not regular
    (c) Whether two given regular expressions are equivalent
    (d) None of these
Q18
Left hand side of a production in CFG may consists of:
    (a) One terminal
    (b) More than one terminal
    (c) One non-terminal
    (d) Terminals and non-terminals
Q19
We can also represent an FA using different states e.g. Accept state, Reject state, Read State etc.
This _____________   state behaves as final state of an FA.
    (a) Accept
    (b) Reject
    (c) Pop
    (d) Push
Q20

The above machine is a/anTG ___________
    (a) Finite Automata
    (b) Turing machine
    (c) FA
    (d) TG
Q21
Can a turing machine contain just a single state?
    (a) Yes
    (b) Yes when the reject state is not compulsory
    (c) No
    (d) Yes but only in the limited situations
Q22
Which of the following statement is false?

1) The turing machine is similar to a finite automaton but with an unlimited and unrestricted memory
2) A Turing machine is a much more accurate model of a general purpose computer

    (a) Statement 1
    (b) Statemetn 2
    (c) Both satements (1 & 2) are false
    (d) Both statments (1&2) are true
Q23
(a + b)*b is RE for the following language
"The language defined over Σ={a,b} having words not ending in a"
    (a) True
    (b) False
Q24
If the given CFG contains a production of the form S, then __________
    (a) The corresponding CFL is not empty.
    (b) The corresponding CFL is empty.
    (c) The corresponding CFL is not empty if the language is regular
    (d) The corresponding CFL is empty and non regular.
Q25
Examin the following CFG and select the correct choice
SAB, A BSB, BCC
	CSS
	Aa|b
	C b|bb

    (a) abb is a word in the corresponding CFL.
    (b) abb is not the word of corresponding CFL.
    (c) any word can be accept from the corresponding CFL.
    (d) None of the given.
Q26
The process of finding the derivation of word generated by particular grammar is called_____
    (a) Processing
    (b) Parsing
    (c) Programming
    (d) Planing
Q27
There are different parsing techniques, containing ________
    (a) Top down parsing
    (b) Bottom up parsing
    (c) Parsing technique for particular grammar of arithmetic expression
    (d) All of these
Q28
The language all words (made up of a’s and b’s) with at least two a’s can be described by the regular expression.
    (a) (a+b)* a (a+b)* a (a+b)*
    (b) (a+b)* ab* a(a+b)*
    (c) b*ab* a(a+b)*
    (d) All of these
Q29
Regular language can be expressed by _____
    (a) Regular expression only
    (b) Finite automata only
    (c) Regular expression & Finite automata

More CS402 files

All CS402 files · Midterm Prep 2026 · MCQs Bank