Design and Analysis of Algorithms MCQs with answers Page - 36

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. Who invented the inclusion-exclusion principle to solve the Hamiltonian path problem?

  • (A) karp
  • (B) leonard adleman
  • (C) andreas bjorklund
  • (D) martello

A

Admin • 833K Points
Coach

Q. For a graph of degree three, in what time can a Hamiltonian path be found?

  • (A) o(0.251n)
  • (B) o(0.401n)
  • (C) o(0.167n)
  • (D) o(0.151n)

A

Admin • 833K Points
Coach

Q. What is the time complexity for finding a Hamiltonian path for a graph having N vertices (using permutation)?

  • (A) o(n!)
  • (B) o(n! * n)
  • (C) o(log n)
  • (D) o(n)

A

Admin • 833K Points
Coach

Q. How many Hamiltonian paths does the following graph have?

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 833K Points
Coach

Q. How many Hamiltonian paths does the following graph have?

  • (A) 1
  • (B) 2
  • (C) 0
  • (D) 3

A

Admin • 833K Points
Coach

Q. Under what condition any set A will be a subset of B?

  • (A) if all elements of set b are also present in set a
  • (B) if all elements of set a are also present in set b
  • (C) if a contains more elements than b
  • (D) if b contains more elements than a

A

Admin • 833K Points
Coach

Q. What is a subset sum problem?

  • (A) finding a subset of a set that has sum of elements equal to a given number
  • (B) checking for the presence of a subset that has sum of elements equal to a given number and printing true or false based on the result
  • (C) finding the sum of elements present in a set
  • (D) finding the sum of all the subsets of a set

A

Admin • 833K Points
Coach

Q. Which of the following is true about the time complexity of the recursive solution of the subset sum problem?

  • (A) it has an exponential time complexity
  • (B) it has a linear time complexity
  • (C) it has a logarithmic time complexity
  • (D) it has a time complexity of o(n2)

A

Admin • 833K Points
Coach

Q. Subset sum problem is an example of NP- complete problem.

  • (A) true
  • (B) false
  • (C) ---
  • (D) ---

A

Admin • 833K Points
Coach

Q. Recursive solution of subset sum problem is faster than dynamic problem solution in terms of time complexity.

  • (A) true
  • (B) false
  • (C) ---
  • (D) ---