0% found this document useful (0 votes)
36 views4 pages

(Revised) Term-End Examination, 2019: No. of Printed Pages: 4 BCS-042

This document is a past exam for an Introduction to Algorithm Design course. It contains 5 questions: 1) Prove/disprove properties of Big O and Theta notation and solve a recurrence relation using recursion trees. 2) Explain the general approach for solving problems using greedy algorithms and provide an algorithm for the fractional knapsack problem. 3) Define minimum spanning trees, apply Kruskal's algorithm to find the MST for a graph, and provide the bubble sort algorithm. 4) Provide the DFS traversal order for a graph and apply the master method to solve two recurrence relations. 5) Explain Dijkstra's algorithm for single source shortest paths and differentiate DFS vs

Uploaded by

Dilbagh Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views4 pages

(Revised) Term-End Examination, 2019: No. of Printed Pages: 4 BCS-042

This document is a past exam for an Introduction to Algorithm Design course. It contains 5 questions: 1) Prove/disprove properties of Big O and Theta notation and solve a recurrence relation using recursion trees. 2) Explain the general approach for solving problems using greedy algorithms and provide an algorithm for the fractional knapsack problem. 3) Define minimum spanning trees, apply Kruskal's algorithm to find the MST for a graph, and provide the bubble sort algorithm. 4) Provide the DFS traversal order for a graph and apply the master method to solve two recurrence relations. 5) Explain Dijkstra's algorithm for single source shortest paths and differentiate DFS vs

Uploaded by

Dilbagh Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

5344

No. of Printed Pages : 4 BCS-042

BACHELOR OF COMPUTER APPLICATIONS


(BCA) (Revised)

Term-End Examination, 2019

BCS-042 : INTRODUCTION TO ALGORITHM DESIGN

Time : 2 Hours Maximum Marks : 50

Note : Question no. 1 is compulsory. Answer any three


questions from the rest.

1. (a) Let f(n) and g(n) are two positive functions, using
basic definition of Big Oh ("0") and Theta (0),
prove/disprove the following : [5]

(i) max{f(n), g(n)} = 0(f(n) + g(n))

(ii) 2" = 0(2 11+1 )

(b) Solve the following Recurrence using Recursion


tree method : [5]

T(n) = 2T (n-1) + 1

Find tight solution of the Recurrence.

BCS-042/6500
( 1 ) 1111111111111111111111111111
(c) Explain general algorithm to solve any problem
,using Greedy techniques. Write any two
characteristics of Greedy Algorithm. [5]

(d) Write Algorithm to solve Knapsack (fractional)

problem using Greedy Method. Find the running


time of the algorithm also. [5]

(a) Define minimum spanning tree. Apply Kruskal's

Algorithm to find minimum cost spanning tree for


the following graph : [6]

(b) Write bubble sort algorithm and find its time


complexity in worst case. [4]

BCS-042/6500 (2)
3. (a) For the following graph write DFS (sequence of
traversal) from the node A : [4]

(b) Apply master method to solve the following


recurrence relation : [6]

n
(i) T (n) = 2T ( \ +n

(n
(ii) T (n) = 3T — + n log n
\4)

4. Explain Dijkstra's Algorithm to find a single source


shortest path in a given graph. Apply Dijkstra's Algorithm
and find the shortest path from source vertex 'A' to rest
of the vertices : [10]

BCS-042/6500 ( 3 ) [P.T.O.]
10

5. Differentiate between the following with respect to method •


of solving a problem and time complexity : [10]

(a) Depth-First-Search (DFS) Vs. Breath-First-


Search (BFS)

(b) Bellman-Ford Algorithm Vs Dijkstra's Algorithm


for single source shortest path.

BCS-042/6500 (4)

You might also like