BCS-042 (3)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

No.

of Printed Pages : 4 BCS-042

BACHELOR OF COMPUTER
APPLICATIONS (BCA)
Term-End Examination
June, 2024
BCS-042 : INTRODUCTION TO ALGORITHM
DESIGN

Time : 2 Hours Maximum Marks : 50

Note : (i) Question No. 1 is compulsory and carries


20 marks.
(ii) Answer any three questions from the
rest.

1. (a) Arrange the following time complexities in


the increasing order : 2

log n, O (n2 ), O (3n ), n !

(b) Write the names of the following


symbols : 3

(i) 
(ii) 
(iii) O

P. T. O.
[2] BCS-042

(c) What is recurrence relation ? Define


Fibonacci sequence using recurrence
relation. 4

(d) What is linear search method ? Apply


linear search to search the number 9 in the
following list of numbers. Show the
searching steps : 6

8, 4, 10, 6, 9, 2

Also, analyse the worst case complexity of


the linear search method.

(e) Write adjacency-list and adjacency-matrix


representation of the following graph : 5

2. (a) Explain the following terms : 3

(i) Space complexity

(ii) Cycle in a graph

(iii) Lower bound


[3] BCS-042

(b) Traverse the following graph using DFS-


method, taking A as a starting vertex and
sequence of vertices in the order of their
appearance in traversal : 7

Also, write the time complexity of DFS


method.

3. (a) Write and explain binary search algorithm.


Explain its time complexity for best and
worst cases. 5

(b) Prove the following propositions using


mathematical induction : 5
n (n  1) (2n  1)
12  22  32  .....  n2 
6

4. (a) Define the term algorithm. Explain various


properties of an algorithm. 4

P. T. O.
[4] BCS-042

(b) Write an algorithm for multiplying two


matrices. Also find the time complexity of
this algorithm. 6

5. (a) Write Kruskal’s algorithm for finding


minimum cost spanning tree (MCST).
Apply this algorithm on the following
graph to find MCST : 8

(b) Briefly explain divide and conquer


approach of problem solving. 2

BCS–042

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy