CS502 ilovepdf_merged (1).pdf

Verified academic study resource for CS502 (Fundamentals of Algorithms) under the Computer Science at Virtual University of Pakistan. This PDF document (Verified Study Resource) covers Full Course Curriculum spanning approximately 280 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS502 – Fundamentals of Algorithms
Faculty
Computer Science
Format
PDF
Type
Study Resource
Coverage
Full Course Curriculum

Review this document alongside the official handouts and test your retention in the Interactive MCQs Studio.

What this file covers — CS502 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)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. 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 CS502 ilovepdf_merged (1).pdf for free?

You can preview and download "CS502 ilovepdf_merged (1).pdf" (CS502 PDF, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs502-ilovepdf-merged-1-pdf) with 100% free high-speed downloads and zero registration requirements.

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

This document covers Full Course Curriculum across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, 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 CS502 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 CS502 solved past papers and handouts verified for 2026 exams?

Yes. All CS502 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

                 CS502 – Fundamentals of Algorithms
                    Important Macq’s for Final Term
                                           By
                                    CS Experts

1. Dijkstra’s Algorithm is used to solve _____________ problems.

a) All pair shortest path

b) Single source shortest path

c) Network flow d) Sorting

2. Which of the following is the most commonly used data structure for implementing

Dijkstra’s Algorithm?

a) Max priority queue

b) Stack

c) Circular queue

d) Min priority queue

3. What is the time complexity of Dijikstra’s algorithm?

a) O(N)

b) O(N3)

c) O(N2)

d) O(logN)

                                 - Please choose one

   4. Dijkstra’s Algorithm cannot be applied on ______________
       a) Directed and weighted graphs
       b) Graphs having negative weight function
       c) Unweighted graphs
       d) Undirected and unweighted graphs

   5. How many priority queue operations are involved in Dijkstra’s Algorithm?
       a) 1
       b) 3
       c) 2
       d) 4

   6. How many times the insert and extract min operations are invoked per
       vertex?
       a) 1
       b) 2
       c) 3
       d) 0

   7. The maximum number of times the decrease key operation performed in
       Dijkstra’s algorithm will be equal to ___________
       a) Total number of vertices
       b) Total number of edges
       c) Number of vertices – 1
       d) Number of edges – 1

   8. What is running time of Dijkstra’s algorithm using Binary min- heap
       method?
       a) O(V)
       b) O(VlogV)
       c) O(E)
       d) O(ElogV)

True False

                                   - Please choose one

     9. The running time of Bellmann Ford algorithm is lower than that of
        Dijkstra’s Algorithm.
        a) True
        b) False

     10. Dijkstra’s Algorithm run on a weighted, directed graph G={V,E} with non-
        negative weight function w and source s, terminates with d[u]=delta(s,u)
        for all vertices u in V.
        a) True
        b) False

     11. Dijkstra’s Algorithm is the prime example for ___________
        a) Greedy algorithm
        b) Branch and bound
        c) Back tracking
        d) Dynamic programming

1.     Computing the strongly connected components of a graph is a
     generalization of the problem to determine whether a digraph is
     strongly connected or not.

     True

2.      If u finds yourself in maze the better traversal approach will
     be:

     BFS and DFS are valid

3.      In ----------- algorithm, at any time, the subset of edges A forms
     a single tree.

     Prim’s

True False

                              - Please choose one

4.      In computing the strongly connected components of a
     digraph, vertices of the digraph are not partitioned into subsets.

     False

5.     Which is true statement:

  The breadth-first-search is a shortest-path algorithm that works
on un-weighted graphs.

6.     There are no ------------- edges in undirected graph.

     Cross

7.       In undirected graph, by convention all the edges are called -----
     ----- edges.

     Back

8.     A digraph is strongly connected under what condition?

     A digraph is strongly connected if for every pair of vertices u,
     v ∈ V, u can reach v and vice versa.

9.     The tricky part of the ------------ algorithm is how to detect
     whether the addition of an edge will create a cycle in viable set A.

     Kruskal’s

10. Digraphs are not used in communication and transportation
   networks.

     True

11. If u and v are mutually reachable in G, then in the graph
   formed by reversing all the edges, these vertices are not
   reachable.

True False

                             - Please choose one

   False

12. A topological sort of a DAG is a------------- ordering of the vertices
   of the DAG such that for each (u, v), u appears before v in the
   ordering.

   Linear

13. Kruskal’s algorithm works by adding vertices in increasing
   order of weight (lightest edge first).

   False

14. Adding an edge to a free tree creates:

   Cycle

15. Forward edge is:

   (u, v) where v is a proper descendent of u in the tree

16. In strong components algorithm, vertices are sorted in ------------
   --- order of finish times.

   Decreasing

17. In Kruskal’s algorithm the next edge is not added to viable set
   A, if it’s adding Induce a cycle.

   True

18. What is the time complexity to extract a vertex from priority
   queue in Prim’s algorithm?

   (log V)

19. A graph may contain------------------.

True False

                              - Please choose one

   More than one MST

20. Prim’s algorithm builds MST by starting with any vertex and at
   any time the subset of edges form:

   A single tree

21. In Prim’s algorithm, we start with the------------- vertex r; it can be
   any vertex.

   Root

22. The ----------- given by DFS allow us to determine whether the
   graph contains any cycles.

   Time Stamps

23. You have an adjacency list for G, what is time complexity to
   compute Graph transpose G^T?

   Θ (V + E)

24. Back edge is:

   Ans. (u, v) where v is an ancestor of u in the tree

25. What algorithm technique is used in the implementation of
   Kruskal solution for the MST?

   Ans. Greedy Technique         (Pg. # 142)

26. If a subset of edges A is viable for building MST. It cannot
   contain a/an----------.

   Ans. Cycle   (Pg. # 143)

True False

                               - Please choose one

27. Adding any edge to a free tree creates a unique----------

   Ans. Cycle    (Pg#142)

28. Prim’s algorithm is based on -------- strategy.

   Ans. Greedy (Pg. # 142)

29. In strong components algorithm, First of all DFS is run for
   getting ------------- times of vertices.

   Ans. Finish

30. There exists a unique path between any two vertices of a free
   tree.

   Ans. True     (pg. # 142)

31. In strong components algorithm, first of all DFS is run for
   computing finish times of vertices.

   Ans. true

32. There is relationship between number of back edges and

More CS502 files

All CS502 files · Midterm Prep 2026 · MCQs Bank