CS402FinalTermSolvedSubjectivewithreferencesByMoaaz.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 compiled by Moaaz Siddhu) 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)
Compiled by
Moaaz Siddhu

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 CS402FinalTermSolvedSubjectivewithreferencesByMoaaz.doc for free?

You can preview and download "CS402FinalTermSolvedSubjectivewithreferencesByMoaaz.doc" (CS402 DOC, ~320 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs402finaltermsolvedsubjectivewithreferencesbymoaaz-doc) 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



CS402- Theory of Automata Solved Subjective From Final term Papers
Feb 14,2013
MC100401285
Moaaz.pk@gmaiI.com      Mc10040128S@gmaiI.com
PSMD01

FINALTERM EXAMINATION Spring 2012 CS402- Theory of Automata

What is the concept of the Union of FA's ? Answer:- (Page 32)
FA3 be an FA corresponding to r1+ r2, and then the initial state of FA3 must correspond to the initial state of FA1 and the initial state of FA2.

What does mean the LANGUAGE IS CLOSED? Answer:- (Page 90)
Closed w.r.t. concatenation i.e.the language expressed by RE of type r*.

Stack consistence means that in the PDA? Answer:- (Page 123)
when a row pops a character it should be there at the top of the STACK

-Where Null string is use the most? Answer:-
The choice of null string depends on the requirements of the language. In some case we need to have null string to be accepted by the FA.

PUSHDOWN AUTOMATON (PDA)?
Answer:- (Page 119)
PUSHDOWN STACK or PUSHDOWN STORE
PUSHDOWN STACK is a place where the input letters can be placed until these letters are referred again. It can store as many letters as one can in a long column.
Initially the STACK is supposed to be empty i.e. each of its storage location contains a blank.

Muhammad Moaaz Siddiq - MCS(4th) Moaaz. pk@gmail. com Campus: - Institute of E-Learning & Moderen Studies
(IEMS) Samundari
Prefixes of a language in another language? Answer:- (Page 78)
Prefixes of a language in another language
If two languages R and Q are given, then the language the prefixes of Q in R denoted by Pref(Q in R) is the set of strings of letters that, when concatenated to the front of some word in Q to produce some word in R i.e. Pref(Q in R) = the set of all strings p such that there exists words q in Q and w in R such that pq = w. Following are the examples in this regard Example
Let Q = {aa,abaaabb,bbaaaaa,bbbbbbbbbb} and R = {b,bbbb,bbbaaa,bbbaaaaa}
It can be observed that aa and bbaaaaa occur at the ending parts of some words of R, hence these words help in defining the language pref(Q in R). Thus pref(Q in R) = {b,bbba,bbbaaa}

Conversion form of PDA? Answer:- (Page 119) Conversion form of PDA
A PDA is in conversion form if it fulfills the following conditions: There is only one ACCEPT state. There are no REJECT states.
Every READ or HERE is followed immediately by a POP i.e. every edge leading out of any READ or HERE state goes directly into a POP state.
No two POPs exist in a row on the same path without a READ or HERE between them whether or not there are any intervening PUSH states (i.e. the POP states must be separated by READs or HEREs). All branching, deterministic or nondeterministic occurs at READ or HERE states, none at POP states and every edge has only one label.
Even before we get to START, a "bottom of STACK" symbol $ is placed on the STACK. If this symbol is ever popped in the processing it must be replaced immediately. The STACK is never popped beneath this symbol. Right before entering ACCEPT this symbol is popped out and left. The PDA must begin with the sequence

The entire input string must be read before the machine can accept the word.

Is automata is a programming subject or theoretical ??? marks 3 Answer:-
In theoretical computer science, automata theory is the study of mathematical objects called abstract machines or automata and the computational problems that can be solved using them. Automata mean "self-acting".

Automata theory is also closely related to formal language theory. An automaton is a finite representation of a formal language that may be an infinite set. Automata are often classified by the class of formal languages they are able to recognize.

Parsing Techniques (5 number) Answer:- (Page 136)
Recall the CFG for arithmetic expression S—S+S|S*S|number
It was observed that the word 3+4*5 created ambiguity by considering its value either 23 or 35. To remove this ambiguity, the CFG was modified to S—>-(S+S)|(S*S)|number
There arises a question that whether a new CFG can be defined without having parentheses with operator hierarchy (i.e. * before +)? The answer is yes. Following is the required PLUS'TIMES grammar S—E, E—>T+E|T, T—F*T|F, F—(E)|i
Where i stands for any identifier i.e. number or of storage location name (variable). Following is the derivation of i+i*i S =E
=>T+E

=F+E
=i+E

=i+T
=i+F*T

= i+i*T
= i+i*F = i+i*i

-What are live and dead productions. (5 number) Answer:- (Page 127)
Live production: A production of the form nonterminal — string of two nonterminals is called a live production.
Dead production: A production of the form nonterminal — terminal is called a dead production.

FINALTERM EXAMINATION Spring 2012 CS402- Theory of Automata

1: How can we define languages elaborate any five ways. Answer:- (Page 4)
Defining Languages
The languages can be defined in different ways , such as Descriptive definition, Recursive definition, using Regular Expressions (RE) and using Finite Automaton (FA) etc.

3
Muhammad Moaaz Siddiq - MCS(4th) Moaaz. pk@gmail. com Campus: - Institute of E-Learning & Moderen Studies
(IEMS) Samundari
2: Describe the POP operation and draw symbol for POP state in context of Push down stack. Answer:- (Page 107)
POP :
POP is an operation that takes out a letter from the top of the STACK. The rest of the letters are moved one location up. POP state is expressed as

3: Write two difference and two similarities between DFA and NFA. Answer:- 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
Every Language that can be recognized by a DFA can also be recognized by a NFA. The reverse is True. Both DFA and NFA can only have one start state. But they can have multiple Final states. Finite set of input letters

More CS402 files

All CS402 files · Midterm Prep 2026 · MCQs Bank