Unit-III
In greedy methods only one decision sequence is ever generated. (True/False)
1. Multistage graph problem is classified under …………………. category of problem.
a) permutation selection problem
b) subset selection problem
c) both a and b
d) none
2. If you construct a Binary search tree for the given identifier set {for,do,while,int,if}.
Then the average number of comparisons required to search an identifier in the worst case is
…………5…..
3. The time complexity of Heap Sort algorithm is [ ]
a) O(n log n)
b) O( log n)
c) O(n2)
d) O(1)
4. In AVL Tree the Balancing factor of any node can be [ ]
a) 1,2,3
b) 1,0
c) 1,0,-1
d) None
5. In a 2-3 Tree each node should have __________ no keys. [ ]
a) 2 b)3 c)5 d)None
6. In Sets the FIND operation returns [ ]
a) Parent node
b) Root node
c) Child node
d) None
7. In a Maximum Heap the value of a node is at least as large as its ____[ ]
a) Parent
b) Root
c) Sibling
d) Children
8. In _____________ trees all the terminal nodes are at same level [ ]
a) 2-3 Trees
b) AVL Trees
c) Binary Trees
d) None
9. In Weighted Union Algorithm the set with minimum no. of nodes becomes
a) Root of the Resultant Tree [ ]
b) Child node at Level Two
c) AVL Tree
d) 2-3 Tree
10. The minimum no. of nodes in an AVL tree of Height ‘ h’ is given by n(h)=n(h-1)+n(h-2)+1
11. The minimum no. of nodes in a 2-3 tree of Height k is ____2^k-1__________
12. Write the Objective function of Knapsack problem.
13. Define Optimal & feasible Solutions
14. Write the Control abstraction of Greedy Method.
Unit -IV
1. The time complexity of In-order Tree traversal algorithm is __________ [ ]
a)(n) b) log n) c) (n2) d) (n3)
2. The Space complexity of In-order Tree traversal algorithm is __________ [ ]
a)O(n) b)O(log n) c)O(n2) d)O(n3)
3. The Space complexity of BFS algorithm is __________ [ ]
a)(n) b) (log n) c) (n2) d) (n3)
4. The Time complexity of BFS algorithm(if adjacency matrix is used to represent the graph) is
__________ [ ]
a) (n+E) b) (log n) c) (n2) d) (n3)
5. The Time complexity of DFS algorithm(if adjacency list is used to represent the graph) is
__________ [ ]
a) (n+E) b) (log n) c) (n2) d) (n3)
6. The data structure used in BFS algorithm is [ ]
a) Stack b)Queue c)Linked list d)None
7. The data structure used in DFS algorithm is [ ]
a) Stack b)Queue c)Linked list d)None
8. ___________ game is one in which there are no valid sequences of infinite length
a)Infinite b)Finite c)Cricket d)None [ ]
9. Define the Instance of a Game Tree
A particular state in the tree, representing a snapshot of the game including current positions and
possible moves.
10. The Problem reduction in computer can be represented by using [ ]
a. Multistage graph
b. Tree
c. AND/OR graph
d. OR/OR graph
11. In LC search the next E-node is selected based on _______ [ ]
a) FIRST IN FIRST OUT b)LAST IN FIRST OUT
c) RANKING FUNCTION d)All the ABOVE.
12. In LC search, the function of Least( ) is________________ [ ]
a. To find the node with least rank
b. To find least number of nodes
c. To find the least value
d. None
13. In 15-puzzle problem, g(x)= ___________________________ [ ]
a. The total number of Tiles.
b. The number of non blank Tiles with even number
c. The number of Tiles with ODD number
d. The number of non blank Tiles not in their Goal Position.
14. Intelligent ranking function c(x)=___________ [ ]
a. F(h(x)-g|(x)
b. F(h(x))
c. F(h(x))+g|(x)
d. None
NIT-V
1. The solution to the recurrence H(n) = n +root(n )· H([ ]) is [ ]
A. O(n).
B. O( ).
C. O(n log log n).
D. O(log n).
E. O(log* n).
2. Given two graphs G1 and G2, deciding if one can delete k edges from G1 and get
the graph G2 (we consider two graphs to be the same if one can rename the vertices of one graph
to get the second graph) is
A. NP-complete.
B. Solvable in polynomial time.
C. NP-hard
D. None of the above.
3. Any problem that can be solved by an algorithm that uses only O(log n) bits of memory (in
addition to the input, which resides in a read-only memory) can be solved using polynomial time."
This statement is:
A. False.
B. True.
C. False only if P = NP.
D. True only if P = NP.
4.The problem Triple 2 Coloring (deciding if the vertices of a graph G can be
partitioned into three sets S, T, V , such that the induced subgraphs GS, GT and GV are each
colorable by two colors) is
A. NP-Complete.
B. Solvable in polynomial time.
C. NP-Hard.
D. None of the above.
5 . The solution to the recurrence A(n) = A(log n) + 1 is:
A. O(1)
B. O(log log log n)
C. O(n log n).
D. O(n log n).
6). Given a boolean formula F of length n defined over 100 variables, deciding if F is satisfiable can be
done in:
A. O(2n) time, and there is no faster algorithm.
B. O(log log n) time.
C. Polynomial time.
D. This is an NP-complete problem, and it cannot be solved.