You are on page 1of 6

7 KS 03 : Design and Analysis of Algorithms (10342) A

B
C
D
------------------------------------------------------------------------------------
1) Big O notation gives A
183
A) Upper bound B) Lower bound 32
C) Middle bound D) None of these
2) This characteristic often draws the line between what is feasible and what is impossible. A
2121
A) Performance B) System evaluation 303
C) Modularity D) Reliability
3) The worst-case time complexity of Bubble sort is ---------- B
33
960
A) O(logn) B)

C) O(n) D)

4) Methods for designing efficient algorithms are D


41
A) Early detection of desired output condition 081
B) Inefficiency due to late termination
C) Avoid unnecessary referencing of arrays
D) All of the above
5) The given array is array = {1 2 4 3} Bubble sort is used to sort the array elements. B
521
How much iteration will be done to sort the array with improvised version 139
A) 4 B) 2
C) 1 D) 0
6) Which of the following problems cannot be solved using recursion? D
6221
A) Factorial of a number B) Nth Fibonacci number 020
C) Length of a string D) Problems without base case
7) State the total number of operations required for following code: for D
7326
21

A) 45 B) 43
C) 41 D) 40
8) Which of the following algorithms is not a divide & conquer algorithm by nature B
8432
A) Eudidean algorithm to compute the greatest common divisor 84
B) Heapsort
C) Cooley Turkey fast Fourier transform
D) Quicksort

1
AZ - 3399
9) Worst-case time complexity of Quicksort is -------- A
933
521
A) B)
C) D)
10) Which of the following is true about Merge Sort D12
A) Merge Sort works better than Quicksort if data is accessed from slow sequential memory 0759
B) Merge Sort is stable sort by nature
C) Merge Sort outperforms Heap Sort in most of the situations
D) All of the mentioned
11) Strassen’s algorithm is a method of type B
1939
A) Non- recursive B) Recursive 14
C) Approximation D) Accurate
12) Which of the following algorithm is similar to a convex hull algorithm D
13
A) Merge Sort B) Shell Sort 2157
C) Selection Sort D) Quick Sort
13) Consider a situation where swap operation is very costly. Which of the following sorting B
1362
algorithms should be preferred so that the number of swap operations are minimized in 30
general?
A) Heap Sort B) Selection Sort
C) Insertion Sort D) Merge Sort
14) The complexity of searching an element from a set of n elements using Binary search B
1223
algorithms is 463
A) O (n logn) B) O (logn)
C) D) O(n)

15) What is the worst case time complexity of Prim’s algorithm if adjacency matrix is used? B
14
580
A) O (log V) B)

C) D) O(V log E)

2
AZ - 3399
16) Consider the graph shown below D
121
697

Which of the following edges form, the MST of the given graph using Prim’s algorithm
starting from vertex 4.
A) (4 – 3) (5 – 3) (2 – 3) (1 – 2) B) (4 – 3) (3 – 5) (5 – 1) (1 – 2)
C) (4 – 3) (3 – 5) (5 – 2) (1 – 5) D) (4 – 3) (3 – 2) (2 – 1) (1 – 5)
17) Identify the shortest path having minimum cost to reach vertex E if A is the source vertex. B
1337
700

A) a – b – e B) a – c – e
C) a – c – d – e D) a – c – d – b – e
18) Consider a complete graph G with 4 vertices. The graph G has – spanning trees. C
191
A) 15 B) 8 88
C) 16 D) 13
19) Consider the given graph C
11
942

What is the weight of the MST using Prim’s algorithm starting from vertex a
A) 23 B) 28
C) 27 D) 11
20) Dijkstra’s Algorithm is used to solve ---------- problems B
252
A) All pairs shortest path B) Single source shortest path 05
C) Network flow D) Sorting

3 P.T.O.
AZ - 3399
21) Consider the following graph using Kruskal’s algorithm which edge will be selected first. C
21
164

A) GF B) DE
C) BE D) BG
22) Which of the following problems can be solved using Longest subsequence problem? B
2131
A) Longest increasing subsequence B) Longest palindromic subsequence 2975
C) Longest bitonic subsequence D) Longest decreasing subsequence
23) When a top down approach of dynamic programming is applied to a problem it usually -----. B
2112
A) Decreases both time and space complexity 356
B) Decreases the time complexity and increases the space complexity
C) Increases the time complexity and decreases the space complexity
D) Increases both time and space complexity
24) Consider the two matrices P and Q which are 10 x 20 and 20 x 30 matrices respy what is the D
2112
number of multiplications required to multiply the two matrices 4045
A) B)
C) D)
25) Consider the following two sequences: C
233
X = <A, B, C, D, G, H> 5319
Y = <A, E, D, F, H, C>
The longest common subsequence of X and Y is
A) AEH B) ABC
C) ADH D) ACH

4
AZ - 3399
26) Find the cost of the shortest path from S to T for the following multistage graph using A
2642
dynamic programming. 67

A) 9 B) 8
C) 10 D) 12
27) Floyd Warshall’s Algorithm is used for solving --------. A
2382
A) All pairs shortest path problems B) Single source shortest path problems 718
C) Network flow problems D) Sorting problems
28) The following sequence is a Fibonacci sequence: D
235
0, 1, 1, 2, 3, 5, 8, 13, 21 849
Which technique can be used to get the nth Fibonacci term?
A) Recursion B) Dynamic programming
C) A single for loop D) Recursion, Dynamic programming, for loops
29) How many unique colors will be required for vertex colouring of the following graph. D
273
95

A) 2 B) 4
C) 5 D) 3
30) The data structure used in standard implementation of depth First Search is? B
3171
A) Linked list B) Stack 026
C) Queue D) Tree
31) Which one the following is a correct option that provides an optimal solution for 4-queens A
3212
problem. 1393
A) (3, 1, 4, 2) B) (2, 3, 1, 4)
C) (4, 3, 2, 1) D) (4, 2, 3, 1)
32) Minimum number of unique colors required for vertex colouring of a graph is called? C
328
A) Vertex matching B) Chromatic index 247
C) Chromatic number D) Colour number

5 P.T.O.
AZ - 3399
33) Backtracking algorithm is implemented by constructing a tree of choices called as? A
352
A) State-space tree B) State-chart tree 362
C) Node tree D) Backtracking tree
34) Which of the problems cannot be solved by backtracking method? D
312
A) n-Queen problem B) Subset sum problem 4751
C) Hamiltonian circuit problem D) Traveling salesman problem
35) Which of the following is not a closure property of NP class D
3213
A) Union B) Concatenation 5708
C) Reversal D) Complement
36) Which of the following sorting procedure is the slowest? C
3214
A) Quick Sort B) Heap Sort 621
C) Shell Sort D) Bubble Sort
37) How many conditions have to be satisfied if an NP-complete problem is polynomially B
323
reducible 769
A) 1 B) 2
C) 3 D) 4
38) Which of the following problems is not NP complete? D
3223
A) Hamiltonian circuit B) Bin packing 846
C) Partition problem D) Halting problem
39) ---------- is the class of decision problems that can be solved by nondeterministic polynomial A
3121
algorithm? 9687
A) NP B) P
C) Hard D) Complete
40) Problems that can be solved in polynomial time are known as B
4323
A) Intractable B) Tractable 0834
C) Decision D) Complete

**********************

You might also like