

MCQOPTIONS
Saved Bookmarks
This section includes 41 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
1. |
_________ is the class of decision problems that can be solved by non-deterministic polynomial algorithms? |
A. | NP |
B. | P |
C. | Hard |
D. | Complete |
Answer» B. P | |
2. |
How many conditions have to be met if an NP- complete problem is polynomially reducible? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
3. |
Which of the following algorithm can be used to solve the Hamiltonian path problem efficiently? |
A. | branch and bound |
B. | iterative improvement |
C. | divide and conquer |
D. | greedy algorithm |
Answer» B. iterative improvement | |
4. |
What is the rate of the hamming code of parity bit m=8? |
A. | 0.94 |
B. | 0.92 |
C. | 0.9 |
D. | 0.97 |
Answer» E. | |
5. |
Which of the following problems is not NP complete? |
A. | Hamiltonian circuit |
B. | Bin packing |
C. | Partition problem |
D. | Halting problem |
Answer» E. | |
6. |
What is the message length 'k' of a Hamming(7,4) code? |
A. | 2r-1 |
B. | 2r-r+1 |
C. | 2r-r-1 |
D. | 2r+1-r |
Answer» D. 2r+1-r | |
7. |
The problem of finding a path in a graph that visits every vertex exactly once is called? |
A. | Hamiltonian path problem |
B. | Hamiltonian cycle problem |
C. | Subset sum problem |
D. | Turnpike reconstruction problem |
Answer» B. Hamiltonian cycle problem | |
8. |
Who formulated the first ever algorithm for solving the Hamiltonian path problem? |
A. | Martello |
B. | Monte Carlo |
C. | Leonard |
D. | Bellman |
Answer» B. Monte Carlo | |
9. |
Hamiltonian path problem is _________ |
A. | NP problem |
B. | N class problem |
C. | P class problem |
D. | NP complete problem |
Answer» E. | |
10. |
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) |
Answer» C. O(log N) | |
11. |
Problems that can be solved in polynomial time are known as? |
A. | intractable |
B. | tractable |
C. | decision |
D. | complete |
Answer» C. decision | |
12. |
The most common hamming codes are a generalized version of? |
A. | Hamming(7, 4) code |
B. | Hamming(8, 4) code |
C. | Hamming(6, 3) code |
D. | Hamming(5, 7) code |
Answer» B. Hamming(8, 4) code | |
13. |
Problems that cannot be solved by any algorithm are called? |
A. | tractable problems |
B. | intractable problems |
C. | undecidable problems |
D. | decidable problems |
Answer» D. decidable problems | |
14. |
What is the rate of hamming codes? |
A. | 1-[r/(2r-1)] |
B. | 1-(r/2r) |
C. | 1+(r/2r) |
D. | r/2r+1 |
Answer» B. 1-(r/2r) | |
15. |
________ is the mechanism of sending data bits multiple times to ensure consistency. |
A. | Repetition |
B. | Duplication |
C. | Mirroring |
D. | Redundancy |
Answer» B. Duplication | |
16. |
The worst-case efficiency of solving a problem in polynomial time is? |
A. | O(p(n)) |
B. | O(p( n log n)) |
C. | O(p(n2)) |
D. | O(p(m log n)) |
Answer» B. O(p( n log n)) | |
17. |
What is the total block length 'n' of a Hamming code? |
A. | 2r |
B. | 2r-1 |
C. | 2r-1-1 |
D. | 2r+1 |
Answer» C. 2r-1-1 | |
18. |
Who invented Hamming codes? |
A. | Richard Hamming |
B. | Ross Hamming |
C. | Shannon |
D. | Huffman |
Answer» B. Ross Hamming | |
19. |
What is the minimal Hamming distance between any two correct codewords? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» D. 4 | |
20. |
Who invented the inclusion-exclusion principle to solve the Hamiltonian path problem? |
A. | Karp |
B. | Leonard Adleman |
C. | Andreas Bjorklund |
D. | Martello |
Answer» D. Martello | |
21. |
The Euler's circuit problem can be solved in? |
A. | O(N) |
B. | O( N log N) |
C. | O(log N) |
D. | O(N2) |
Answer» E. | |
22. |
To which of the following class does a CNF-satisfiability problem belong? |
A. | NP class |
B. | P class |
C. | NP complete |
D. | NP hard |
Answer» D. NP hard | |
23. |
Halting problem is an example for? |
A. | decidable problem |
B. | undecidable problem |
C. | complete problem |
D. | trackable problem |
Answer» C. complete problem | |
24. |
The sum and composition of two polynomials are always polynomials. |
A. | true |
B. | false |
Answer» B. false | |
25. |
A non-deterministic algorithm is said to be non-deterministic polynomial if the time-efficiency of its verification stage is polynomial. |
A. | true |
B. | false |
Answer» B. false | |
26. |
How many steps are required to prove that a decision problem is NP complete? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
27. |
Including a parity bit along with the data surely detects the errors. |
A. | true |
B. | false |
Answer» C. | |
28. |
The choice of polynomial class has led to the development of an extensive theory called ________ |
A. | computational complexity |
B. | time complexity |
C. | problem complexity |
D. | decision complexity |
Answer» B. time complexity | |
29. |
How many stages of procedure does a non-deterministic algorithm consist of? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
30. |
There is no existing relationship between a Hamiltonian path problem and Hamiltonian circuit problem. |
A. | true |
B. | false |
Answer» C. | |
31. |
In what time can the Hamiltonian path problem can be solved using dynamic programming? |
A. | O(N) |
B. | O(N log N) |
C. | O(N2) |
D. | O(N2 2N) |
Answer» E. | |
32. |
To which class does the Euler's circuit problem belong? |
A. | P class |
B. | NP class |
C. | Partition class |
D. | Complete class |
Answer» B. NP class | |
33. |
In graphs, in which all vertices have an odd degree, the number of Hamiltonian cycles through any fixed edge is always even. |
A. | true |
B. | false |
Answer» C. | |
34. |
A two-out-of-five code consists of _________ |
A. | Two 0s and three 1s |
B. | Three 0s and two 1s |
C. | Four 0s and one 1s |
D. | One 0s and four 1s |
Answer» C. Four 0s and one 1s | |
35. |
Hamming codes can be used for both single-bit error and burst error detection and correction. |
A. | True |
B. | False |
Answer» C. | |
36. |
What is the code rate of a repetition Hamming code (3, 1)? |
A. | 1 |
B. | 3 |
C. | 1/3 |
D. | 1.3 |
Answer» D. 1.3 | |
37. |
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) |
Answer» B. O(0.401n) | |
38. |
An Extended hamming code is also called as __________ |
A. | SEDDEC |
B. | SEDDED |
C. | SECDED |
D. | SECDEC |
Answer» D. SECDEC | |
39. |
For a hamming code of parity bit m=8, what is the total bits and data bits? |
A. | (255, 247) |
B. | (127, 119) |
C. | (31, 26) |
D. | (0, 8) |
Answer» B. (127, 119) | |
40. |
Why do we require hamming codes? |
A. | Error correction |
B. | Encryption only |
C. | Decryption |
D. | Bit stuffing |
Answer» B. Encryption only | |
41. |
Which of the following problems is similar to that of a Hamiltonian path problem? |
A. | knapsack problem |
B. | closest pair problem |
C. | travelling salesman problem |
D. | assignment problem |
Answer» D. assignment problem | |