Design and Analysis of Algorithms MCQs with answers Page - 40

Here, you will find a collection of MCQ questions on Design and Analysis of Algorithms. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833K Points
Coach

Q. The dynamic programming implementation of the maximum sum rectangle problem uses which of the following algorithm?

  • (A) hirschberg’s algorithm
  • (B) needleman-wunsch algorithm
  • (C) kadane’s algorithm
  • (D) wagner fischer algorithm

A

Admin • 833K Points
Coach

Q. Given an array, check if the array can be divided into two subsets such that the sum of elements of the two subsets is equal. This is the balanced partition problem. Which of the following methods can be used to solve the balanced partition problem?

  • (A) dynamic programming
  • (B) recursion
  • (C) brute force
  • (D) dynamic programming, recursion, brute force

A

Admin • 833K Points
Coach

Q. Given G is a bipartite graph and the bipartitions of this graphs are U and V respectively. What is the relation between them?

  • (A) number of vertices in u = number of vertices in v
  • (B) sum of degrees of vertices in u = sum of degrees of vertices in v
  • (C) number of vertices in u > number of vertices in v
  • (D) nothing can be said

A

Admin • 833K Points
Coach

Q. A k-regular bipartite graph is the one in which degree of each vertices is k for all the vertices in the graph. Given that the bipartitions of this graph are U and V respectively. What is the relation between them?

  • (A) number of vertices in u=number of vertices in v
  • (B) number of vertices in u not equal to number of vertices in v
  • (C) number of vertices in u always greater than the number of vertices in v
  • (D) nothing can be said

A

Admin • 833K Points
Coach

Q. A complete bipartite graph is a one in which each vertex in set X has an edge with set Y. Let n be the total number of vertices. For maximum number of edges, the total number of vertices hat should be present on set X is?

  • (A) n
  • (B) n/2
  • (C) n/4
  • (D) data insufficient

A

Admin • 833K Points
Coach

Q. When is a graph said to be bipartite?

  • (A) if it can be divided into two independent sets a and b such that each edge connects a vertex from to a to b
  • (B) if the graph is connected and it has odd number of vertices
  • (C) if the graph is disconnected
  • (D) if the graph has at least n/2 vertices whose degree is greater than n/2

A

Admin • 833K Points
Coach

Q. Are trees bipartite?

  • (A) yes
  • (B) no
  • (C) yes if it has even number of vertices
  • (D) no if it has odd number of vertices

A

Admin • 833K Points
Coach

Q. A graph has 20 vertices. The maximum number of edges it can have is? (Given it is bipartite)

  • (A) 100
  • (B) 140
  • (C) 80
  • (D) 20

A

Admin • 833K Points
Coach

Q. Given that a graph contains no odd cycle. Is it enough to tell that it is bipartite?

  • (A) yes
  • (B) no
  • (C) ---
  • (D) ---

A

Admin • 833K Points
Coach

Q. Can there exist a graph which is both eulerian and is bipartite?

  • (A) yes
  • (B) no
  • (C) yes if it has even number of edges
  • (D) nothing can be said