Questions
What is the study of the inherent difficulty of computational problems called?
- Complexity Theory
- Algorithm Analysis
- Computability Theory
- Information Theory
Which complexity class consists of problems that can be solved in polynomial time?
- P
- NP
- NP-Complete
- NP-Hard
What is the complexity class of problems that can be verified in polynomial time?
- P
- NP
- NP-Complete
- NP-Hard
Which of the following problems is NP-Complete?
- Traveling Salesman Problem
- Primality Testing
- Sorting
- Linear Search
What is the relationship between NP-Complete and NP-Hard problems?
- NP-Complete problems are always NP-Hard.
- NP-Hard problems are always NP-Complete.
- NP-Complete problems are sometimes NP-Hard.
- NP-Hard problems are sometimes NP-Complete.
Which of the following is a famous unsolved problem in Complexity Theory?
- P versus NP Problem
- Goldbach's Conjecture
- Riemann Hypothesis
- Fermat's Last Theorem
What is the time complexity of the brute-force algorithm for finding the maximum element in an array of n elements?
- O(n)
- O(log n)
- O(n^2)
- O(1)
Which sorting algorithm has an average-case time complexity of O(n log n)?
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
What is the time complexity of the binary search algorithm for searching an element in a sorted array of n elements?
- O(n)
- O(log n)
- O(n^2)
- O(1)
Which of the following is an example of a non-deterministic algorithm?
- Dijkstra's Algorithm
- Prim's Algorithm
- Floyd-Warshall Algorithm
- Monte Carlo Algorithm
What is the time complexity of the Floyd-Warshall algorithm for finding the shortest paths between all pairs of vertices in a weighted graph?
- O(n)
- O(n log n)
- O(n^2)
- O(n^3)
Which of the following is an example of a problem that is NP-Hard but not known to be NP-Complete?
- Traveling Salesman Problem
- Subset Sum Problem
- Hamiltonian Cycle Problem
- Graph Coloring Problem
What is the time complexity of the brute-force algorithm for finding the minimum spanning tree of a graph?
- O(n)
- O(n log n)
- O(n^2)
- O(n^3)
Which of the following is an example of a problem that is in both NP and co-NP?
- Traveling Salesman Problem
- Primality Testing
- Hamiltonian Cycle Problem
- Graph Coloring Problem
What is the time complexity of the randomized algorithm for finding the maximum element in an array of n elements?
- O(n)
- O(log n)
- O(n^2)
- O(1)