Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

B.tech Computer Algorithms

Uploaded by

patildhan061
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

B.tech Computer Algorithms

Uploaded by

patildhan061
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

QP Code: 1585QP

Seat No. Total No. of Pages: 3

January - February (Winter) Examination - 2023


Subject Name: B.Tech. CBCS_80815_Computer Algorithms_19.01.2023_10.30 AM To 01.00 PM
Subject Code: 80815
Total
Day and Date: Thursday, 19-01-2023
Mark
Time: 10:30 am to 01:00 pm
s: 70

Instructions.:
1) All questions are compulsory
2) Figures to the right indicate full marks

Q.1. Solve MCQs. [14]


i. The word ____________comes from the name of a Persian mathematician
Abu Ja’far Mohammed ibn-i Musa al Khowarizmi.
A) Flowchart
B) Flow
C) Algorithm
D) Syntax

8
ii. The time that depends on the input: an already sorted sequence that
is easier to sort.
A) Process
B) Evaluation
C) Running
D) Input
iii. What is the other name of Dijkstra algorithm?
A) single-source shortest path problem
B) multiple-source shortest path problem
C) multiple-destination shortest path problem
D) single-destination shortest path problem
iv. Which of the following is not a variant of merge sort?
A) in-place merge sort
B) bottom up merge sort
C) top down merge sort
D) linear merge sort
v. When dynamic programming is applied to a problem, it takes far less
time as compared to other methods that don’t take advantage of
overlapping subproblems.
A) True
B) False
vi. Let S be an NP-complete problem and Q and R be two other problems
not known to be in NP. Q is polynomial time reducible to S and S is
polynomial-time reducible to R. Which one of the following statements
is true?
A) R is NP-complete
B) R is NP-hard
C) Q is NP-complete
D) Q is NP-hard
vii. Kruskal’s algorithm is a ______
A) divide and conquer algorithm
B) dynamic programming algorithm
C) greedy algorithm
D) approximation algorithm
viii. The worst case complexity of quick sort is _________
A) O(n)
B) O(log n)
C) O(n2)
D) O(n log n)
ix. Which of the following is an NP complete problem?
A) Hamiltonian cycle

8
B) Travelling salesman problem
C) Calculating chromatic number of graph
D) Finding maximum element in an array
x. Which of the following problems is NOT solved using dynamic
programming?
A) 0/1 knapsack problem
B) Matrix chain multiplication problem
C) Edit distance problem
D) Fractional knapsack problem
xi. The Data structure used in standard implementation of Breadth First
Search is?
A) Stack
B) Queue
C) Linked List
D) Tree
xii. Depth First Search is equivalent to which of the traversal in the
Binary Trees?
A) Pre-order Traversal
B) Post-order Traversal
C) Level-order Traversal
D) In-order Traversal
xiii. A greedy algorithm can be used to solve all the dynamic
programming problems.
A) True
B) False
xiv. An algorithm is
A) a piece of code to be executed.
B) a loosely written code to make final code.
C) a step by step procedure to solve problem.
D) all of the above.
Q.2. Solve any 2 of the following [14]

1. Define Algorithm. Explain characteristics of algorithm


2. Explain Merge sort algorithm with suitable example. Prove that
complexity of merge sort is o(nlogn).
3. What is the solution generated by greedy solution to job sequencing
with deadline problem. When n=5, (P1, P2, P3, P4, P5)=(45,15,20,7,65)
and (d1, d2, d3, d4, d5) = (1,3,2,1,2)
OR
Explain Prims & kruskals algorithm for finding minimum cost
spanning tree.

Q.3. Solve any 2 of the following [14]

1. What is performance measurement? Explain space and time


complexity.
2. Compare Quick Sort and merge sort.
3. Solve the following instances of knapsack problem using greedy
approach.
n=6,m=20,(P1,P2,P3,P4,P5,P6)=(12,5,15,7,6,18),(w1,w2,w3,w4,w5,w6)=

8
(2,3,5,7,1,5).

Q.4. Solve any 2 of the following [14]

1. Explain dynamic programming solution to multistage graph problem


with suitable example.
2. What is articulation point? What is biconnected graph? How to
construct a biconnected graph from non-biconnected graph
3. What is Backtracking? Explain 8-queen problem

Q.5. Solve any 2 of the following [14]

1. Note on NP hard and NP Complete problem


2. Explain Depth First Search (DFA) & Breadth First Search (BFA) with
suitable example.
3. For following graph obtain solution to TSP using dynamic
programming approach. The edge lengths are given by matrix.

You might also like