You are on page 1of 7

Design and Analysis of Algorithms - MCQS 2 - WASEIAN Page 1 of 7

HOME ABOUT US CONTACT OUR POLICY    

HOME | SUBJECTS  | QUIZ | MID-SEM | WIMS(IN-PROGRESS) | SUBMIT QUESTIONS/ANSWER

Home / DAA / Design and Analysis of Algorithms / quiz / Design and Analysis of Algorithms - MCQS 2
𝐒𝐞𝐚𝐫𝐜𝐡 𝐓𝐡𝐢𝐬 𝐁𝐥𝐨𝐠

Design and Analysis of Algorithms - MCQS 2 Search


in DAA, Design and Analysis of Algorithms, quiz

Question
What is an optimal Huffman code for alphabet b of the following set of frequencies
𝐅𝐀𝐂𝐄𝐁𝐎𝐎𝐊
  a: 45, b:13, c:12, d:16, e:9, f:5
Select one:
a. 111
Like Page
b. 101
c. 100
Be the first of your friends to like this
d. 001

𝐓𝐨𝐭𝐚𝐥 𝐒𝐜𝐡𝐨𝐥𝐚𝐫
The correct answer is:101

9 3 9 3 1 2
Question
In flow networks Residual capacity Cf (u,v)=
𝕽𝖊𝖈 𝖊𝖓𝖙 𝕱𝖊𝖆𝖙 𝖚𝖗 𝖊𝖉
Select one:
a. c(u,v) – f(u,v)
Software Architectures -
b. t(u,v) – s(u,v)
Comprehensive Reference Solution
c. f(u, v) – c(u,v)  Waseian  Jul 11, 2019
d. s(u,v) – t(u, v)
Data Storage Technologies and
Networks - Comprehensive
The correct answer is:c(u,v) – f(u,v)
Reference Solutions
 Waseian  Jul 11, 2019
Question
In Ford-Fulkerson algorithm, flow of the augmenting path is selected based on Network Security Assignment - SEM
7
Select one:
 Waseian  Jul 01, 2019
a. cf(p) =min{ cf (u,v):(u,v)is in f-P }
b. cf(p) =min{ cf (u,v):(u,v)is in p } Network Security - Comprehensive
c. cf(p) =max{ cf (u,v):(u,v)is in f-P } Paper Solution
 Waseian  Jun 24, 2019
d. cf(p) =max{ cf (u,v):(u,v)is in p }

The correct answer is: cf(p) =min{ cf (u,v):(u,v)is in p }


𝐁𝐥𝐨𝐠 𝐀𝐫𝐜𝐡𝐢𝐯𝐞
Question
July (3)
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to
June (6)
be used is:
May (2)

http://www.waseian.com/2019/01/design-and-analysis-of-algorithms-mcqs-2.html 7/16/2019
Design and Analysis of Algorithms - MCQS 2 - WASEIAN Page 2 of 7

Select one: April (8)

a. Queue March (1)


February (2)
b. Heap
January (4)
c. Stack
November (10)
d. B-Tree
October (4)
August (7)
The correct answer is:Queue July (7)
June (4)
Question May (7)
In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most April (3)
efficiently, in terms of time complexity by
Select one:
a. Warshall’s algorithm
b. Performing a DFS starting from S.
c. Dijkstra’s algorithm starting from S.
d. Performing a BFS starting from S

The correct answer is:Performing a BFS starting from S

Question
Consider the decision problem 2CNFSAT defined as follows:

Select one:
a. NP-hard, but not NP-complete.
b. solvable in constant time since any input instance is satisfiable.
c. NP-Complete.
d. solvable in polynomial time by reduction to directed graph reachability

The correct answer is:solvable in polynomial time by reduction to directed graph reachability

Question
Find the Running Time of the fastest algorithm to calculate the shortest path between any two vertices of a graph where
all edges have equal weights.
Select one:
a. 0(V  log2V+E )
b. 0 (E+V)
c. 0(V log V2+E)
d. 0 (V+E) log2V

The correct answer is:0 (E+V)

Question
Match the following
            Group A                                                                      Group B
a) Dijkstra's single shortest path                                     p) Dynamic Programming
b) Bellmen Ford's single shortest path algorithm           q) Backtracking
c) Floyd Warshell's all pair shortest path algorithm        r) Greedy Algorithm
Select one:
a. a-p,  b-r, c-q
b. a-p,  b-p, c-p
c. a-r,  b-p, c-p
d. a-r,  b-q, c-p

The correct answer is: a-r,  b-p, c-p

http://www.waseian.com/2019/01/design-and-analysis-of-algorithms-mcqs-2.html 7/16/2019
Design and Analysis of Algorithms - MCQS 2 - WASEIAN Page 3 of 7

Question
Match the following:

              List – I                           List – II

         1 Quick Sort              a Divide and Conquer

         2 Graph colouring     b Greedy

         3 String editing          c Dynamic Programming

         4 Prim’s Algorithm   d Back tracking


Select one:
a. 1-a, 2-c, 3-b, 4-d
b. None of these
c. 1-a, 2-d, 3-c, 4-b
d. 1-b, 2-a, 3-d, 4-c

The correct answer is: 1-a, 2-d, 3-c, 4-b

Question
Which of the following statement(s)is / are correct regarding Bellman-Ford shortest path algorithm?
P: Always finds a negative weighted cycle, if one exist s.
Q: Finds whether any negative weighted cycle is reachable
   from the source.
Select one:
a. P Only
b. Neither P nor Q
c. Both P and Q
d. Q Only

The correct answer is: Q Only

Question
The time required to find shortest path in a graph with n vertices and e edges is
Select one:
a. O (e)
b.  O (e2)
c.  O (n)   
d.  O (n2)

The correct answer is: O (n2)

Question
There are 5 items as follows

Select one:
a. 260 $
b. 270 $
c. 290$

http://www.waseian.com/2019/01/design-and-analysis-of-algorithms-mcqs-2.html 7/16/2019
Design and Analysis of Algorithms - MCQS 2 - WASEIAN Page 4 of 7

d. 250$

The correct answer is:260$

Question
Four matrices M1, M2, M3 and M4 of dimensions pxq, qxr, rxs and sxt respectively can be multiplied is several ways with
different number of total scalar multiplications. For example, when multiplied as ((M1 X M2) X (M3 X M4)), the total
number of multiplications is pqr + rst + prt. When multiplied as (((M1 X M2) X M3) X M4), the total number of scalar
multiplications is pqr + prs + pst.
If p = 10, q = 100, r = 20, s = 5 and t = 80, then the number of scalar multiplications needed is
Select one:
a. 44000
b. 19000
c. 25000
d. 248000

The correct answer is:19000

Question
A simple Graph G = L U R, set of 2 non-empty vertices and each vertex from L  has an edge to atleast one vertex of R, is
called as
Select one:
a.  Bifocal graph
b. Bipartite Graph
c. Complete graph
d. Flow-network graph

The correct answer is: Bipartite Graph

Question
Ram and Shyam have been asked to show that a certain problem Π is NP-complete. Ram shows a polynomial time
reduction from the 3-SAT problem to Π, and Shyam shows a polynomial time reduction from Π to 3-SAT. Which of the
following can be inferred from these reductions ?
Select one:
a. Π is NP-complete
b. Π is neither NP-hard, nor in NP
c. Π is NP-hard but not NP-complete
d. Π is in NP, but is not NP-complete

The correct answer is:Π is NP-complete

Question
A sub-sequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are
given two sequences X[m] and Y[n] of lengths m and n respectively, with indexes of X and Y starting from 0.
We wish to find the length of the longest common sub-sequence(LCS) of X[m] and Y[n] as l(m,n), where an incomplete
recursive definition for the function l(i,j) to compute the length of The LCS of X[m] and Y[n] is given below:
l(i,j) = 0, if either i=0 or j=0
       = expr1, if i,j > 0 and X[i-1] = Y[j-1]
       = expr2, if i,j > 0 and X[i-1] != Y[j-1]
Select one:
a. expr2 ≡ max(l(i-1,j-1),l(i,j))
b. expr2 ≡ max(l(i-1, j), l(i, j-1))
c. expr1 ≡ l(i-1, j) + 1
d. expr1 ≡ l(i, j-1)

The correct answer is: expr2 ≡ max(l(i-1, j), l(i, j-1))

Question

http://www.waseian.com/2019/01/design-and-analysis-of-algorithms-mcqs-2.html 7/16/2019
Design and Analysis of Algorithms - MCQS 2 - WASEIAN Page 5 of 7

If all c(i, j )’s and r(i, j)’s are calculated, then OBST algorithm in worst case takes one of the following time.
Select one:
a. O(log n)
b. O(n3)
c. O(n log n)   
d. O(n2)

The correct answer is: O(n3)

Question
Kruskal’s algorithm uses-------- and prim’s algorithm uses------ in determining the MST
Select one:
a. edges,edges
b. vertex,vertex
c. edges,vertex
d. vertex,edges

The correct answer is: edges,vertex

Question
For 0/1 KNAPSACK problem, the algorithm takes ________ amount of time for memory table, and ______time to determine
the optimal load, for N objects and W as the capacity of KNAPSACK.
Select one:
a. O(NW), O(N)
b. O(NW), O(N+W)
c. O(N), O(NW)
d.   O(N+W), O(NW)

The correct answer is:O(NW), O(N+W)

Question
Consider the following two problems of graph.
1) Given a graph, find if the graph has a cycle that visits every vertex exactly once except the first visited vertex which
must be visited again to complete the cycle.
2) Given a graph, find if the graph has a cycle that visits every edge exactly once. Which of the following is true about
above two problems
Select one:
a. Both problems belong to P set
b. Problem 1 belongs to P set and 2 belongs to NP Complete set
c. Problem 1 belongs NP Complete set and 2 belongs to P
d. Both problems belong to NP complete set

The correct answer is: Problem 1 belongs NP Complete set and 2 belongs to P

Tags # DAA # Design and Analysis of Algorithms      

About Waseian
At WASEIAN group, our affection to all the WASEians who have landed here for up-skilling themselves.
We come up with various knowledge assistances with the wide range of Tutorials, Quizzes, Project tasks
and Coursework as well.

 NEWER ARTICLE OLDER ARTICLE 

Software Testing Methodologies - MCQS 2 Data Mining - MCQS 2

YOU MAY ALSO LIKE:

http://www.waseian.com/2019/01/design-and-analysis-of-algorithms-mcqs-2.html 7/16/2019
Design and Analysis of Algorithms - MCQS 2 - WASEIAN Page 6 of 7

Discrete Structures for Digital Electronics and Linear Algebra and Computer Programming -
Computer Science - MCQS Microprocessors - MCQS Optimization- MCQS MCQS

5 COMMENTS: 

UNKNOWN JANUARY 3, 2019 AT 8:01 PM

Find the Running Time of the fastest algorithm to calculate the shortest path between any two vertices of a graph
where all edges have equal weights.

Select one:
a. 0(V log2V+E )
b. 0 (V+E) log2V
c. 0(V log V2+E)
d. 0 (E+V)
Answer Plz !

Reply

Replies

SUBHASHIS DAS JANUARY 3, 2019 AT 9:57 PM

Ans is d. O(E+V)

Reply

UNKNOWN JANUARY 3, 2019 AT 8:01 PM

A simple Graph G = L U R, set of 2 non-empty vertices and each vertex from L has an edge to atleast one vertex of R,
is called as

Select one:
a. Bipartite Graph
b. Bifocal graph
c. Complete graph
d. Flow-network graph
Answer plz

Reply

Replies

SUBHASHIS DAS JANUARY 3, 2019 AT 9:59 PM

Ans is a.Bipartite Graph

Reply

ANONYMOUS JANUARY 6, 2019 AT 1:39 AM

There are 5 items as follows

The knapsack can hold 60 pounds find the optimal solution

Answer is 260$

Reply


Enter your comment...

Comment as: Google Account

http://www.waseian.com/2019/01/design-and-analysis-of-algorithms-mcqs-2.html 7/16/2019
Design and Analysis of Algorithms - MCQS 2 - WASEIAN Page 7 of 7

View PDF
View PDF, Download Here

Ad ProPDFConverter.com Visit Site

CATEGORIES RECENT COMMENTS

 ASSIGNMENT (3) Unknown


"can you please share comprehensive paper for dstn if
 BIG DATA (2) available."

 CLOUD (3) Anushya


"it’s a classic great for me to go to this blog sit..."
 COMPREHENSIVE (19)

 DATA WAREHOUSE (6) Unknown


"a - is the answer"
 HADOOP (4)

 QUIZ (28)

Created By Waseian | Powered By Our Viewers   

http://www.waseian.com/2019/01/design-and-analysis-of-algorithms-mcqs-2.html 7/16/2019

You might also like