On This Page
This set of Design and Analysis of Algorithms Multiple Choice Questions & Answers (MCQs) focuses on Design And Analysis Of Algorithms Set 17
Q1 | There is no existing relationship between a Hamiltonian path problem and Hamiltonian circuit problem.
- true
- false
Q2 | Which of the following problems is similar to that of a Hamiltonian path problem?
- knapsack problem
- closest pair problem
- travelling salesman problem
- assignment problem
Q3 | Who formulated the first ever algorithm for solving the Hamiltonian path problem?
- martello
- monte carlo
- leonard
- bellman
Q4 | In what time can the Hamiltonian path problem can be solved using dynamic programming?
- o(n)
- o(n log n)
- o(n2)
- o(n2 2n)
Q5 | In graphs, in which all vertices have an odd degree, the number of Hamiltonian cycles through any fixed edge is always even.
- true
- false
Q6 | Who invented the inclusion-exclusion principle to solve the Hamiltonian path problem?
- karp
- leonard adleman
- andreas bjorklund
- martello
Q7 | For a graph of degree three, in what time can a Hamiltonian path be found?
- o(0.251n)
- o(0.401n)
- o(0.167n)
- o(0.151n)
Q8 | What is the time complexity for finding a Hamiltonian path for a graph having N vertices (using permutation)?
- o(n!)
- o(n! * n)
- o(log n)
- o(n)
Q9 | How many Hamiltonian paths does the following graph have?
- 1
- 2
- 3
- 4
Q10 | Under what condition any set A will be a subset of B?
- if all elements of set b are also present in set a
- if all elements of set a are also present in set b
- if a contains more elements than b
- if b contains more elements than a
Q11 | What is a subset sum problem?
- finding a subset of a set that has sum of elements equal to a given number
- 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
- finding the sum of elements present in a set
- finding the sum of all the subsets of a set
Q12 | Which of the following is true about the time complexity of the recursive solution of the subset sum problem?
- it has an exponential time complexity
- it has a linear time complexity
- it has a logarithmic time complexity
- it has a time complexity of o(n2)
Q13 | Subset sum problem is an example of NP- complete problem.
- true
- false
Q14 | Recursive solution of subset sum problem is faster than dynamic problem solution in terms of time complexity.
- true
- false
Q15 | Which of the following is not true about subset sum problem?
- the recursive solution has a time complexity of o(2n)
- there is no known solution that takes polynomial time
- the recursive solution is slower than dynamic programming solution
- the dynamic programming solution has a time complexity of o(n log n)
Q16 | What is meant by the power set of a set?
- subset of all sets
- set of all subsets
- set of particular subsets
- an empty set
Q17 | What is the set partition problem?
- finding a subset of a set that has sum of elements equal to a given number
- checking for the presence of a subset that has sum of elements equal to a given number
- checking whether the set can be divided into two subsets of with equal sum of elements and printing true or false based on the result
- finding subsets with equal sum of elements
Q18 | Which of the following is true about the time complexity of the recursive solution of set partition problem?
- it has an exponential time complexity
- it has a linear time complexity
- it has a logarithmic time complexity
- it has a time complexity of o(n2)
Q19 | What is the worst case time complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?
- o(n)
- o(sum)
- o(n2)
- o(sum*n)
Q20 | Recursive solution of Set partition problem is faster than dynamic problem solution in terms of time complexity.
- true
- false
Q21 | What will be the auxiliary space complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?
- o(n log n)
- o(n2)
- o(2n)
- o(sum*n)