Algorithms 2 Marks
Algorithms 2 Marks
Big O (O)
Omega (Ω)
Theta (Θ)
Algorithms 2 Marks 1
7. Define the asymptotic notation “Big Oh” (O).
Big O represents the upper bound of an algorithm's running time, showing the
worst-case growth rate.
9. Define an algorithm.
An algorithm is a finite sequence of well-defined instructions to solve a specific
problem or perform a computation.
Example: A → B → C
Algorithms 2 Marks 2
12. What are the constraints to represent a transportation
network?
Constraints include capacity, cost, direction of routes, and demand at nodes.
Algorithms 2 Marks 3
An all-pairs shortest path algorithm using dynamic programming with time
complexity O(n³).
2. Build a min-heap.
2. Conquer
3. Combine
Optimal substructure
Algorithms 2 Marks 4
DP stores and reuses subproblem solutions; divide-and-conquer solves
subproblems independently.
Space: O(n)
32. What are the factors that influence the efficiency of the
backtracking algorithm?
Problem constraints, pruning conditions, and branching factor.
Example: A → B → C → D → A
Algorithms 2 Marks 5
36. Why is branch and bound approach found to be
appropriate for solving travelling salesman problem?
It prunes paths that can’t yield better solutions, reducing computation.
40. State the reason for terminating search path at the current
node in branch and bound algorithm.
To avoid exploring suboptimal paths that cannot yield better results than the
current best.
Algorithms 2 Marks 6
Use Quickselect:
Choose pivot
Partition array
Algorithms 2 Marks 7