ADA (BCS401) Model Question Paper

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

BCS401

Shanti Vardhak Education Society’s

Dept. of CSE / CSE(DS)


Class : 4th Semester Max. Marks :100 Max. Time : 3:00 Hr.
Note: Answer any FIVE full questions, Choosing at least ONE question from each MODULE
Module - 1
Q. 1] A) Define algorithm. Explain asymptotic notations Big-Oh, Big-Omega and Big 10
Theta.
B) Explain Fundamentals of Algorithmic Problem-Solving steps in designing and 10
analyzing of algorithm.
OR
Q. 2] A) Apply selection sort for the word EXAMPLE to arrange in 10
alphabetical order.
B) Design bubble sort algorithm and obtain its time complexity. Apply bubble sort 10
on these elements. 45, 20, 40, 5, 15
Module - 2
Q. 3] A) What is topological sequence? Apply DFS for below graph to solve topological 10
sequence.

B) Apply insertion sorting method using decrease and conquer approach for the 10
list 30, 70, 20, 50, 40, 10, 60
OR
Q. 4] A) Apply merge sort for the string 70, 20, 30, 40, 10, 50, 60 and find it’s time 10
complexity.
B) Apply strassen’s matrix multiplication to multiply following matrices. 10
1 2 4 3
𝐴=[ ] 𝐵=[ ]
3 4 2 1
Module - 3
Q. 5] A) Sort the following list using sorting by counting algorithm 50, 30, 10, 40, 20, 10
60, 70
B) Construct a heap for the list 1, 8, 6, 5, 3, 7, 4 by successive insertion using top 10
– down approach.
OR
Q. 6] A) What is AVL Tree? Construct of an AVL tree for the list 5, 6, 8, 3, 2, 4, 7 by 10
successive insertions.
B) Construct a shift table for the pattern BABY and search for the same in the text 10
BOBBY-LIKES-BABY
Module - 4
Q. 7] A) Apply Dijkstra’s algorithm to find single source shortest path for the given 10
graph by considering F as the source vertex.

B) Apply Floyd’s algorithm to compute all pairs shortest path for the following 10
graph.

OR
Q. 8] A) Construct a Huffman code for the following data: 10
Character A B C D -
Probability 0.4 0.1 0.2 0.15 0.15
Encode the text ABACABAD and decode 100010111001010
B) Construct minimum cost spanning tree using Prim’s algorithm for the 10
following graph.

Module - 5
Q. 9] A) Apply Branch-and-bound technique for knapsack problem by taking following 10
value n=4, M=10
(P1, P2, P3, P4)=(40, 42, 25, 12) and (W1, W2, W3, W4)= (4, 7, 5, 3)

B) Drew the state space tree for solving the 4 queen’s problem by back tracking 10
method.
OR
Q. 10] A) Explain the classes of P, NP, NP complete and NP-Hard Problems. 10
B) What backtracking? Draw the state space tree of the backtracking algorithm 10
applied to the instance S={11, 13, 24, 7} and d=31 of the subset sum problem.

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