Você está na página 1de 6

DESIGN AND ANALYSIS OF ALGORITHMS

Objective
1. The _______ of an algorithm is the amount of memory it needs to run to completion. [ ] a)Time
complexity b) Space complexity c) Memory Management. d) None
2. The solid edges of depth first spanning tree of the graph are called [ ]
a)Heavy edges b) Light edges c)Dark edges d)tree edges
3. Two biconnected components can have [ ]
a)at most one vertex in common b)at most two vertex in common
c)no common vertex d)at most one edge in common
4. Traversing a tree means [ ]
a) visiting each node in the tree strictly twice b)visiting each node in the tree three times
c) visiting each node in the tree exactly once d) visiting each node in the tree four times
5. The binary search is based on the following design technique [ ]
a) Greedy approach b) Graph Search
c) Divide and conquer technique d) Convergence Method.
6. The asymptotic analysis focuses on determining _____terms in the complexity function. [ ]
a) Smallest b) Average. c) Biggest d) Smallest or Biggest.
7. ________ is the maximum no. of steps that can be executed for a given parameter [ ]
a) Best case b) worst case c) Average case d) None
8. The number of times a statement is executed is usually referred as [ ]
a) Complexity b) Frequency count c) Both A & B d) None
9. Each path through the tree represents a Element Comparisons in the _______search. [ ]
a) Binary b) Linear c) Sequence d) None
10. _________ algorithm is used to construct Minimum Spanning Tree. [ ]
a) Prims b) Kruskals c) Optimal d) none
II Fill in the blanks
11. ___________ is a finite set of instructions that is followed ,accomplishes a particular task.
12. The time complexity of Strassens matrix multiplication is____________________
13. A feasible solution that either maximizes or minimizes a given objective function is called an
____________________
14. A graph G is biconnected if and only if it contains no_____________________.
15. _______________is the greedy method that bulids minimum-cost spanning tree edge by edge.
16. An optimal code for a file is always represented by a __________, in which every leaf node has
two children.
17. The time complexity for general matrix multiplication is __________________.
18. The operation Find(i) determines the ___________ of the tree containing i.
19. Merge sort has worst case time complexity ____________
20. The pictorial representation of Algorithm is called as ____________.

Code No: 55064 Set No. 1


DESIGN AND ANALYSIS OF ALGORITHMS
KEYS
I Choose the correct alternative:
1. B
2. D
3. A
4. C
5. C
6. C
7. B
8. B
9. A
10. B
II Fill in the blanks
11. Algorithm
12. O(n2.81)
13. optimal solution
14. articulation points
15. prims algorithm
16. Spanning Tree
17. O(n3)
18. node
19. O(n2)
20. Flow Chart

Answer All Questions. All Questions Carry Equal Marks.Time: 20 Min. Marks:
10.
I Choose the correct alternative:
1. The ______ of an algorithm is the amount of memory it needs to run to completion. [ ]
a) Time complexity b) Space complexity
c) Compile time complexity d) Valid complexity
2. The time complexity of the function 3n+2 is [ ]
2

a) O(n) b) O(1) c) O(n ) d) O(n )


3. The _______ step count is the minimum number of steps that can be executed for the given
parameters. [ ]
a) average b) worst-case c) best-case d) idle-case
4. Time complexity of simple union algorithm is [ ]
2

a) O(1) b) O(n) c) O(n ) d) O(n )


5. If G is a connected undirected graph with n vertices and n-1 edges, then G is a [ ]
a) BFS graph b) DFS graph c) tree d) none
6. A graph G is biconnected if and only of contains no [ ]
a) vertex b) edge c) node d) articulation point
7. Given 2 sorted list size of m and n respectively. The number of comparisons needed in worst
case by the merge sort algorithmwill be [ ]
a) mn b) max(m,n) c) min(m,n) d) m + n - 1
8. Which of the following sorting methods sorts a given set of items that is already in order or in
reverse orderwithequalspeed? [ ]
a) heap sort b) quick sort c) insertion sort d) selection sort
9. The _______ suggests that one can devise an algorithm that works in stages,considering one input
at a time. [ ]
a) divide and conquer method b) greedy method
c) backtracking approach d) heuristic search
10. Which one of the following is not minimum-cost spanning tree algorithm? [ ]
a) Prims b) Kruskals c) Sollins d) Dijksrtas
II Fill in the blanks:
11. A ______ is the expression of an algorithm in a programming language.
12. An algorithm is a finite set of __________.
13. A maximal biconnected sub graph is a __________.
14. The time complexity of weighted union algorithm is ___________.
15. The worst-case time complexity of merge sort is _______.
16. _______ matrix multiplication reduces the time complexity when compared to conventional
matrix multiplication.
17. _______ search technique is under divide and conquer strategy.
18. Time complexity of Prims algorithm is _______.
19. The number of spanning trees in an n vertex graph can be greater than ______.
20. Any connected graph with n vertices must have at least _____ edges.

Code No: 55064 Set No. 1


DESIGN AND ANALYSIS OF ALGORITHMS
KEYS
I Choose the correct alternative:
1. B
2. A
3. C
4. B
5. C
6. D
7. D
8. B
9. B
10. D
II Fill in the blanks:
11. Program
12. Instructions
13. Biconnected components
14. O(log n)
15. O(n log n)
16. Strassens
17. Binary
2

18. O(n )
n-1

19. 2 2
20. N - 1

Code No: 54016 Set No. 1


JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
II B.Tech. II Sem., I Mid-Term Examinations, February 2013
DESIGN AND ANALYSIS OF ALGORITHMS
Objective Exam
Name: ______________________________ Hall Ticket No.
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks:
10.
I Choose the correct alternative:
1. Theta notation expresses [ ]
(A) tight bounds (B) upper bounds (C) lower bounds (D)worst cases
2. Consider the following functions:
n

f(n) = 2
g(n) = n!
log n

h(n) = n
Which of the following statements about the asymptotic behavior of f(n), g(n) and h(n) is
true? [ ]
(A) f(n) = O(g(n)); g(n) = O(h(n)) (B) f(n) = (g(n)); g(n) = O(h(n))
(C ) g(n) = O(f(n)); h(n) = O(f(n)) (D)h(n)=O(f(n));g(n)=(f(n))
3. Function g is an upper bound on function f iff for all x, [ ]
(A) g(x) f (x) (B) g(x) f (x); (C) g(x) = f(x) (D) f(x)<g(x)
4. Time taken to perform (n-1) UNIONS is [ ]
2

(A)O(n ) (B)O(n ) (C)O(n) (D)O(1)


5. How many spanning trees does the following graph have? [ ]
(A)1 (B)2 (C)3 (D)4
6. Which of the following is the best sorting algorithm [ ]
(A) Merge Sort (B) Heap Sort (C) Bubble Sort (D)Quick Sort
7. Which of the following sorting technique have same O (nlogn) complexity in all the cases? [ ]
(A) Insertion Sort (B) Quick Sort (C)Merge Sort (D)Selection sort
8. The running time of quick sort depends heavily on the selection of [ ] (A) No of inputs (B)
Arrangement of elements in array (C) Size of elements (D) Pivot element
9. Dijkstras algorithm : [ ] (A) Has greedy approach to find all shortest paths (B) Has both greedy
and Dynamic approach to find all shortest paths (C) Has greedy approach to compute single
source shortest paths to all other vertices (D) Has both greedy and dynamic approach to
compute single source shortest paths to all other vertices.
10. Which of the following statements is true about Kruskal's algorithm. [ ]
(A) It is an inefficient algorithm, and it never gives the minimum spanning tree.
(B) It is an efficient algorithm, and it always gives the minimum spanning tree.
(C) It is an efficient algorithm, but it doesn't always give the minimum spanning tree.
(D) It is an inefficient algorithm, but it always gives the minimum spanning tree.
II Fill in the blanks:
11. The running time of an algorithm is represented by following recurrence relation:
_____________represents the time complexity of the algorithm.
12. 1O(n), where O(n) stands for order n is:__________. kn
13. _______________ rule is used for FIND algorithm.

14. ____________________ Search is used for testing connected components.


15. A graph G is said to be bi-connected if and only if it contains _______________________
16. The complexity of Binary search algorithm is _____________
17. Merging 4 sorted files containing 50, 10, 25 and 15 records will take____time
18. ______________ algorithm technique is used in the implementation of Kruskal solution for the
MST.
19. ____________________property satisfies the optimal-substructure property, then a locally
optimal solution is globally optimal.
20. The Knapsack problem belongs to the domain of _______________ problems.

DESIGN AND ANALYSIS OF ALGORITHMS


Keys
I Choose the correct alternative:
1. A
2. B
3. B
4. C
5. C
6. D
7. C
8. D
9. C
10. B
II Fill in the blanks:
11. (n)
2

12. O(n )
13. Collapsing rule
14. Breadth First
15. No Articulation Point
16. O(log n)
17. O (100)
18. Greedy Technique
19. Greedy Choice
20. Optimization

Você também pode gostar