[go: up one dir, main page]

0% found this document useful (0 votes)
557 views92 pages

CS502 Quiz-3 by Vu Topper RM-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
557 views92 pages

CS502 Quiz-3 by Vu Topper RM-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 92

CS502-Fundamentals

Of Algorithms
Update MCQ’S Quiz-3 File
@vutopperrm Vu Topper RM

d
cc

For More Help Contact What’s app 03224021365


In chain matrix multiplication, the order of the matrices__________.
A. is equal
B. is reverse
C. can not be changed
D. can be changed

In Knapsack Problem, each item must be entirely accepted or rejected, is


called _______ problem.
A. Linear
B. Fractional
C. 0-1
D. Optimal

In Dynamic Programming based solution of Knapsack Problem, if we


decide to take an object 'i', then we gain _______.
A. W(Total Weight of Knapsack)
B. V (Total Value of all items)
C. vi (Value of object i) Page 93
D. None of the given option

In chain matrix multiplication, table is filled ______ to find the


multiplication of matrix.
A. row wise
B. column wise
C. diagonally
D. bottom-to-up Page 86

In chain matrix multiplication, if there are n items, there are ______


ways in which outer most pair of parentheses can placed.
A. n^2
B. 2n
C. n+1
D. n-1 Page 85

For More Help Contact What’s app 03224021365


Catalan numbers are related the number of different ______ on 'n' nodes.
A. Arrays
B. linked lists
C. binary trees Page 85
D. functions

What is the value of k in the given equation?


m[1, 5] = m[1, 3] + m[4, 5] + p0 · p3 · p5
A. 3
B. 1
C. 4
D. 5

The running time of brute-force algorithm to solve Knapsack problem is


_________.
A. O(n!)
B. O(2^n)
C. O(n)
D. O(n3)

What is the value of k in the given equation?


m[2, 5] = m[2, 3] + m[4, 5] + p1 · p3 · p5
A. 3
B. 5
C. 2
D. 4

We can't utilize a divide-and-conquer strategy for Chain Matrix


Multiplication because ____________.
A. Size of data is not given
B. We can easily perform it in linear time
C. We use divide and conquer for sorting only
D. We do not know the optimum k

For More Help Contact What’s app 03224021365


Suppose we have 5 matrices A, B, C, D and E. What is the correct
expansion of m[3,4] in chain matrix multiplication?
A. m[3, 4] = m[3, 4] + m[4, 4] + p2 · p3 · p4
B. m[3, 4] = m[3, 3] + m[3, 4] + p2 · p3 · p4
C. m[3, 4] = m[3, 3] + m[4, 4] + p0 · p3 · p4
D. m[3, 4] = m[3, 3] + m[4, 4] + p2 · p3 · p4

Time complexity of activity selection algorithm is _________.


A. O(logN2)
B. O(NlogN)
C. O(logN)
D. O(N)

If we have 6 metrices in chain matrix multiplication problem then the


number of table entries must be?
A. 12
B. 25
C. 30
D. 36 Google

Counting Money problem:


A. Can be solved by simple recursive algorithm
B. Can be optimally solved by greedy algorithm
C. can not be optimally solved by greedy algorithm
D. Can not be solved by brute force algorithm

Time complexity of Dynamic Programming based algorithm for


computing the minimum cost of Chain MatrixMultiplication is
________.
A. Log n
B. n
C. n^2 (n square)
D. n^3 (ncube) Page 90

For More Help Contact What’s app 03224021365


_____________ items are not allowed in the 0/1 knapsack.
A. Lighter
B. Whole
C. Weighty
D. Fractional

If matrix A of dimension p x q is multiplied with matrix B of dimension


q x r, then each entry in resultant matrix takes __________ time.
A. O (q) Page 84
B. (1)
C. (p x q)
D. (q x r)

In Activity scheduling algorithm, the width of a rectangle ____________


A. Directs towards recursion
B. Indicates the duration of an activity
C. Is always ignored
D. Should be maximized

What will be value of the matrices product (A A )A ? if A = 5*6 A = 6*7


A = 7*2.
A. 290
B. 280
C. 250
D. 270

Which of the following algorithms is the best approach for solving


Huffman codes?
A. Divide/conquer algorithm
B. Brute force algorithm
C. Greedy algorithm
D. Exhaustive search

For More Help Contact What’s app 03224021365


Using base condition we set all m[i,i] = ___________ ?
A. 1
B. 0 Page 86
C. ∞
D. -1

What will be value of the matrices product (A A )A ? if A = 5*3 A = 3*7


A = 7*2.
A. 180
B. 175
C. 88
D. 80

In Huffman encoding fixed-length codes are popular because it is very


easy to break up a______ into its individual_________.
A. Number, String
B. Floating number, String
C. Character, Number
D. String, Characters

The _____________is a problem for which the greedy algorithm


approach provides an optimal solution.
A. Knapsack Problem
B. NP complete problem
C. Dynamic programming
D. Activity selection

Consider the string “ abcdaacac”. if the string is coded with ASCII


codes, the message length would be___________________.
A. 72 bits
B. 60 bits
C. 90 bits
D. 70 bits

For More Help Contact What’s app 03224021365


The formula for calculating the Catalan number is ____________.

Page 85

Dynamic programming formulation of the matrix chain multiplication


problem will store the solutions of each sub problem in a(n):
A. Class
B. Array
C. Table
D. Variable

Consider two matrices A and B, where A is 10*30 and B is 30*40. What


is correct number of multiplications require to multiply A and B?
A. 30*40
B. 10*30
C. 30*30
D. 10*30*40

Which of the following is true about Huffman Coding?


A. In Huffman coding, no code is prefix of any other code
B. Huffman Codes may not be optimal lossless codes in some cases
C. Huffman coding is not an efficient coding way
D. Huffman coding may become lossy in some cases

For More Help Contact What’s app 03224021365


The optimal solution to a problem is a combination of optimal solutions
to its subproblems. This is known as________________________.
A. Principle of feasibility
B. Principle of locality
C. Principle of computation
D. Principle of optimality

You are given a knapsack that can carry a maximum weight of 60. There
are 4 items with weights {20, 30, 40, 70} and values {90, 80, 100, 250}.
What is the maximum value of the items you can carry using the
knapsack?
A. 270
B. 190
C. 520
D. 170

In Huffman Encoding, the characters with smallest probabilities are


placed at the ________ depth of the tree.
A. Root
B. Minimum
C. Maximum
D. Average

Which one of the following problems can be solved using dynamic


problem?
A. Bubble sort problem
B. Greedy search problem
C. Fractional knapsack problem
D. Matrix chain multiplication problem Page 85

Huffman algorithm uses a ___________________to generate a prefix


code T that minimizes the expected length B(T) of the encoded string.
A. Heuristic Approach

For More Help Contact What’s app 03224021365


B. Null Approach
C. Greedy Approach
D. Dynamic Programming

If a matrix has three rows and two columns, then dimensions of matrix
will be:
A. 3×2
B. 2×3
C. 3×3
D. 2×2

In general, the activity selection problem is to select a ___________.


A. maximum-size set of mutually non-interfering activities
B. minimum-size set of mutually non-interfering activities
C. maximum-size set of interfering activities
D. minimum-size set of interfering activities

We can multiply two matrices A and B only when they are compatible
which means:
A. Number of rows and columns do not matter
B. Number of rows in A must be equal to number of rows in B
C. Number of columns in A must be equal to number of rows in B
Page 84
D. Number of columns in A must be equal to number of columns in B

In context of activity selection algorithm, time is dominated by sorting


of the activities by _________.
A. Finish Times
B. Start Times
C. Average Times
D. CPU Burst Times

For More Help Contact What’s app 03224021365


Question No:1 (Marks:1) Vu-Topper RM
Algorithm allows negative weights edges and no negative cost cycles.
A. Brute-force technique
B. Bellman-Ford Page 159
C. Dijkstra’s
D. Print

Question No:2 (Marks:1) Vu-Topper RM


In Prim's algorithm, we start with the _______ vertex r; it can be any
vertex.
A. Root Page 149
B. Pivot
C. Leaf
D. Negative

Question No:3 (Marks:1) Vu-Topper RM


Overall Running time of Prim's algorithm is _______.
A. Θ(ElogE)
B. Θ(ElogV)
C. Θ((V+E)logV) Page 152
D. Θ((V+E)logE)

Question No:4 (Marks:1) Vu-Topper RM


Problems such as the shortest route between cities can be solved
efficiently by modeling the road map as a______________.
A. Tree
B. Stack
C. Graph Google
D. Linked list

Question No:5 (Marks:1) Vu-Topper RM


In Kruskal's algorithm, the next edge is added to viable set A, if its
adding does not induce a/an __________ .

For More Help Contact What’s app 03224021365


A. Tree
B. Edge
C. Cycle Page 147
D. Vertex

Question No:6 (Marks:1) Vu-Topper RM


Bellman-Ford algorithm is used to solve ____________ problems.
A. Flow of networking
B. All pair shortest path
C. Single source shortest path Google
D. Double source shortest path

Question No:7 (Marks:1) Vu-Topper RM


In Prim's algorithm, If the color of a vertex is __________,then it is in S
otherwise not.
A. Blue
B. Gray
C. Black Page 151
D. White

Question No:8 (Marks:1) Vu-Topper RM


Keeping in mind the shortest-path, if given scenarios occur in computer
networks like the internet where data packets have to be routed. The
vertices are_________and Edges are _____________which may be
wired or wireless.
A. Internet, routers
B. Routers, internet
C. Communication links, routers
D. Routers, communication links Page 153

Question No:9 (Marks:1) Vu-Topper RM


Dijkstra’s algorithm :
A. Has greedy approach to find all shortest paths

For More Help Contact What’s app 03224021365


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 Page 154
D. Has both greedy and dynamic approach to compute single source
shortest paths to all other vertices.

Question No:10 (Marks:1) Vu-Topper RM


In Dijkstra’s algorithm, initially the estimated value from source vertex
to any vertex v is:
A. One (1)
B. Zero (0)
C. Infinity (∞) Page 154
D. Minus one (-1)

Question No:11 (Marks:1) Vu-Topper RM


From the given option’s which one is correct regarding the time
complexity of Dijkstra’s algorithm:
A. O(N)
B. O(N^2) Google
C. O(N^3)
D. O(log N)

Question No:12 (Marks:1) Vu-Topper RM


In Bellman-Ford Algorithm, relaxation applies to ____________ of the
graph.
A. Every edge Page 159
B. Every Vertices
C. Only First edge
D. Only First Vertices

Question No:13 (Marks:1) Vu-Topper RM


The key[u] is the weight of the __________ going from u to any vertex
in S.

For More Help Contact What’s app 03224021365


A. Edge
B. lighter edge
C. lightest edge Page 151
D. heavier edge

Question No:14 (Marks:1) Vu-Topper RM


In Bellman-Ford Algorithm, path consists of at most _________ edges.
A. V-1 Page 160
B. E+1
C. V+1
D. E-1

Question No:15 (Marks:1) Vu-Topper RM


Overall time for Kruskal algorithm is:
A. Θ(logE)
B. Θ(VlogE)
C. Θ(ElogV) Page 149
D. Θ(ElogE)

Question No:16 (Marks:1) Vu-Topper RM


A graph may contain ------------------------.
A. No MST
B. One or zero MST
C. Exactly one MST
D. More than one MST Google

Question No:17 (Marks:1) Vu-Topper RM


In which algorithm, information of shortest path is propagated
sequentially along each shortest path in the graph.
A. Prim’s
B. Dijkstra’s
C. Bellman-Ford Page 16
D. Brute-force technique

For More Help Contact What’s app 03224021365


Question No:18 (Marks:1) Vu-Topper RM
Edge weights can be interpreted as distance _________.
A. in breadth-First Search
B. in Queue's
C. in the shortest-paths Page 153
D. in depth-First Search

Question No:19 (Marks:1) Vu-Topper RM


In the shortest-paths problem, we are given a weighted of___________G
= (V, E).
A. Line graph
B. Directed graph Page 153
C. Weighted graph
D. Un-directed graph

Question No:20 (Marks:1) Vu-Topper RM


Kruskal's algorithm (choose best non-cycle edge) is better than Prim's
(choose best tree edge) when the __________ has relatively few
__________.
A. tree, edges
B. graph, edges Google
C. tree, branches
D. graph, branches

Question No:21 (Marks:1) Vu-Topper RM


From given algorithms which one considered as best for finding the
shortest-path:
A. BFS
B. DFS
C. Dijkstra's algorithm Page 154
D. Bellman-Ford algorithm

For More Help Contact What’s app 03224021365


Question No:22 (Marks:1) Vu-Topper RM
Finding the faster result of the shortest path from u to v for every pair of
vertices u and v we use__________.
A. both I and II
B. All-pairs shortest-paths problem Page 153
C. Two-pairs shortest-paths problem
D. Single-pairs shortest-paths problem

Question No:23 (Marks:1) Vu-Topper RM


The running time of Bellman-Ford Algorithm is _________.
A. Θ(VE) Page 159
B. Θ(E + E)
C. Θ(V + E)
D. Θ(V + V)

Question No:24 (Marks:1) Vu-Topper RM


Dijkstra’s algorithm is a simple________ algorithm for computing the
single-source shortest-paths to all other vertices.
A. Greedy Page 154
B. Brute-Force
C. Bellman-Ford
D. Divide and conquer

Question No:25 (Marks:1) Vu-Topper RM


In Prim's algorithm, we will make use of_______________.
A. List
B. Array
C. Stack
D. Priority Queue Page 150

Question No:26 (Marks:1) Vu-Topper RM


What is the time complexity to extract a vertex from the priority queue
in Prim’s algorithm?

For More Help Contact What’s app 03224021365


A. (log E)
B. (V)
C. (V+E)
D. O(log V) Page 152

Question No:27 (Marks:1) Vu-Topper RM


Bellman-Ford Algorithm does not allow G(graph) to have _________.
A. positive cost cycles
B. negative cost cycles Page 159
C. positive weights edges
D. negative weights edges

Question No:28 (Marks:1) Vu-Topper RM


Which of the following statement is false about Dijkstra’s Algorithm?
A. It works on a weighted directed graph
B. It is used to solve Single-source shortest path
C. It can be applied on graphs having a negative weight function
D. Its implementation in data structure is possible through the priority
queue

Question No:29 (Marks:1) Vu-Topper RM


In ________ algorithm(s), at any time, the subset of edges A forms a
single tree.
A. BFS
B. Prim's Page 149
C. Kruskal's
D. kruskal's and Prim's

Question No:30 (Marks:1) Vu-Topper RM


Floyd-Warshall Algorithm is based on ___________.
A. Complexity theory
B. Greedy Approach
C. Divide and Conquer

For More Help Contact What’s app 03224021365


D. Dynamic Programming Page 161

Question No:31 (Marks:1) Vu-Topper RM


Dijkstra’s Algorithm cannot be applied on ______________.
A. unweighted graphs
B. directed and weighted graphs
C. undirected and unweighted graphs
D. graphs having negative weight function

Question No:32 (Marks:1) Vu-Topper RM


Bellman-Ford algorithm is slower than_______________.
A. Prim’s
B. Dijkstra’s Page 159
C. Graph Algorithm
D. Brute-force technique

Question No:33 (Marks:1) Vu-Topper RM


In Bellman-Ford Algorithm, relaxation applies to every edge of the
graph and repeat this _____ time.
A. V-1 Page 159
B. E-1
C. V+1
D. E+1

Question No:34 (Marks:1) Vu-Topper RM


Which of the following is used in the data structure for implementing
Dijkstra’s Algorithm?
A. Stack’s
B. Max heap
C. Priority queue Google
D. Circular queue

For More Help Contact What’s app 03224021365


Question No:35 (Marks:1) Vu-Topper RM
In Prim’s algorithm, If there is no edge from u to a vertex in S, we set
the key value to___________.
A. 0
B. -1
C. ∞ Page 151
D. 1

Question No:36 (Marks:1) Vu-Topper RM


Prim’s algorithm is based on ---------------- strategy.
A. Greedy Page 150
B. Exponential
C. Divide and Conquer
D. Dynamic programming

Question No:37 (Marks:1) Vu-Topper RM


Dijkstra’s Algorithm is used to solve____________problems.
A. Sorting & searching
B. All-pair shortest path
C. Multi-source shortest path
D. Single-source shortest path Page 154

Question No:38 (Marks:1) Vu-Topper RM


The process of updating estimates in Dijkstra’s algorithm is
called_____________.
A. Insertion
B. Updating
C. Relaxation Page 154
D. Amendment

Question No:39 (Marks:1) Vu-Topper RM


___________is commonly the running time of Dijkstra’s Algorithm
using the binary heap method.

For More Help Contact What’s app 03224021365


A. Θ(log E)
B. Θ(Vlog)
C. Θ(E log V) Page 156
D. Θ(Blog V)

Question No:40 (Marks:1) Vu-Topper RM


Kruskal’s algorithm works by adding ________ in increasing order of
weight (lightest edge first).
A. Trees
B. Edges Page 147
C. Vertices
D. Weights

Question No:41 (Marks:1) Vu-Topper RM


Dijkstra’s algorithm works on a weighted directed graph G =(V, E) in
which all_______weights are non-negative.
A. links
B. Edges Page 154
C. Nodes
D. Vertices

Question No:42 (Marks:1) Vu-Topper RM


In Kruskal's algorithm, the next ________ is not added to viable set A, if
its adding induce a/an cycle.
A. Tree
B. Edge
C. Cycle Page 147
D. Vertex

Question No:43 (Marks:1) Vu-Topper RM


The breadth-first-search algorithm is a shortest-path algorithm that
works on__________graphs.
A. Directed

For More Help Contact What’s app 03224021365


B. Weighted
C. Un-directed
D. Un-weighted Page 153

Question No:44 (Marks:1) Vu-Topper RM


An un-weighted graph can be considered as a graph in which every edge
has weight_______unit.
A. 1 Page 153
B. 3
C. 5
D. 7

Question No:45 (Marks:1) Vu-Topper RM


The tricky part of __________ algorithm(s) is/are, how to detect whether
the addition of an edge will create a cycle in viable set A.
A. DFS
B. Prim's
C. Kruskal's Page 159
D. Both Krusal's and Prim's

Question No:46 (Marks:1) Vu-Topper RM


As the Kruskal's algorithm runs, the edges in viable set A induce a
_________ on the vertices.
A. Set
B. Tree
C. Graph
D. Forest Page 147

Question No:47 (Marks:1) Vu-Topper RM


In Dijkstra’s algorithm the estimated value of source vertex d[s] is:
A. Equal to 1
B. Equal to 0 Page 154
C. Greater than 0

For More Help Contact What’s app 03224021365


D. Greater than 1

Question No:48 (Marks:1) Vu-Topper RM


Equivalence relation partitions the vertices into _________ classes of
mutually reachable vertices and these are the strong components
A. Variance
B. Non classes
C. Equivalence Page 136
D. Non equivalence

Question No:49 (Marks:1) Vu-Topper RM


The ancestor and descendent relation can be nicely inferred by the
______________ lemma.
A. Node
B. Division
C. Addition
D. Parenthesis Page 129

Question No:50 (Marks:1) Vu-Topper RM


Networks are ________ in the sense that it is possible from any location
in the network to reach any other location in the digraph.
A. Not graphs.
B. Complete Page 135
C. Incomplete
D. Transportation

Question No:51 (Marks:1) Vu-Topper RM


In strong components algorithm, first of all DFS is run for getting
_______ times of vertices.
A. Start Page 138
B. Finish
C. Middle
D. Both start & finish

For More Help Contact What’s app 03224021365


Question No:52 (Marks:1) Vu-Topper RM
Timestamp structure of __________ is used in determining the strong
components of a digraph.
A. DFS Google
B. BFS
C. MST
D. Both DFS, BFS

Question No:53 (Marks:1) Vu-Topper RM


In Timestamped DFS-cycles lemma, if edge (u, v) is a tree, forward or
cross edge, then _________
A. f[u]>f[v]
B. f[u]<f[v]
C. f[u]⩽f[v]
D. f[u]⩾f[v]

Question No:54 (Marks:1) Vu-Topper RM


The component digraph is necessarily _____________.
A. Cyclic
B. Strong
C. Acyclic Page 136
D. Straight

Question No:55 (Marks:1) Vu-Topper RM


In computing the ____________ components of a digraph, vertices of
the digraph are partitioned into subsets.
A. Best
B. Worst
C. Weakly connected
D. Strongly connected Page 135

Question No:56 (Marks:1) Vu-Topper RM


There exist a unique path between any ________ vertices of a free tree.

For More Help Contact What’s app 03224021365


A. One
B. Two
C. five
D. three

Question No:57 (Marks:1) Vu-Topper RM


The ________ given by DFS allow us to determine whether the graph
contains any cycles.
A. Order
B. Time stamps Page 130
C. BFS traversing
D. Topological sort

Question No:58 (Marks:1) Vu-Topper RM


Forward edge is:
A. (u, v) where u is a proper descendent of v in the tree.
B. (u, v) where v is a proper descendent of u in the tree.
Page 129
C. (u, v) where v is a proper ancesstor of u in the tree.
D. (u, v) where u is a proper ancesstor of v in the tree.

Question No:59 (Marks:1) Vu-Topper RM


Once you enter a strong component, every vertex in thecomponent is
_________.
A. Removed
B. Reachable Page 137
C. not reachable
D. reachable some times

Question No:60 (Marks:1) Vu-Topper RM


In Generic approach determining of Greedy MST, we maintain a subset
A of __________ .
A. Paths

For More Help Contact What’s app 03224021365


B. Edges Page 143
C. Cycles
D. Vertices

Question No:61 (Marks:1) Vu-Topper RM


If you find yourself in maze the better traversel approach will be :
A. DFS
B. BFS
C. Level order
D. DFS

Question No:62 (Marks:1) Vu-Topper RM


Computing the strongly connected components of a digraph is a/an
___________ of the problem to determine whether a digraph is strongly
connected or not.
A. Size
B. Connection
C. Optimization
D. Generalization Page 135

Question No:63 (Marks:1) Vu-Topper RM


A free tree with n _________ have exactly n-1 _________.
A. vertices,edges Page 142
B. vertices,nodes
C. nodes,vertices
D. vertices,nodes

Question No:64 (Marks:1) Vu-Topper RM


____________ components are not affected by reversal of all edges in
terms of vertices reachability.
A. First two
B. Last two
C. Weakly connected

For More Help Contact What’s app 03224021365


D. Strongly connected Page 139

Question No:65 (Marks:1) Vu-Topper RM


Adding any edge to a free tree creates a unique ______ .
A. Vertex
B. Cycle Page 142
C. Edge
D. Strong component

Question No:66 (Marks:1) Vu-Topper RM


In computing the strongly connected components of a digraph, vertices
of the digraph are _______ into subsets.
A. Joined
B. Deleted
C. Created
D. Partitioned Page 135

Question No:67 (Marks:1) Vu-Topper RM


For _____________ graphs, there is no distinction between forward and
back edges.
A. Large
B. Medium
C. Directed
D. Undirected Page 130

Question No:68 (Marks:1) Vu-Topper RM


A topological sort of a DAG is a __________ ordering of the vertices of
the DAG such that for each edge (u, v), u appears before v in the
ordering.
A. Linear Page 134
B. Parallel
C. Sequence
D. Non-Linea

For More Help Contact What’s app 03224021365


Question No:69 (Marks:1) Vu-Topper RM
By breaking any edge on a cycle created in free tree, the free _________
is restored.
A. Tree Page 142
B. Edge
C. Cycle
D. Vertex

Question No:70 (Marks:1) Vu-Topper RM


Which technique is used in the implementation of Kruskal solution for
the MST?
A. Greedy Technique Page 142
B. Divide-and-Conquer Technique
C. Dynamic Programming Technique
D. The algorithm combines more than one of the above techniques i.e.
Divide-and-Conquer and Dynamic Programming

Question No:71 (Marks:1) Vu-Topper RM


A strongly connected component only apply to:
A. Directed Graph Page 135
B. Undirected Graph
C. Breadth First Search
D. Minimum Spanning Tree

Question No:72 (Marks:1) Vu-Topper RM


The relationship between number of back edges and number of cycles
in DFS is,
A. Both are equal
B. Back edges are half of cycles
C. Back edges are one quarter of cycles
D. There is no relationship between no. of edges and cycles
Page 131

For More Help Contact What’s app 03224021365


Question No:73 (Marks:1) Vu-Topper RM
Digraphs ________ in communication and transportation networks.
A. are used Page 135
B. are not used
C. parts are used
D. final value is used

Question No:74 (Marks:1) Vu-Topper RM


Back edge is:
A. (u, v) where v is an ancestor of u in the tree. Page 128
B. (u,v) where u is an ancesstor of v in the tree.
C. (u, v) where v is an predcessor of u in the tree.
D. None of above

Question No:75 (Marks:1) Vu-Topper RM


There are no ________ edges in undirected graph.
A. Back
B. Both
C. Cross Page 130
D. Forward

Question No:76 (Marks:1) Vu-Topper RM


In strong components algorithm, the form of graph is used in which all
the _________ of original graph G have been reversed in direction.
A. Edges Page 138
B. Trees
C. Vertices
D. Both edges & vertices

Question No:77 (Marks:1) Vu-Topper RM


Which activity creates a unique cycle in a free tree:
A. adding root
B. adding any edge Page 142

For More Help Contact What’s app 03224021365


C. adding any vertex
D. adding any sub tree

Question No:78 (Marks:1) Vu-Topper RM


You have an adjacency list for G, what is the time complexity to
compute Graph transpose G^T.?
A. (V + E) Page 138
B. (V E)
C. (V)
D. (V^2)

Question No:79 (Marks:1) Vu-Topper RM


The time complexity to compute Graph transpose G^T is (V+E), if you
have ______________ for G.
A. Stack
B. Array list
C. Complete list
D. An adjacency list Page 138

Question No:80 (Marks:1) Vu-Topper RM


In undirected graph, by convention all the edges are called _________
edges.
A. Back Page 130
B. Cross
C. Forward
D. Both forward and back

Question No:81 (Marks:1) Vu-Topper RM


The _______________ given by DFS allow us to determine a number of
things about a graph or digraph.
A. line stamps
B. node stamps
C. color stamps

For More Help Contact What’s app 03224021365


D. time stamps Page 130

Question No:82 (Marks:1) Vu-Topper RM


If a subset of edges A is viable for building MST, it can not contain a/an
_________.
A. Edge
B. Cycle Page 143
C. Graph
D. Vertex

Question No:83 (Marks:1) Vu-Topper RM


A free tree with n vertices have exactly ________ edges.
A. 1
B. N
C. n-1 Page 142
D. n+1

Question No:84 (Marks:1) Vu-Topper RM


____________ technique is look like propagating wave-front outward.
A. Generic Traversal
B. Depth First Traversal
C. Time Stamp Traversal
D. Breath first traversal Page 117

Question No:85 (Marks:1) Vu-Topper RM


In Timestamped DFS, If there is a back edge (u, v) then v is an ancestor
of u and by following tree edge from v to u, we get ______________.
A. a line
B. a cycle Page 131
C. a graph
D. nothing

For More Help Contact What’s app 03224021365


Question No:86 (Marks:1) Vu-Topper RM
In strong components algorithm, vertices are sorted in________ order of
finish times.
A. Any
B. Strong
C. Increasing
D. Decreasing Page 141

Question No:87 (Marks:1) Vu-Topper RM


A fully connected undirected graph of 5 nodes will have _________
edges.
A. 4
B. 5
C. 10
D. 15

Question No:88 (Marks:1) Vu-Topper RM


A digraph is strongly connected under what condition?
A. A digraph is strongly connected if for every pair of vertices u, v
e V, u can reach v .
B. A digraph is strongly connected if for every pair of vertices
u, v e V, u can reach v and vice versa.
C. A digraph is strongly connected if for at least one pair of vertex
u, v e V, u can reach v and vice versa.
D. A digraph is strongly connected if at least one third pair of
vertices u, v e V, u can reach v and vice versa.

Question No:89 (Marks:1) Vu-Topper RM


We say that two vertices u and v are mutually _______ if u can reach v
and vice versa.
A. Crossed
B. Forward
C. Reachable Page 135

For More Help Contact What’s app 03224021365


D. Not Reachable

Question No:90 (Marks:1) Vu-Topper RM


In Timestamped DFS, No back edges means ___________.
A. DFS
B. BFS
C. 1 cycle
D. no cycles Page 131

Question No:91 (Marks:1) Vu-Topper RM


Cross edge is :
A. (u, v) where u and v are not ancestor of one another
B. (u, v) where u is ancesstor of v and v is not descendent of u.
C. (u, v) where u and v are not ancestor or descendent of one
another
D. (u, v) where u and v are either ancestor or descendent of one
another.

Question No:92 (Marks:1) Vu-Topper RM


In digraph G=(V,E) ;G has cycle if and only if
A. The DFS forest has forward edge.
B. The DFS forest has back edge Page 131
C. The DFS forest has both back and forward edge
D. BFS forest has forward edge

Question No:93 (Marks:1) Vu-Topper RM


For each vertex u ϵ (V − S) ,we associate a key ____________.
A. key[v-s]
B. key[s]
C. key[u]
D. key[v]

For More Help Contact What’s app 03224021365


Question No:94 (Marks:1) Vu-Topper RM
In Kruskal’s algorithm, the vertices will be stored in ________.
A. loops
B. sets
C. nodes
D. links

Question No:95 (Marks:1) Vu-Topper RM


An edge (u, v) _______ E − A is safe if A _______{(u, v)} is viable.
A. ϵ,U
B. U,ϵ
C. ϵ,П
D. П,U

Question No:96 (Marks:1) Vu-Topper RM


Which of the following statement is true.
A. Kruskal’s algorithm is used to find minimum spanning tree of a
graph, time complexity of this algorithm is O(EV)
B. Kruskal algorithm is multiple source technique for finding MST.
C. Both I and II
D. Kruskal's algorithm (choose best non-cycle edge) is better than
Prim's (choose best Tree edge) when the graph has relatively
few edges

Question No:1 (Marks:1) Vu-Topper RM


If we encode and compress text using ASCII standard each character is
represented b
A. Fixed length code word of 4 bits
B. Variable length code word up to 4 bits
C. Fixed length code word of 8 bits
D. Variable length code word up to 8 bits

For More Help Contact What’s app 03224021365


Question No:97 (Marks:1) Vu-Topper RM
Runtime complexity of Prim's algorithm is _______.
A. V log V
B. E log V
C. log V
D. None of the above

Question No:98 (Marks:1) Vu-Topper RM


Adding any edge to a free tree creates a unique cycle.
True
False

Question No:99 (Marks:1) Vu-Topper RM


For undirected graph, there is no distinction between forward and back
edges.
True
False

Question No:100 (Marks:1) Vu-Topper RM


in strong components algorithm, first of all DFS is run for computing
finish times of vertices.
True
False

Question No:101 (Marks:1) Vu-Topper RM


Which method is preferable for dealing with chain matrix
multiplication?
A. Divide and conquer strategy
B. Dynamic programming formulation
C. Graph theory
D. Greedy Approach

For More Help Contact What’s app 03224021365


Question No:102 (Marks:1) Vu-Topper RM
Huffman algorithm produces the ____________ prefix code tree.
A. Worst
B. Best
C. Optimal ok
D. Better

Question No:103 (Marks:1) Vu-Topper RM


A….w is adjacent to vertex v if there is an edge from v to w.
A. Acyclic
B. Vertex
C. Loop
D. Cycle

Question No:104 (Marks:1) Vu-Topper RM


Using ASCII standard the string “greedy” will be encoded with
A. 44 bits
B. 120 bits
C. 40 bits
D. 48 bits ok

Question No:105 (Marks:1) Vu-Topper RM


In Activity scheduling algorithm, each activity is
represented by a __________
A. Rectangle ok
B. Square
C. Circle
D. Triangle

Question No:106 (Marks:1) Vu-Topper RM

For More Help Contact What’s app 03224021365


Those problems in which Greedy finds good, but not always
best is called a greedy________.
A. Heuristic ok
B. Solution
C. Result
D. Algorithm

Question No:107 (Marks:1) Vu-Topper RM


The Knapsack problem belongs to the domain of _______________
problems.
A. Searching
B. Sorting
C. Linear solution
D. Optimization ok

Question No:108 (Marks:1) Vu-Topper RM


The general coin change problem can be solved using______________.
A. Recursion
B. Greedy algorithm
C. Dynamic programming ok
D. Divide and conquer

Question No:109 (Marks:1) Vu-Topper RM


Huffman algorithm generates an optimum _______ code.
A. Postfix
B. Infix
C. None of the given options
D. Prefix ok

For More Help Contact What’s app 03224021365


Question No:110 (Marks:1) Vu-Topper RM
................ ways of representing graphics
A. 1
B. 2
C. 3
D. 4

Question No:111 (Marks:1) Vu-Topper RM


Knapsack word originates from……language
A. German
B. English
C. French
D. Norwegian

Question No:112 (Marks:1) Vu-Topper RM


Graphs are important .......... model for many application problems
A. Mathematical
B. Unpredictable
C. Haphazard
D. Unsystematic

Question No:113 (Marks:1) Vu-Topper RM


Which type of algorithm is harder to prove the correctness?
A. Dynamic
B. Greedy ok
C. Divide and conquer
D. Brute force

For More Help Contact What’s app 03224021365


Question No:114 (Marks:1) Vu-Topper RM
______________items are not allowed in 0/1 Knapsack problem.
A. Fractional ok
B. 0
C. 1
D. 0/1

Question No:115 (Marks:1) Vu-Topper RM


Matrix multiplication is a(n) _______ operation.
A. Nether commutative nor associative
B. Transitive
C. Commutative
D. Associative ok

Question No:116 (Marks:1) Vu-Topper RM


For a Diagraph G= (V.E), Sum of in-degree (v) --.
A. Not equal to sum of out-degree(v)
B. = sum of out-degree(v)
C. < sum of out-degree(v)
D. > sum of out-degree(v)

Question No:117 (Marks:1) Vu-Topper RM


DFS or BFS yields a of the graph.
A. Traversed tree
B. Spanning tree Page 125
C. Simple tree
D. Free tree

For More Help Contact What’s app 03224021365


Question No:118 (Marks:1) Vu-Topper RM
Using ASCII code, each character is represented by a fixed-length code
of bits per character.
A. 4
B. 6
C. 10
D. 8

Question No:119 (Marks:1) Vu-Topper RM


In Knapsack Problem, the goal is to put items in the knapsack such that
the value of the items is _________ subject to weight limit of knapsack.
A. Minimized
B. Decreased
C. Maximized ok
D. None of the above given

Question No:120 (Marks:1) Vu-Topper RM


A graph is said to be acyclic if it contains --.
A. At least one cycle
B. Exactly one cycle
C. Always more than one cycle
D. No cycles

Question No:121 (Marks:1) Vu-Topper RM


The number of edges that come out of a vertex is called the of that
vertex in the digraph.
A. Post-degree
B. in-degree
C. out-degree
D. pre-degree

For More Help Contact What’s app 03224021365


Question No:122 (Marks:1) Vu-Topper RM
What general property of the list indicates that the graph has an isolated
vertex?
A. There is Null pointer at the end of list.
B. The Isolated vertex is not handled in list.
C. Only one value is entered in the list.
D. There is at least one null list.

Question No:123 (Marks:1) Vu-Topper RM


As the Kruskal’s runs, the edges in viable set A induce a _________ on
the vertices.
A. Set
B. Graph
C. Tree
D. Fore

Question No:124 (Marks:1) Vu-Topper RM


If Matrix-A has dimensions “3x2” and Matrix-B has dimensions “2x3”,
then multiplication of Matrix-A and Matrix-B will result a new
Matrix-C having dimensions.
A. 3x2
B. 2x3
C. 2x2
D. 3x3 ok

Question No:125 (Marks:1) Vu-Topper RM


A/an _______________is one in which you want to find, not just a
solution, but the best solution.
A. Optimization problem ok
B. Divide and Conquer
C. NP complete problem
D. Best problem

For More Help Contact What’s app 03224021365


Question No:126 (Marks:1) Vu-Topper RM
Fractional Knapsack is founded on ---- method.
A. Greedy page
B. Recursive
C. Divide and Conquer
D. Dynamic programming

Question No:127 (Marks:1) Vu-Topper RM


Find the maximum value of the items which can carry using knapsack
weight capacity
=50
ITEM 10 20 30 70
WEIGHT
VALUE 70 20 80 200
A. 90
B. 280
C. 200
D. 100

Question No:128 (Marks:1) Vu-Topper RM


If the graph is represented using an adjacency matrix, then Breadth-
first search takes------------time.
A. O(E+1)
B. O(V^2)
C. O(V)
D. O(E)

Question No:129 (Marks:1) Vu-Topper RM


In inductive approach of knapsack problem, we consider 2 cases,
______Or _________.

For More Help Contact What’s app 03224021365


A. Recursive, Iterative
B. Median, Mode
C. Leave object, Take object ok
D. Sequentially, Parallel

Question No:130 (Marks:1) Vu-Topper RM


A Greedy algorithm can NOT be used to solve all the
_____________problems.
A. Dynamic programming ok
B. Memorization programming
C. Edit-distance programming
D. Storing value programming

Question No:131 (Marks:1) Vu-Topper RM


In Huffman encoding, the _______ is the number of occurrences of a
character divided by the total characters in the message.
A. Counting
B. Parsing
C. Relative Probability ok
D. Weight

Question No:132 (Marks:1) Vu-Topper RM


The Binary Tree constructed by a Huffman Encoding is a:
A. Full Binary Tree
B. Partial Binary Tree
C. Incomplete Binary Tree
D. None of the given option

Question No:133 (Marks:1) Vu-Topper RM


Following is not the application of Edit Distance Problem.
A. Speech recognition

For More Help Contact What’s app 03224021365


B. Spelling correction
C. Ascending order
D. Computational Molecular Biology

Question No:134 (Marks:1) Vu-Topper RM


Consider three matrices X, Y, Z of dimensions 1 x 2 , 2 x 3 , 3 x 4
respectively. The number of multiplications of X(YZ) is:
A. 32 ok
B. 26
C. 24
D. 16

Question No:135 (Marks:1) Vu-Topper RM


In-----Knapsack Problem, limitation is that an item can either be put
in the bag or not. Fractional items are not allowed.
A. 0
B. 1
C. 0/1
D. Fractional
Question No:136 (Marks:1) Vu-Topper RM
An in-place sorting algorithm is one that uses additional array for
storage.
A. Always
B. Permanently
C. Does not
D. Sometime

Question No:137 (Marks:1) Vu-Topper RM


If Matrix-A has dimensions “pxq” and Matrix-B has dimensions “qxr”,
then multiplication of Matrix-A and Matrix-B will result a new
Matrix-C having dimensions.
A. P x q

For More Help Contact What’s app 03224021365


B. P x r
C. q x r
D. q x p

Question No:138 (Marks:1) Vu-Topper RM


Counting sort is suitable to sort the elements in range 1 to K.
A. K is large
B. K is small
C. K may be large or small
D. None

Question No:139 (Marks:1) Vu-Topper RM


When matrix A of 5x 3 is multiply with matrix B of 3x 4 then the
multiplication required is:
A. 15
B. 12
C. 36
D. 60

Question No:140 (Marks:1) Vu-Topper RM


------------------is a linear time sorting algorithm.
A. Merge sort
B. Quick sort
C. Bubble sort
D. Radix sort

Question No:141 (Marks:1) Vu-Topper RM


In Dynamic Programming approach, we do not store the solution to
each sub problem in case if it reappears.
True
False

For More Help Contact What’s app 03224021365


Question No:142 (Marks:1) Vu-Topper RM
Dynamic Programming approach is usually useful in solving
optimization problem.
True
False

Question No:143 (Marks:1) Vu-Topper RM


Which of the following algorithms provides an optimal solution for the
activity selection problem?
A. Divide and Conquer
B. Brute force
C. Greedy ok
D. Recursive

Question No:144 (Marks:1) Vu-Topper RM


A graph is if every vertex can reach every other vertex.
A. Connected
B. Cycle
C. Acyclic
D. Loop

Question No:145 (Marks:1) Vu-Topper RM


In Huffman encoding when a new node is created by combining two
nodes, the new node is placed in the__________.
A. Priority queue ok
B. Linked list
C. Min heap tree
D. Graph traversal

Question No:146 (Marks:1) Vu-Topper RM


In _______ algorithm, you hope that by choosing a local optimum at
each step, you will end up at a global optimum.

For More Help Contact What’s app 03224021365


A. Simple
B. Divide and conquer
C. Greedy ok
D. Brute Force

Question No:147 (Marks:1) Vu-Topper RM


The string “Imncde” is coded with ASCII code, the message length
would be bits.
A. 24
B. 36
C. 48
D. 60

Question No:148 (Marks:1) Vu-Topper RM


For graph traversal, breadth-first search strategy _
A. Is always recursive
B. Cannot br recursive
C. Cannot be non-recursive
D. Can be both recursive and non-recursive

Question No:149 (Marks:1) Vu-Topper RM


In activity scheduling algorithm , the width of a rectangle _
A. Is always ignored
B. Directs towards recursion
C. Should be maximized
D. Indicates the duration of an activity

Question No:150 (Marks:1) Vu-Topper RM


If the graph is represented using an adjacency list, then Breadth-first
search take time
A. O(V^2)

For More Help Contact What’s app 03224021365


B. O(V)
C. O(V+E)
D.O(E+1)

Question No:151 (Marks:1) Vu-Topper RM


Suppose you are given infinite coins of 1, 2, 3, and 4. Select the ways
of the minimum number of coins that required to achieve a sum of 6:
A. 1
B. 2 ok
C. 3
D. 4

Question No:152 (Marks:1) Vu-Topper RM


sing ASCII standard the string “greedy” will be encoded with
A. 48 bitS
B. 20 bits
C. 44 bits
D.40 bits

Question No:153 (Marks:1) Vu-Topper RM


The Huffman codes provide a method of _________ data efficiently.
A. Reading/Writing
B. Encoding/Decoding ok
B. Divide/Conquer
C. Inserting/Deleting

Question No:154 (Marks:1) Vu-Topper RM


In the context of activity selection algorithm, time s dominated by
sorting of the activities by------.
A. Start Times
B. Finish Times
C. Average Times
D.CPU Burst Times

For More Help Contact What’s app 03224021365


Question No:155 (Marks:1) Vu-Topper RM
Time complexity of the “0-1” knapsack algorithm depends
on___________
A. Number of items
B. Capacity of the knapsack
C. Size of the Table
D. Number of items and capacity of knapsack ok

Question No:156 (Marks:1) Vu-Topper RM


The greedy approach gives us an optimal solution when the coins are
all powers of a ____________denomination.
A. Fixed ok
B. Variable
C. Constant
D. Static

Question No:157 (Marks:1) Vu-Topper RM


In Activity Selection, we say that two activities are non-interfering if
their start-finish interval _________ overlap.
A. Do
B. Do not. ok
C. Sometimes
D. Once

Question No:158 (Marks:1) Vu-Topper RM


How many steps are involved to design the dynamic programming
strategy?
A. 2
B. 3
C. 1
D. 4

For More Help Contact What’s app 03224021365


Question No:159 (Marks:1) Vu-Topper RM
Bag is a
A. type of algorithm
B. data structure
C. program
D. compiler

Question No:160 (Marks:1) Vu-Topper RM


If a problem is in NP-complete, it must also be in NP.
True
False

Question No:161 (Marks:1) Vu-Topper RM


The Huffman algorithm finds a optimal solution.
True
False

Question No:162 (Marks:1) Vu-Topper RM


The Huffman algorithm finds an exponential solution
True
False

Question No:163 (Marks:1) Vu-Topper RM


The Huffman algorithm finds a polynomial solution
True
False

Question No:164 (Marks:1) Vu-Topper RM


The greedy part of the Huffman encoding algorithm is to first find two
nodes withs sallest frequency.
True

For More Help Contact What’s app 03224021365


False

Question No:165 (Marks:1) Vu-Topper RM


The code word assigned to characters by the Huffman algorithm have
the property that no code word is the prefix of any other.
True
False

Question No:166 (Marks:1) Vu-Topper RM


Dijkestra’s single source shortest path algorithm works if all edges
weights are non-negative and there are negative cost cycles.
True
False
Question No:167 (Marks:1) Vu-Topper RM
The term “coloring” came form the original application which was in
architectural design.
True
False

Question No:168 (Marks:1) Vu-Topper RM


In the clique cover problem, for two vertices to be in the same group,
they must be adjacent to each other.
True
False

Question No:169 (Marks:1) Vu-Topper RM


Dijkstra’s algorithm is operates by maintaining a subset of vertices
True
False

Question No:170 (Marks:1) Vu-Topper RM


We do sorting to,

For More Help Contact What’s app 03224021365


A. keep elements in random positions
B. keep the algorithm run in linear order
C. keep the algorithm run in (log n) order
D. keep elements in increasing or decreasing order

Question No:171 (Marks:1) Vu-Topper RM


After partitioning array in Quick sort, pivot is placed in a position
such that
A. Values smaller than pivot are on left and larger than pivot
are on right
B. Values larger than pivot are on left and smaller than pivot are on
right
C. Pivot is the first element of array
D. Pivot is the last element of array

Question No:172 (Marks:1) Vu-Topper RM


Merge sort is stable sort, but not an in-place algorithm
True
False

Question No:173 (Marks:1) Vu-Topper RM


A p × q matrix A can be multiplied with a q × r matrix B. The result
will be a p × r matrix C. There are (p . r) total entries in C and each
takes _ to compute.
A. O (q)
B. O (1)
C. O (n2)
D. O (n3)

Question No:174 (Marks:1) Vu-Topper RM


One of the clever aspects of heaps is that they can be stored in arrays
without using any ---------.

For More Help Contact What’s app 03224021365


A. Pointers
B. constants
C. variables
D.functions

Question No:175 (Marks:1) Vu-Topper RM


Merge sort requires extra array storage,
True
False

Question No:176 (Marks:1) Vu-Topper RM


The Huffman codes provide a method of encoding data inefficiently
when coded using ASCII standard.
True
False

Question No:177 (Marks:1) Vu-Topper RM


Using ASCII standard the string abacdaacac will be encoded with bits.
A. 80
B. 160
C. 320
D. 100

Question No:178 (Marks:1) Vu-Topper RM


Using ASCII standard the string abacdaacac will be encoded with 160
bits.
True
False

Question No:179 (Marks:1) Vu-Topper RM


Using ASCII standard the string abacdaacac will be encoded with 10
bytes.
True

For More Help Contact What’s app 03224021365


False

Question No:180 (Marks:1) Vu-Topper RM


The greedy part of the Huffman encoding algorithm is to first find two
nodes with character frequency
True
False

Question No:181 (Marks:1) Vu-Topper RM


Huffman algorithm uses a greedy approach to generate an prefix code T
that minimizes th expected length B (T) of the encoded string.
True
False

Question No:182 (Marks:1) Vu-Topper RM


An optimization problem is one in which you want to find
the_________solution.
A. Not a solution
B. An algorithm
C. Good solution
D. The best solution ok

Question No:183 (Marks:1) Vu-Topper RM


Although it requires more complicated data structures, Prim's algorithm
for a minimum spanning tree is better than Kruskal's when the graph
has a large number of vert
True
False

Question No:184 (Marks:1) Vu-Topper RM


If a problem is in NP, it must also be in P.
A. True
B. False

For More Help Contact What’s app 03224021365


C. unknown

Question No:185 (Marks:1) Vu-Topper RM


What is generally true of Adjacency List and Adjacency Matrix
representations of graphs?
A. Lists require less space than matrices but take longer to find
the weight of an edge (v1,v2)
B.Lists require less space than matrices and they are faster to find
the weight of an edge (v1,v2)
C. Lists require more space than matrices and they take longer to
find the weight of an edge (v1,v2)
D. Lists require more space than matrices but are faster to find the
weight of an edge (v1,V2)

Question No:186 (Marks:1) Vu-Topper RM


If a graph has v vertices and e edges then to obtain a spanning tree we
have to delete
A. v edges.
B. v – e + 5 edges
C. v + e edges.
D. None of these

Question No:187 (Marks:1) Vu-Topper RM


Maximum number of vertices in a Directed Graph may be |V2|
True
False
Question No:188 (Marks:1) Vu-Topper RM
The Huffman algorithm finds a (n) _ solution.
A. Optimal
B. Non-optimal
C. Exponential
D. Polynomial

For More Help Contact What’s app 03224021365


Question No:189 (Marks:1) Vu-Topper RM
Edge (u, v) is a forward edge if
A. u is a proper descendant of v in the tree
B. v is a proper descendant of u in the tree pg#129
C. None of these

Question No:190 (Marks:1) Vu-Topper RM


In counting sort, once we know the ranks, we simply numbers to
their final positions in an output array.
A. Delete
B. copy
C. Mark
D. arrange

Question No:191 (Marks:1) Vu-Topper RM


Dynamic programming algorithms need to store the results of
intermediate sub-problems.
True
False

Question No:192 (Marks:1) Vu-Topper RM


________is a graphical representation of an algorithm
A. notation
B. notation
C. Flowchart
D. Asymptotic notation

Question No:193 (Marks:1) Vu-Topper RM


Which of the following is calculated with big o notation?
A. Lower bounds
B. Upper bounds
C. Both upper and lower bound

For More Help Contact What’s app 03224021365


D. Medium bounds

Question No:194 (Marks:1) Vu-Topper RM


Merge sort makes two recursive calls. Which statement is true after
these recursive calls finish, but before the merge step?
A. The array elements form a heap
B. Elements in each half of the array are sorted amongst
themselves.
C. Elements in the first half of the array are less than or equal to
elements in the second half of the array
D. None of the above

Question No:195 (Marks:1) Vu-Topper RM


What is the solution to the recurrence T(n) = T(n/2)+n, T(1) = 1
A. O(logn)
B. O(n)
C. O(nlogn)
D. O(2n)

Question No:196 (Marks:1) Vu-Topper RM


Consider the following Huffman Tree The binary code for the string
TEA is
A. 00 010
B. 011 00 010
C. 10 00 110
D. 11 10 110

Question No:197 (Marks:1) Vu-Topper RM


A greedy algorithm does not work in phases.
True
False

For More Help Contact What’s app 03224021365


Question No:198 (Marks:1) Vu-Topper RM
Can an adjacency matrix for a directed graph ever not be square in
shape?
Yes
No

Question No:199 (Marks:1) Vu-Topper RM


One of the clever aspects of heaps is that they can be stored in arrays
without using any .
A. Pointers
B. constants
C. variables
D.functions

Question No:200 (Marks:1) Vu-Topper RM


Non-optimal or greedy algorithm for money change takes_
A. O(k)
B. O(kN)
C. O(2k)
D. O(N)

Question No:201 (Marks:1) Vu-Topper RM


Using ASCII standard the string abacdaacac will be encoded with 320
bits.
True
False

Question No:202 (Marks:1) Vu-Topper RM


Using ASCII standard the string abacdaacac will be encoded with 100
bits.
True
False

For More Help Contact What’s app 03224021365


Question No:203 (Marks:1) Vu-Topper RM
Using ASCII standard the string abacdaacac will be encoded with 32
bytes
True
False

Question No:204 (Marks:1) Vu-Topper RM


Huffman algorithm uses a greedy approach to generate an antefix code
T that minimizes the expected length B (T) of the encoded string.
True
False

Question No:205 (Marks:1) Vu-Topper RM


Depth first search is shortest path algorithm that works on un-weighted
graphs.
True
False

Question No:206 (Marks:1) Vu-Topper RM


Floyd-Warshall algorithm is a dynamic programming algorithm; the
genius of the algorithm is in the clever recursive formulation of the
shortest path problem.
True
False

Question No:207 (Marks:1) Vu-Topper RM


Floyd-Warshall algorithm, as in the case with DP algorithms, we avoid
recursive evaluation by generating a table for
A. k
B. d k
C. True
D. False

For More Help Contact What’s app 03224021365


Question No:208 (Marks:1) Vu-Topper RM
The term coloring came from the original application which was in
map drawing.
True
False

Question No:209 (Marks:1) Vu-Topper RM


In the clique cover problem, for two vertices to be in the same group,
they must be each other.
A. Apart from
B. Far from
C. Near to
D. Adjacent to

Question No:210 (Marks:1) Vu-Topper RM


Fixed-length codes may not be efficient from the perspective of the
total quantity of data.
A. Minimizing
B. Averaging
C. Maximizing
D. Summing

Question No:211 (Marks:1) Vu-Topper RM


In greedy algorithm, at each phase, you take the you can get right
now, without regard for future consequences.
A. Worst
B. Minimum
C. Good
D. Best

For More Help Contact What’s app 03224021365


Question No:212 (Marks:1) Vu-Topper RM
The difference between Prim s algorithm and Dijkstra s algorithm is
that Dijkstra s algorithm uses a same key.
True
False

Question No:213 (Marks:1) Vu-Topper RM


If there are n items, there are possible combinations of the items.
A. 2
B. N
C. 2^n
D. 3^n

Question No:214 (Marks:1) Vu-Topper RM


In Knapsack Problem, the thief’s goal is to put items in the bag such
that the of the items does not exceed the limit of the bag.
A. Value
B. Weight
C. Length
D. Balance

Question No:215 (Marks:1) Vu-Topper RM


The knapsack problem does not belong to the domain of optimization
problems.
True
False

Question No:216 (Marks:1) Vu-Topper RM


In Huffman encoding, for a given message string, the frequency of
occurrence (relative probability) of each character in the message is
determined last.
True
False

For More Help Contact What’s app 03224021365


Question No:217 (Marks:1) Vu-Topper RM
Fixed-length codes are known for easy break up of a string into its
individual characters.
True
False

Question No:218 (Marks:1) Vu-Topper RM


In Knapsack Problem, value and weight both are to be under
consideration.
True
False

Question No:219 (Marks:1) Vu-Topper RM


Multiplication is .
A. log n
B. n
C. n2
D. n3

Question No:220 (Marks:1) Vu-Topper RM


In DP based solution of knapsack problem, to compute entries of V
we will imply a/an approach.
A. Subjective
B. Inductive
C. Brute force
D. Combination

Question No:221 (Marks:1) Vu-Topper RM


A greedy algorithm sometimes works well for optimization problems.
True
False

For More Help Contact What’s app 03224021365


Question No:222 (Marks:1) Vu-Topper RM
In Huffman encoding, frequency of each character can be determined
by parsing the message and how many times each character (or
symbol) appears.
A. Printing
B. Incrementing
C. Counting
D. Deleting

Question No:223 (Marks:1) Vu-Topper RM


Greedy algorithm can do very poorly for some problems.
True
False

Question No:224 (Marks:1) Vu-Topper RM


The Huffman codes provide a method of data efficiently.
A. Reading
B. Encoding
C. Decoding
D. Printing

Question No:225 (Marks:1) Vu-Topper RM


In based solution of knapsack problem, we consider 2 cases, Leave
object Or Take object.
A. Brute force
B. Dynamic programming

Question No:226 (Marks:1) Vu-Topper RM


In brute force based solution of knapsack problem, we consider 2
cases, Leave object Or Take object.
True
False

For More Help Contact What’s app 03224021365


Question No:227 (Marks:1) Vu-Topper RM
problem, we want to find the best solution.
A. Minimization
B. Averaging
C. Optimization
D. Maximization

Question No:228 (Marks:1) Vu-Topper RM


Counting Money problem is an example which cannot be optimally
solved by greedy algorithm.
True
False

Question No:229 (Marks:1) Vu-Topper RM


Huffman algorithm generates an optimum prefix code.
True
False

Question No:230 (Marks:1) Vu-Topper RM


If the string “lmncde” is coded with ASCII code, the message length
would be _______ bits.
A. 24
B. 36
C. 48 6*8=48 ok
D. 60

Question No:231 (Marks:1) Vu-Topper RM


There are nested loops in DP based algorithm for computing the
minimum cost of chain matrix multiplication.
A. 2
B. 3
C. 4

For More Help Contact What’s app 03224021365


Question No:232 (Marks:1) Vu-Topper RM
A number of lectures are to be given in a single lecture hall. Optimum
scheduling for this is an example of Activity selection.
True
False

Question No:233 (Marks:1) Vu-Topper RM


The activity scheduling is a simple scheduling problem for which the
greedy algorithm approach provides a/an ________solution.
A. Simple
B. Sub optimal
C. Optimal ok
D. Non optimal

Question No:234 (Marks:1) Vu-Topper RM


The string |xyz|, if coded with ASCII code, the message length would
be 24 bits.
True
False

Question No:235 (Marks:1) Vu-Topper RM


An application problem is one in which you want to find, not just a
solution, but the solution.
A. Simple
B. Good
C. Best

Question No:236 (Marks:1) Vu-Topper RM


Suppose that a graph G = (V,E) is implemented using adjacency lists.
What is the complexity of a breadth-first traversal of G?
A. O(|V |^2)
B. O(|V | |E|)
C. O(|V |^2|E|)

For More Help Contact What’s app 03224021365


D. O(|v|+|E|)

Question No:237 (Marks:1) Vu-Topper RM


Which is true statement?
A. Breadth first search is shortest path algorithm that works on
un-weighted graphs
B. Depth first search is shortest path algorithm that works on un-
weighted graphs.
C. Both of above are true.
D. None of above are true.

Question No:238 (Marks:1) Vu-Topper RM


Using ASCII standard the string “abacdaacacwe” will be encoded with
__________ bits
A. 64
B. 128
C. 96
D. 120

Question No:239 (Marks:1) Vu-Topper RM


Kruskal's algorithm (choose best non-cycle edge) is better than Prim's
(choose best tree edge) when the graph has relatively few edges.
True
False

Question No:240 (Marks:1) Vu-Topper RM


What algorithm technique is used in the implementation of Kruskal
solution for the MST?
A. Greedy Technique
B. Divide-and-Conquer Technique
C. Dynamic Programming Technique
D. The algorithm combines more than one of the above techniques.

For More Help Contact What’s app 03224021365


Question No:241 (Marks:1) Vu-Topper RM
There is relationship between number of back edges and number of
cycles in DFS
A. Both are equal.
B. Cycles are half of back edges.
C. Cycles are one fourth of back edges.
D. There is no relationship between back edges and number of
cycles.

Question No:242 (Marks:1) Vu-Topper RM


In in-place sorting algorithm is one that uses arrays for storage:
A. An additional array
B. No additional array
C. Both of above may be true according to algorithm.
D. More than 3 arrays of one dimension.

Question No:243 (Marks:1) Vu-Topper RM


In stable sorting algorithm
A. One array is used
B. In which duplicating elements are not handled.
C. More than one arrays are required.
D. Duplicating elements remain in same relative position after
sorting.

Question No:244 (Marks:1) Vu-Topper RM


Which sorting algorithm is faster :
A. O(n^2)
B. O(nlogn)
C. O(n+k)
D. O(n^3)

Question No:245 (Marks:1) Vu-Topper RM


In Quick sort algorithm, constants hidden in T(n lg n) are

For More Help Contact What’s app 03224021365


A. Large
B. Medium
C. Not known
D. Small

Question No:246 (Marks:1) Vu-Topper RM


Quick sort is based on divide and conquer paradigm; we divide the
problem on base of pivot element and:
A. There is explicit combine process as well to conquer the
solution.
B. No work is needed to combine the sub-arrays, the array is
already sorted.
C. Merging the sub arrays
D. None of the above

Question No:247 (Marks:1) Vu-Topper RM


Which may be stable sort:
A. Bubble sort
B. Insertion sort
C. Selection sort
D. Both of above

Question No:248 (Marks:1) Vu-Topper RM


In the analysis of Selection algorithm, we eliminate a constant fraction
of the array with each phase; we get the convergent __ series in the
analysis,
A. linear
B. arithmetic
C. exponent
D. Geometric

Question No:249 (Marks:1) Vu-Topper RM


Which may be stable sort:

For More Help Contact What’s app 03224021365


A. Bubble sort
B. Insertion sort
C. Selection sort
D. Both of above

Question No:250 (Marks:1) Vu-Topper RM


In the analysis of Selection algorithm, we eliminate a constant fraction
of the array with each phase; we get the convergent __ series in the
analysis,
A. linear
B. arithmetic
C. exponent
D. Geometric

Question No:251 (Marks:1) Vu-Topper RM


How much time merge sort takes for an array of numbers?
A. T(n^2)
B. T(n)
C. T( log n)
D. T(n log n)

Question No:252 (Marks:1) Vu-Topper RM


We do sorting to,
A. keep elements in random positions.
B. keep the algorithm run in linear order.
C. keep the algorithm run in (log n) order.
D. keep elements in increasing or decreasing order.

Question No:253 (Marks:1) Vu-Topper RM


Dynamic programming algorithms need to store the results of
intermediate sub-problems.
True
False

For More Help Contact What’s app 03224021365


Question No:254 (Marks:1) Vu-Topper RM
Dijkstras single source shortest path algorithm works if all edges
weights are non negative and there are no negative cost cycles.
False
True

Question No:255 (Marks:1) Vu-Topper RM


Dijkestra s single source shortest path algorithm works if all edges
weights are negative and there are no negative cost cycles.
True
False

Question No:256 (Marks:1) Vu-Topper RM


In the clique cover problem, for two vertices to be in the same group,
they must be each other.
A. Apart from
B. Far from
C. Near to
D. Adjacent to

Question No:257 (Marks:1) Vu-Topper RM


Fixed-length codes may not be efficient from the perspective of
the total quantity of data.
A. Minimizing
B. Averaging
C. Maximizing
D. Summing

Question No:258 (Marks:1) Vu-Topper RM


In based solution of knapsack problem, we consider 2 cases, Leave
object Or Take object.
Brute force

For More Help Contact What’s app 03224021365


Dynamic programming

Question No:259 (Marks:1) Vu-Topper RM


In brute force based solution of knapsack problem, we consider 2 cases,
Leave object Or Take object.
True
False

Question No:260 (Marks:1) Vu-Topper RM


problem, we want to find the best solution.
A. Minimization
B. Averaging
C. Optimization
D. Maximization

Question No:261 (Marks:1) Vu-Topper RM


Using ASCII standard the string abacdaacac will be encoded with 10
bytes.
True
False

Question No:262 (Marks:1) Vu-Topper RM


How many elements do we eliminate in each time for the Analysis of
Selection algorithm?
A. (n / 2) + n elements
B. n / 4 elements
C. 2 n elements
D. n / 2 elements

Question No:263 (Marks:1) Vu-Topper RM


Slow sorting algorithms run in,
A. T(n^2)
B. T(n)

For More Help Contact What’s app 03224021365


C. T( log n)
D. T(n log n)

Question No:264 (Marks:1) Vu-Topper RM


Counting sort is suitable to sort the elements in range 1 to k:
A. K is large
B. K is small
C. K may be large or small
D. None

Question No:265 (Marks:1) Vu-Topper RM


Heaps can be stored in arrays without using any pointers; this is due to
the nature of the binary tree,
A. left-complete
B. right-complete
C. tree nodes
D. tree leaves

Question No:266 (Marks:1) Vu-Topper RM


A heap is a left-complete binary tree that conforms to the
A. increasing order only
B. heap order
C. decreasing order only
D. (log n) order

Question No:267 (Marks:1) Vu-Topper RM


Divide-and-conquer as breaking the problem into a small number of
A. pivot
B. Sieve
C. smaller sub problems
D. Selection

For More Help Contact What’s app 03224021365


Question No:268 (Marks:1) Vu-Topper RM
In Sieve Technique we do not know which item is of interest
True
False

Question No:269 (Marks:1) Vu-Topper RM


The recurrence relation of Tower of Hanoi is given below T(n)={1 if
n=1 and 2T(n-1) if n >1 In order to move a tower of 5 rings from one
peg to another, how many ring moves are required?
A. 16
B. 10
C. 32
D. 31

Question No:270 (Marks:1) Vu-Topper RM


For the heap sort, access to nodes involves simple
operations.
A. arithmetic
B. binary
C. algebraic
D. logarithmic

Question No:271 (Marks:1) Vu-Topper RM


For the sieve technique we solve the problem,
A. recursively
B. mathematically
C. precisely
D. accurately

Question No:272 (Marks:1) Vu-Topper RM


The sieve technique works in as follows
A. phases
B. numbers

For More Help Contact What’s app 03224021365


C. integers
D. routines

Question No:273 (Marks:1) Vu-Topper RM


A (an) is a left-complete binary tree that conforms to the heap
order
A. heap
B. binary tree
C. binary search tree
D. array

Question No:274 (Marks:1) Vu-Topper RM


The sieve technique is a special case, where the number of sub
problems is just
A. 5
B. Many
C. 1
D. Few

Question No:275 (Marks:1) Vu-Topper RM


Analysis of Selection algorithm ends up with,
A. T(n)
B. T(1 / 1 + n)
C. T(n / 2)
D. T((n / 2) + n)

Question No:276 (Marks:1) Vu-Topper RM


For the heap sort we store the tree nodes in
A. level-order traversal
B. in-order traversal
C. pre-order traversal
D. post-order traversal

For More Help Contact What’s app 03224021365


Question No:277 (Marks:1) Vu-Topper RM
The reason for introducing Sieve Technique algorithm is that it
illustrates a very important special case of,
A. divide-and-conquer
B. decrease and conquer
C. greedy nature
D. 2-dimension Maxima

Question No:278 (Marks:1) Vu-Topper RM


Sieve Technique applies to problems where we are interested in finding
a single item from a larger set of _
A. n items
B. phases
C. pointers
D. constant

Question No:279 (Marks:1) Vu-Topper RM


Memorization is?
A. To store previous results for future use
B. To avoid these unnecessary repetitions by writing down the
results of recursive calls and looking them up again if we
need them later
C. To make the process accurate
D. None of the above

Question No:280 (Marks:1) Vu-Topper RM


Quick sort is
A. Not stable but in place
B. Stable & in place
C. Stable but not in place
D. Sometime stable & some times in place

For More Help Contact What’s app 03224021365


Question No:281 (Marks:1) Vu-Topper RM
One example of in place but not stable algorithm is
A. Merger Sort
B. Quick Sort
B. Continuation Sort
C. Bubble Sort

Question No:282 (Marks:1) Vu-Topper RM


Continuation sort is suitable to sort the elements in range 1 to k
A. K is Large
B. K is not known
C. K may be small or large
D.K is small.

Question No:283 (Marks:1) Vu-Topper RM


Which may be a stable sort?
A. Merger
B. Insertion
C. None of the above
D. Both above

Question No:284 (Marks:1) Vu-Topper RM


An in place sorting algorithm is one that uses arrays for storage
A. Two dimensional arrays
B. More than one array
C. No Additional Array
D. None of the above

Question No:285 (Marks:1) Vu-Topper RM


Continuing sort has time complexity of ?
A. O(n)
B. O(n+k)
C. O(nlogn)

For More Help Contact What’s app 03224021365


D. O(k)

Question No:286 (Marks:1) Vu-Topper RM


single item from a larger set of
A. phases
B. n items
C. pointers
D. constant

Question No:287 (Marks:1) Vu-Topper RM


For the Sieve Technique we take time
A. T(nk)
B. T(n / 3)
C. n^2
D. n/3

Question No:288 (Marks:1) Vu-Topper RM


Due to left complete nature of binary tree, the heap can be stored in
A. Arrays
B. Structures
C. Link List
D. Stack

Question No:289 (Marks:1) Vu-Topper RM


What type of instructions Random Access Machine (RAM) can
execute?
A. Algebraic and logic
B. Geometric and arithmetic
C. Arithmetic and logic
D. Parallel and recursive

Question No:290 (Marks:1) Vu-Topper RM


What is the total time to heapify?

For More Help Contact What’s app 03224021365


A. Ο(log n)
B. Ο(n log n)
C. Ο(n2 log n)
D. Ο(log2 n)

Question No:291 (Marks:1) Vu-Topper RM


word Algorithm comes from the name of the muslim author
Abu Ja’far Mohammad ibn Musa al-Khowarizmi.

Question No:292 (Marks:1) Vu-Topper RM Al-


Khwarizmi’s work was written in a book titled
al Kitab al-mukhatasar fi hisab al-jabr wa’l-muqabalah

Question No:293 (Marks:1) Vu-Topper RM


Random access machine or RAM is a/an
A. Machine build by Al-Khwarizmi
B. Mechanical machine
C. Electronics machine
D. Mathematical model

Question No:294 (Marks:1) Vu-Topper RM A


RAM is an idealized machine with _ random-access memory.
A. 256MB
B. 512MB
C. 100GB
D. an infinitely large

Question No:295 (Marks:1) Vu-Topper RM


What will be the total number of max comparisons if we run brute-force
maxima algorithm with n elements?
A. 2 n
B. 2 n n

For More Help Contact What’s app 03224021365


C. n
D. 8 n

Question No:296 (Marks:1) Vu-Topper RM


Consider the following code: For(j=1; j<n;j++)
For(k=1; k<15;k++)
For(l=5; l<n; l++)
{
Do_something_constant();
}
What is the order of execution for this code.
A. O(n)
B. O(n3)
C. O(n2 log n)
D. O(n2)

Question No:297 (Marks:1) Vu-Topper RM


Is it possible to sort without making comparisons?
Yes
No

Question No:298 (Marks:1) Vu-Topper RM


When we call heapify then at each level the comparison performed
takes time
A. It will take Θ (1)
B. Time will vary according to the nature of input data
C. It can not be predicted
D. It will take Θ (log n)

Question No:299 (Marks:1) Vu-Topper RM


In Quick sort, we don’t have the control over the sizes of recursive
calls

For More Help Contact What’s app 03224021365


A. True
B. False
C. Less information to decide
D. Either true or false

Question No:300 (Marks:1) Vu-Topper RM


For Chain Matrix Multiplication we cannot use divide and conquer
approach because,
A. We do not know the optimum k
B. We use divide and conquer for sorting only
C. We can easily perform it in linear time
D. Size of data is not given

Question No:301 (Marks:1) Vu-Topper RM


Suppose we have three items as shown in the following table, and
suppose the capacity of the knapsack is 50 i.e. W = 50.
Ite Valu Weig
m e ht
1 60 10
2 100 20
3 120 30
The optimal solution is to pick
A. Items 1 and 2
B. Items 1 and 3
C. Items 2 and 3
D. None of these

Question No:302 (Marks:1) Vu-Topper RM


who invented the quick sort
C.A.R. Hoare

For More Help Contact What’s app 03224021365


Question No:303 (Marks:1) Vu-Topper RM
main elements to a divide-and-conquer
Divide, conquer, combine.

Question No:304 (Marks:1) Vu-Topper RM


Mergesort is a stable algorithm but not an in-place algorithm.
True
False

Question No:305 (Marks:1) Vu-Topper RM


Counting sort the numbers to be sorted are in the range 1 to k where k
is small.
True
False

Question No:306 (Marks:1) Vu-Topper RM


In selection algorithm, because we eliminate a constant fraction of the
array with each phase, we get the
A. Convergent geometric series
B. Divergent geometric series
C. None of these

Question No:307 (Marks:1) Vu-Topper RM


In RAM model instructions are executed
One after another
Parallel

Question No:308 (Marks:1) Vu-Topper RM


Due to left-complete nature of binary tree, heaps can be stored in
A. Link list
B. Structure
C. Array
D. None of above

For More Help Contact What’s app 03224021365


Question No:309 (Marks:1) Vu-Topper RM
The time assumed for each basic operation to execute on RAM model
of computation is-----
A. Constant
B. Infinite
C. Continuous
D. Variable

Question No:310 (Marks:1) Vu-Topper RM


If the indices passed to merge sort algorithm are not equal, the
algorithm may return immediately.
True
False

Question No:311 (Marks:1) Vu-Topper RM


Brute-force algorithm uses no intelligence in pruning out decisions.
True
False

Question No:312 (Marks:1) Vu-Topper RM


In analysis, the Upper Bound means the function grows asymptotically
no faster than its largest term.
True
False

Question No:313 (Marks:1) Vu-Topper RM


For small values of n, any algorithm is fast enough. Running time
does become an issue when n gets large
True
False

For More Help Contact What’s app 03224021365


Question No:314 (Marks:1) Vu-Topper RM
In simple brute-force algorithm, we give no thought to efficiency.
True
False

Question No:315 (Marks:1) Vu-Topper RM


The ancient Roman politicians understood an important principle of
good algorithm design that is plan-sweep algorithm.
True
False

Question No:316 (Marks:1) Vu-Topper RM


If the indices passed to merge sort algorithm are ,then this means that
there is only one element to sort.
A. Small
B. Large
C. Equal
D. Not Equal

Question No:317 (Marks:1) Vu-Topper RM


In pseudo code, the level of details depends on intended audience of the
algorithm.
True
False

Question No:318 (Marks:1) Vu-Topper RM


In 2d-space a point is said to be _if it is not dominated by any other
point in that space.
A. Member
B. Minimal
C. Maximal
D. Joint

For More Help Contact What’s app 03224021365


Question No:319 (Marks:1) Vu-Topper RM
An algorithm is a mathematical entity that is dependent on a specific
programming language.
True
False

Question No:320 (Marks:1) Vu-Topper RM


The running time of an algorithm would not depend upon the
optimization by the compiler but that of an implementation of the
algorithm would depend on it.
True
False

Question No:321 (Marks:1) Vu-Topper RM


F (n) and g (n) are asymptotically equivalent. This means that they
have essentially the same _ for large n.
A. Results
B. Variables
C. Growth rates
D. Size

Question No:322 (Marks:1) Vu-Topper RM


8n2 + 2n - 3 will eventually exceed c2*(n) no matter how large we
make c2.
True
False

Question No:323 (Marks:1) Vu-Topper RM


If we associate (x, y) integers pair to cars where x is the speed of the
car and y is the negation of the price. High y value for a car means a
car.
A. Fast
B. Slow

For More Help Contact What’s app 03224021365


C. Cheap
D. Expensive

Question No:324 (Marks:1) Vu-Topper RM


While solving Selection problem, in Sieve technique we partition input
data
A. In increasing order
B. In decreasing order
C. According to Pivot
D. Randomly

Question No:325 (Marks:1) Vu-Topper RM


In Sieve Technique, we know the item of interest.
True
False

Question No:326 (Marks:1) Vu-Topper RM


In Heap Sort algorithm, we build for ascending sort.
Max heap
Min heap

Question No:327 (Marks:1) Vu-Topper RM


Quick sort is best from the perspective of Locality of reference.
True
False

Question No:328 (Marks:1) Vu-Topper RM


While Sorting, the ordered domain means for any two input elements x
and y
satisfies only.
A. x < y
B. x > y
C. x = y

For More Help Contact What’s app 03224021365


D. All of the above

Question No:329 (Marks:1) Vu-Topper RM


Algorithm is a mathematical entity, which is independent of a specific
machine and operating system.
True
False

Question No:330 (Marks:1) Vu-Topper RM


In Heap Sort algorithm, the total running time for Heapify procedure is
A. Theta (log n)
B. Order (log n)
C. Omega (log n)
D. O (1)

Question No:331 (Marks:1) Vu-Topper RM


A point p in 2-dimensional space is usually given by its integer
coordinate(s)
A. p.x only p.y
B. only p.x & p.z
C. p.x & p.y

Question No:332 (Marks:1) Vu-Topper RM


In Heap Sort algorithm, the maximum levels an element can move
upward is
A. Theta (log n)
B. Order (log n)
C. Omega (log n)
D. O

Question No:333 (Marks:1) Vu-Topper RM


Floor and ceiling are to calculate while analyzing algorithms.
Very easy

For More Help Contact What’s app 03224021365


Usually considered difficult.

Question No:334 (Marks:1) Vu-Topper RM


is one of the few problems, where provable lower bounds exist on
how fast we can sort.
A. Searching
B. Sorting
C. Both Searching & Sorting
D. Graphing

Question No:335 (Marks:1) Vu-Topper RM


A RAM is an idealized algorithm with takes an infinitely large random-
access memory.
True
False

Question No:336 (Marks:1) Vu-Topper RM


Upper bound requires that there exist positive constants c2 and n0 such
that f(n) c2n for all n <= n0(ye question ghalat lag raha hai mujhae
A. Less than
B. Equal to or Less than
C. Equal or Greater than
D. Greater than

Question No:337 (Marks:1) Vu-Topper RM


In Heap Sort algorithm, if heap property is violated
A. We call Build heap procedure
B. We call Heapify procedure
C. We ignore
D. Heap property can never be violated

Question No:338 (Marks:1) Vu-Topper RM


In we have to find rank of an element from given input.

For More Help Contact What’s app 03224021365


A. Merge sort algorithm
B. Selection problem
C. Brute force technique
D. Plane Sweep algorithm

Question No:339 (Marks:1) Vu-Topper RM


A point p in 2-dimensional space is usually given by its integer
coordinate(s)
A. p.x only
B. p.y only
C. p.x & p.z
D. p.x & p.y

Question No:340 (Marks:1) Vu-Topper RM


In Quick Sort Constants hidden in T(n log n) are
A. Large
B. Medium
C. Small
D. Not Known

Question No:341 (Marks:1) Vu-Topper RM


The running time of quick sort depends heavily on the selection of
A. No of inputs
B. Arrangement of elements in array
C. Size o elements
D. Pivot elements

Question No:342 (Marks:1) Vu-Topper RM


Choose one Counting sort has time complexity:
A. O(n) Page 58
B. O(n+k)
C. O(k)
D. O(nlogn)

For More Help Contact What’s app 03224021365


Question No:343 (Marks:1) Vu-Topper RM
In place stable sorting algorithm.
A. If duplicate elements remain in the same relative position after
sorting
B. One array is used
C. More than one arrays are required
D. Duplicating elements not handled

Question No:344 (Marks:1) Vu-Topper RM


Cont sort is suitable to sort the elements in range 1 to k
A. K is Large
B. K is not known
C. K may be small or large
D. K is small

Question No:345 (Marks:1) Vu-Topper RM


The sieve technique works where we have to find item(s) from a large
input.
A. Single
B. Two
C. Three
D. Similar

Question No:346 (Marks:1) Vu-Topper RM


In strong components algorithm, first of all DFS is run for computing
finish times of vertices.
A. [d[u], f[u]]⊆[d[v], f[v]]
B. [d[u], f[u]]⊇[d[v], f[v]]
C. unrelated
D. Disjoint

For More Help Contact What’s app 03224021365


Question No:347 (Marks:1) Vu-Topper RM
For the sieve technique we solve the problem,
A. recursively
B. mathematically
C. precisely
D. accurately

Question No:348 (Marks:1) Vu-Topper RM


number of nodes in a complete binary tree of height h is
A. 2^(h+1) – 1
B. 2 * (h+1) – 1
C. 2 * (h+1)
D. ((h+1) ^ 2) – 1 25

Question No:349 (Marks:1) Vu-Topper RM


Heaps can be stored in arrays without using any pointers; this is due to
the
nature of the binary tree,
A. left-complete
B. right-complete
C. tree nodes
D. tree leaves

Question No:350 (Marks:1) Vu-Topper RM


Sorting is one of the few problems where provablebonds exits on how
fast we can sort,
A. upper
B. lower
C. average
D. log n

For More Help Contact What’s app 03224021365


Question No:351 (Marks:1) Vu-Topper RM
The analysis of Selection algorithm shows the total running time is
indeed
in no
A. arithmetic
B. geometric
C. linear
D. orthogonal

Question No:352 (Marks:1) Vu-Topper RM


What algorithm technique is used in the implementation of Kruskal
solution for the MST?
A. Greedy Technique
B. Divide-and-Conquer Technique
C. Dynamic Programming Technique
D. The algorithm combines more than one of the above techniques

Question No:353 (Marks:1) Vu-Topper RM


one If you find yourself in maze the better traversal approach will be :
A. BFS
B. BFS and DFS both are valid
C. Level order
D. DFS

Question No:354 (Marks:1) Vu-Topper RM


Suppose that a graph G = (V,E) is implemented using adjacency lists.
What is the complexity of a breadth-first traversal of G?
A. O(|V |^2)
B. O(|V | |E|)
C. O(|V |^2|E|)
D. O(|V | + |E|)

For More Help Contact What’s app 03224021365


Question No:355 (Marks:1) Vu-Topper RM
There are nested loops in DP based algorithm for computing the
minimum cost of chain matrix multiplication.
A. 2
B. 3
C. 4
D. 5

Question No:356 (Marks:1) Vu-Topper RM


Counting Money problem is an example which cannot be optimally
solved by greedy algorithm.
True
False

Question No:357 (Marks:1) Vu-Topper RM


Who invented Quick sort procedure?
A. Hoare
B. Sedgewick
C. Mellroy
D. Coreman

Question No:358 (Marks:1) Vu-Topper RM


An activity scheduling algorithm, the width of a rectangle --.
A. Is always ignored
B. Direct toward recursion
C. Should be maximized
D. Indicates the duration of an activity

Question No:359 (Marks:1) Vu-Topper RM


In recursive formulation of Knapsack Problem: V[0, j] = _______ for
j>=0
A. -1
B. 0 ok

For More Help Contact What’s app 03224021365


C. 1
D. 2

Question No:360 (Marks:1) Vu-Topper RM


The probability in Huffman encoding is the number of occurrences of a
character divided by the total __________in the message.
A. Numbers
B. Frequencies
C. Strings
D. Characters ok

Question No:361 (Marks:1) Vu-Topper RM


Graphs can be represented by an--------------- and --.
A. queue , stack
B.adjacency list , adjacency matrix
C.adjacency right , adjacency left
D.Binary , linear

Question No:362 (Marks:1) Vu-Topper RM


G power T for graph can be computed in
A. Theta(VE)
B. Theta(V log E)
C. Theta(E log V)
D .Theta (V+E)

Question No:363 (Marks:1) Vu-Topper RM


Adding any edge to free tree
A. Keep it free tree and increase the size of the tree.
B. Create a unique cycle.
C. Not allow to add edge to free tree.
D. Create multiple cycles.

For More Help Contact What’s app 03224021365


Question No:364 (Marks:1) Vu-Topper RM
Which sorting algorithn is faster :
A. O(n^2)
B. O(nlogn)
C. O(n+k)
D. O(n^3)

Question No:365 (Marks:1) Vu-Topper RM


Networks are complete in the sense that it is possible from any location
in the network to reach any other location in the digraph.
True
False

Question No:366 (Marks:1) Vu-Topper RM


According to parenthesis lemma vertex u is a descendent of v vertex if
and only if:
f [d[u], f[u]] ⊆ [d[v], f[v]] (Page 129)

Visit My YouTube Channel


For Subjective and More
Important Files
Channel Name = #VuTopperRM

For More Help Contact What’s app 03224021365

You might also like