Complexity Theory

Complexity Theory Quiz

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the study of the inherent difficulty of computational problems called?

  1. Complexity Theory
  2. Algorithm Analysis
  3. Computability Theory
  4. Information Theory
Question 2 Multiple Choice (Single Answer)

Which complexity class consists of problems that can be solved in polynomial time?

  1. P
  2. NP
  3. NP-Complete
  4. NP-Hard
Question 3 Multiple Choice (Single Answer)

What is the complexity class of problems that can be verified in polynomial time?

  1. P
  2. NP
  3. NP-Complete
  4. NP-Hard
Question 4 Multiple Choice (Single Answer)

Which of the following problems is NP-Complete?

  1. Traveling Salesman Problem
  2. Primality Testing
  3. Sorting
  4. Linear Search
Question 5 Multiple Choice (Single Answer)

What is the relationship between NP-Complete and NP-Hard problems?

  1. NP-Complete problems are always NP-Hard.
  2. NP-Hard problems are always NP-Complete.
  3. NP-Complete problems are sometimes NP-Hard.
  4. NP-Hard problems are sometimes NP-Complete.
Question 6 Multiple Choice (Single Answer)

Which of the following is a famous unsolved problem in Complexity Theory?

  1. P versus NP Problem
  2. Goldbach's Conjecture
  3. Riemann Hypothesis
  4. Fermat's Last Theorem
Question 7 Multiple Choice (Single Answer)

What is the time complexity of the brute-force algorithm for finding the maximum element in an array of n elements?

  1. O(n)
  2. O(log n)
  3. O(n^2)
  4. O(1)
Question 8 Multiple Choice (Single Answer)

Which sorting algorithm has an average-case time complexity of O(n log n)?

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Merge Sort
Question 9 Multiple Choice (Single Answer)

What is the time complexity of the binary search algorithm for searching an element in a sorted array of n elements?

  1. O(n)
  2. O(log n)
  3. O(n^2)
  4. O(1)
Question 10 Multiple Choice (Single Answer)

Which of the following is an example of a non-deterministic algorithm?

  1. Dijkstra's Algorithm
  2. Prim's Algorithm
  3. Floyd-Warshall Algorithm
  4. Monte Carlo Algorithm
Question 11 Multiple Choice (Single Answer)

What is the time complexity of the Floyd-Warshall algorithm for finding the shortest paths between all pairs of vertices in a weighted graph?

  1. O(n)
  2. O(n log n)
  3. O(n^2)
  4. O(n^3)
Question 12 Multiple Choice (Single Answer)

Which of the following is an example of a problem that is NP-Hard but not known to be NP-Complete?

  1. Traveling Salesman Problem
  2. Subset Sum Problem
  3. Hamiltonian Cycle Problem
  4. Graph Coloring Problem
Question 13 Multiple Choice (Single Answer)

What is the time complexity of the brute-force algorithm for finding the minimum spanning tree of a graph?

  1. O(n)
  2. O(n log n)
  3. O(n^2)
  4. O(n^3)
Question 14 Multiple Choice (Single Answer)

Which of the following is an example of a problem that is in both NP and co-NP?

  1. Traveling Salesman Problem
  2. Primality Testing
  3. Hamiltonian Cycle Problem
  4. Graph Coloring Problem
Question 15 Multiple Choice (Single Answer)

What is the time complexity of the randomized algorithm for finding the maximum element in an array of n elements?

  1. O(n)
  2. O(log n)
  3. O(n^2)
  4. O(1)