Quiznetik

Design and Analysis of Algorithms | Set 5

1. Who invented the inclusion-exclusion principle to solve the Hamiltonian path problem?

Correct : C. andreas bjorklund

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

Correct : A. o(0.251n)

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

Correct : B. o(n! * n)

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

Correct : A. 1

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

Correct : C. 0

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

Correct : B. if all elements of set a are also present in set b

7. What is a subset sum problem?

Correct : 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

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

Correct : A. it has an exponential time complexity

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

Correct : A. true

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

Correct : B. false

11. Which of the following is not true about subset sum problem?

Correct : D. the dynamic programming solution has a time complexity of o(n log n)

12. What is meant by the power set of a set?

Correct : B. set of all subsets

13. What is the set partition problem?

Correct : C. 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

14. Which of the following is true about the time complexity of the recursive solution of set partition problem?

Correct : A. it has an exponential time complexity

15. What is the worst case time complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?

Correct : D. o(sum*n)

16. Recursive solution of Set partition problem is faster than dynamic problem solution in terms of time complexity.

Correct : B. false

17. What will be the auxiliary space complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?

Correct : D. o(sum*n)