Consider the following statements: (a) Depth - first search is used to traverse a rooted tree. (b) Pre - order, Post-order and Inorder are used to list the vertices of an ordered rooted tree. (c) Huffman's algorithm is used to find an optimal binary tree with given weights. (d) Topological sorting provides a labelling such that the parents have larger labels than their children. Which of the above statements are true ? (A) (a) and (b) (B) (c) and (d) (C) (a) , (b) and (c) (D) (a), (b) , (c) and (d)

1 Answer

Answer :

(D) (a), (b) , (c) and (d)

Related questions

Description : Which of the following statements is false? (A) Optimal binary search tree construction can be performed efficiently using dynamic programming. (B) Breadth-first search cannot be used to find connected components of a graph. (C) ... used to find the components of a graph. (1) A (2) B (3) C (4) D 

Last Answer : Answer: 2

Description : The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is ............ (A) dbefacg (B) debfagc (C) dbefcga (D) debfgca

Last Answer : (D) debfgca

Description : Level order Traversal of a rooted Tree can be done by starting from root and performing: (A) Breadth First Search (B) Depth first search (C) Root search (D) Deep search

Last Answer : (A) Breadth First Search

Description : A tree with n vertices is called graceful, if its vertices can be labelled with integers 1, 2, ...,n such that the absolute value of the difference of the labels of adjacent vertices are all different. Which of the following trees are ... (B) (b) and (c) (C) (a) and (c) (D) (a), (b) and (c)

Last Answer : Answer: D

Description : A graph is said to be ……………… if the vertices can be split into two sets V1 and V2 such there are no edges between two vertices of V1 or two vertices of V2. A) Partite B) Bipartite C) Rooted D) Bisects

Last Answer : B) Bipartite

Description : Consider the situation in which assignment operation is very costly. Which of the following sorting algorithm should be performed so that the number of assignment operations is minimized in general? a) Insertion sort b) Selection sort c) Heap sort d) None

Last Answer : b) Selection sort

Description : State True of False. i) Network is a graph that has weights or costs associated with it. ii) An undirected graph which contains no cycles is called a forest. iii) A graph is said to be complete if there is no ... ) True, False, True B) True, True, False C) True, True, True D) False, True, True

Last Answer : B) True, True, False

Description : Which of the following statements is true for Branch-and-Bound search? (A) Underestimates of remaining distance may cause deviation from optimal path. (B) Overestimates can't cause right path to be ... Dynamic programming principle can be used to discard redundant partial paths. (D) All of the above

Last Answer : (C) Dynamic programming principle can be used to discard redundant partial paths.

Description : Consider the following binary search tree: If we remove the root node, which of the node from the left subtree will be the new root? (A) 11 (B) 12 (C) 13 (D) 16

Last Answer : (D) 16

Description : The inorder traversal of the following tree is: (A) 2 3 4 6 7 13 15 17 18 18 20 (B) 20 18 18 17 15 13 7 6 4 3 2 (C) 15 13 20 4 7 17 18 2 3 6 18 (D) 2 4 3 13 7 6 15 17 20 18 18

Last Answer : Answer: D 

Description : Let us assume that you construct ordered tree to represent the compound proposition (~(p˄q))↔(~p˅~q). Then, the prefix expression and post-fix expression determined using this ordered tree are given as ........... and .......... ... ~p~q~˅↔ (C) ↔~˄pq˅ ~~pq, pq˄~p~ ~q˅↔ (D) ↔~˄pq˅ ~p~q, pq˄~p~~q˅↔

Last Answer : (B) ↔~˄pq˅ ~p~q, pq˄~p~q~˅↔

Description : Suppose you are given a binary tree with n nodes, such that each node has exactly either zero or two children. The maximum height of the tree will be (A) n/2 - 1 (B) n/2 + 1 (C) (n-1)/2 (D) (n+1)/2

Last Answer : (C) (n-1)/2

Description : Consider f(N) = g(N) + h(N) Where function g is a measure of the cost of getting from the start node to the current node N and h is an estimate of additional cost of getting from the current ... ? (A) A* algorithm (B) AO* algorithm (C) Greedy best first search algorithm (D) Iterative A* algorithm

Last Answer : (C) Greedy best first search algorithm

Description : In ……………, search start at the beginning of the list and check every element in the list. A) Linear search B) Binary search C) Hash Search D) Binary Tree search

Last Answer : A) Linear search

Description : Consider the following statements : (a) Boolean expressions and logic networks correspond to labelled acyclic digraphs. (b) Optimal Boolean expressions may not correspond to simplest networks. (c) Choosing essential blocks first in a Karnaugh map ... (b) only (C) (a) and (b) (D) (a), (b) and (c)

Last Answer : (D) (a), (b) and (c) 

Description : The runtime for traversing all the nodes of a binary search tree with n nodes and printing them in an order is (A) O(lg n) (B) O(n lg n) (C) O(n) (D) O(n2 ) 

Last Answer : (C) O(n) 

Description : If h* represents an estimate of the cost of getting from the current node N to the goal node and h represents actual cost of getting from current node to the goal node, then A* algorithm gives an optimal solution ... h* us equal to h (B) h* overestimates h (C) h* underestimates h (D) none of these

Last Answer : (C) h* underestimates h

Description : Which of the following sorting algorithm has the running time that is least dependant on the initial ordering of the input? a) Insertion sort b) Quick sort c) Merge sort d) Selection sort

Last Answer : d) Selection sort

Description : Which of the following sorting algorithm is in-place a) Counting sort b) Radix sort c) Bucket sort d) None

Last Answer : b) Radix sort

Description : Which of the following is not an in-place sorting algorithm? a) Selection sort b) Heap sort c) Quick sort d) Merge sort

Last Answer : merge sort

Description : Which of the following is a stable sorting algorithm? a) Merge sort b) Typical in-place quick sort c) Heap sort d) Selection sort

Last Answer : a) Merge sort

Description : Which of the following is not a stable sorting algorithm? a) Insertion sort b) Selection sort c) Bubble sort d) Merge sort

Last Answer : b) Selection sort

Description : Consider the following statements for priority queue: S1: It is a data structure in which the intrinsic ordering of the elements does determine the result of its basic operations. S2: The elements of a priority queue ... . (C) SI is incorrect and S2 is correct. (D) Both S1 and S2 are correct.

Last Answer : (D) Both S1 and S2 are correct.

Description : A complete, local search algorithm always finds goal if one exists, an optimal algorithm always finds a global minimum/maximum. a) True b) False

Last Answer : a) True

Description : Which of the following statement is true? i) Using singly linked lists and circular list, it is not possible to traverse the list backwards. ii) To find the predecessor, it is required to traverse the list from the first ... linked list. A) i-only B) ii-only C) Both i and ii D) None of both

Last Answer : C) Both i and ii

Description : In perspective projection, if a line segment joining a point which lies in front of the viewer to a point in back of the viewer is projected to a broken line of infinite extent. This is known ... ....... (A) View confusion (B) Vanishing point (C) Topological distortion (D) Perspective foreshortening

Last Answer : (C) Topological distortion 

Description : Consider a disk queue with I/O requests on the following cylinders in their arriving order: 6,10,12,54,97,73,128,15,44,110,34,45 The disk head is assumed to be at cylinder 23 and moving in the direction ... . The disk head movement using SCAN-scheduling algorithm is: (1) 172 (2) 173 (3) 227 (4) 228

Last Answer : (2) 173

Description : Consider a single perception with weights as given in the following figure: The above perception can solve (A) OR problem (B) AND problem (C) XOR problem (D) All of the above

Last Answer : (B) AND problem

Description : You have to sort a list L, consisting of a sorted list followed by a few ‘random’ elements. Which of the following sorting method would be most suitable for such a task ? (A) Bubble sort (B) Selection sort (C) Quick sort (D) Insertion sort

Last Answer : (D) Insertion sort

Description : Which of the following statements is incorrect for Parallel Virtual Machine (PVM)? (A) The PVM Communication model provides asynchronous blocking send, asynchronous blocking receive and non-blocking receive function. ... of such messages. (D) In PVM Model, the message order is not preserved. 

Last Answer : (D) In PVM Model, the message order is not preserved.

Description : What is the best method to go for the game playing problem? (1) Optimal Search (2) Random Search (3) Heuristic Search (4) Stratified Search 

Last Answer : (3) Heuristic Search

Description : A binary search tree whose left subtree and right subtree differ in hight by at most 1 unit is called A) AVL tree B) Red-black tree C) Lemma tree D) None of the above

Last Answer : A) AVL tree

Description : Suppose that we have numbers between 1 and 1000 in a binary search tree and want to search for the number 364. Which of the following sequences could not be the sequence of nodes examined? (A) 925, 221, 912, 245, 899, ... 926, 203, 912, 241, 913, 246, 364 (D) 3, 253, 402, 399, 331, 345, 398, 364 

Last Answer : (C) 926, 203, 912, 241, 913, 246, 364

Description : The order of a leaf node in a B+ tree is the maximum number of children it can have. Suppose that block size is 1 kilobytes, the child pointer takes 7 bytes long and search field value takes 14 bytes long. The order of the leaf node is ............ (1) 16 (2) 63 (3) 64 (4) 65

Last Answer : Answer: All

Description : Let R be the rectangular window against which the lines are to be clipped using 2D Sutherland-Cohen line clipping algorithm. The rectangular window has lower left-hand corner at (-5,1) and upper righthand corner at (3,7). ... s) is/are candidate for clipping? (A) AB (B) CD (C) EF (D) AB and CD

Last Answer : (D) AB and CD

Description : Consider a program that consists of 8 pages (from 0 to 7) and we have 4 page frames in the physical memory for the pages. The page reference string is :  1 2 3 2 5 6 3 4 6 3 7 3 1 5 3 6 3 4 2 4 3 4 5 ... to fill available page frames with pages): (A) 9 and 6 (B) 10 and 7 (C) 9 and 7 (D) 10 and 6

Last Answer : (B) 10 and 7

Description : Given the following statements : S1 : SLR uses follow information to guide reductions. In case of LR and LALR parsers, the look-aheads are associated with the items and they make use of the left context available to ... (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.

Last Answer : (D) S1 is correct and S2 is correct.

Description : State True or False. i) Binary search is used for searching in a sorted array. ii) The time complexity of binary search is O(logn). A) True, False B) False, True C) False, False D) True, True

Last Answer : D) True, True

Description : Consider the following two statements: (a) A publicly derived class is a subtype of its base class. (b) Inheritance provides for code reuse. Which of the following statements is correct? (A) Both the statements ( ... ) is correct and (b) is incorrect (D) Statement (a) is incorrect and (b) is correct

Last Answer : Answer: A

Description : How do you do an optimal binary search on a two variable function?

Last Answer : You need to clarify your terminology a little bit. Symmetric about the diagonal? Strictly increasing with respect to which ordering of the pairs?

Description : Which of the following statements is not true about disk-arm scheduling algorithms ? (A) SSTF (shortest seek time first) algorithm increases performance of FCFS. (B) The number of requests for disk ... arm movements. (D) SCAN and C-SCAN algorithms are less likely to have a starvation problem.

Last Answer : (B) The number of requests for disk service are not influenced by file allocation method.

Description : Which of the following statements is not true for Multi Level Feedback Queue processor scheduling algorithm? (A) Queues have different priorities. (B) Each queue may have different scheduling algorithm (C) ... to a queue (D) This algorithm can be configured to match a specific system under design

Last Answer : (C) Processes are permanently assigned to a queue

Description : A vertex cover of an undirected graph G(V, E) is a subset V1 ⊆ V vertices such that (A) Each pair of vertices in V1 is connected by an edge (B) If (u, v) ∈ E then u ∈ V1 and v ∈ V1 (C) If (u, v) ∈ E then u ∈ V1 or v ∈ V1 (D) All pairs of vertices in V1 are not connected by an edge

Last Answer : (C) If (u, v) ∈ E then u ∈ V1 or v ∈ V1

Description : The average case occurs in the Linear Search Algorithm when: (A) The item to be searched is in some where middle of the Array (B) The item to be searched is not in the array (C) The item to be searched is in the last of the array (D) The item to be searched is either in the last or not in the array

Last Answer : (A) The item to be searched is in some where middle of the Array

Description : Which search is complete and optimal when h(n) is consistent? a) Best-first search b) Depth-first search c) Both Best-first & Depth-first search d) A* search

Last Answer : d) A* search

Description : Which search method takes less memory? a) Depth-First Search b) Breadth-First search c) Linear Search d) Optimal search

Last Answer : a) Depth-First Search

Description : Which search method takes less memory? a) Depth-First Search b) Breadth-First search c) Optimal search d) Linear Search

Last Answer : a) Depth-First Search

Description : Given two sorted list of size 'm' and 'n' respectively. The number of comparison needed in the worst case by the merge sort algorithm will be (A) m x n (B) max (m, n) (C) min (m, n) (D) m + n – 1

Last Answer :  (D) m + n – 1