0

Logic and Computation: Computability and Complexity

Description: This quiz covers the fundamental concepts of computability and complexity theory, exploring the limits of what can be computed and the efficiency of algorithms.
Number of Questions: 15
Created by:
Tags: computability complexity theory turing machines algorithms complexity classes
Attempted 0/15 Correct 0 Score 0

Which of the following is a model of computation that is used to define computability?

  1. Turing Machine

  2. Finite State Machine

  3. Pushdown Automaton

  4. Cellular Automaton


Correct Option: A
Explanation:

A Turing Machine is a theoretical model of computation that consists of a tape, a read/write head, and a finite set of states. It is used to define computability and study the limits of what can be computed.

What is the Halting Problem?

  1. Determining whether a given Turing Machine will halt on a given input

  2. Determining the maximum number of steps a Turing Machine will take on a given input

  3. Determining the minimum number of steps a Turing Machine will take on a given input

  4. Determining the output of a Turing Machine on a given input


Correct Option: A
Explanation:

The Halting Problem is the problem of determining whether a given Turing Machine will halt on a given input. It is undecidable, meaning that there is no algorithm that can solve it for all possible inputs.

Which of the following is a complexity class that contains all decision problems that can be solved by a deterministic Turing Machine in polynomial time?

  1. P

  2. NP

  3. NP-Complete

  4. NP-Hard


Correct Option: A
Explanation:

P is the complexity class that contains all decision problems that can be solved by a deterministic Turing Machine in polynomial time. This means that there exists an algorithm that can solve the problem in a number of steps that is bounded by a polynomial function of the input size.

Which of the following is a complexity class that contains all decision problems that can be solved by a non-deterministic Turing Machine in polynomial time?

  1. P

  2. NP

  3. NP-Complete

  4. NP-Hard


Correct Option: B
Explanation:

NP is the complexity class that contains all decision problems that can be solved by a non-deterministic Turing Machine in polynomial time. This means that there exists an algorithm that can solve the problem in a number of steps that is bounded by a polynomial function of the input size, given access to an oracle that can solve any problem in P in constant time.

Which of the following is a complexity class that contains all decision problems that are at least as hard as the hardest problem in NP?

  1. P

  2. NP

  3. NP-Complete

  4. NP-Hard


Correct Option: D
Explanation:

NP-Hard is the complexity class that contains all decision problems that are at least as hard as the hardest problem in NP. This means that if there exists an algorithm that can solve any NP-Hard problem in polynomial time, then all problems in NP can be solved in polynomial time.

Which of the following is a complexity class that contains all decision problems that are both NP-Complete and NP-Hard?

  1. P

  2. NP

  3. NP-Complete

  4. NP-Hard


Correct Option: C
Explanation:

NP-Complete is the complexity class that contains all decision problems that are both NP-Complete and NP-Hard. This means that these problems are among the hardest problems in NP, and if any one of them can be solved in polynomial time, then all problems in NP can be solved in polynomial time.

Which of the following problems is NP-Complete?

  1. Traveling Salesman Problem

  2. Knapsack Problem

  3. Sorting

  4. Primality Testing


Correct Option: A
Explanation:

The Traveling Salesman Problem is NP-Complete. It is a problem where a salesman wants to find the shortest route to visit a set of cities and return to the starting city, while visiting each city exactly once.

Which of the following problems is NP-Hard?

  1. Subgraph Isomorphism

  2. Hamiltonian Cycle

  3. Longest Common Subsequence

  4. Matrix Multiplication


Correct Option: A
Explanation:

Subgraph Isomorphism is NP-Hard. It is a problem where we are given two graphs and we want to determine if one graph is a subgraph of the other.

Which of the following problems is in P?

  1. Sorting

  2. Primality Testing

  3. Integer Factorization

  4. Graph Coloring


Correct Option: A
Explanation:

Sorting is in P. There exist algorithms, such as Merge Sort and Quick Sort, that can sort a list of n elements in O(n log n) time.

Which of the following problems is not known to be in P or NP?

  1. Integer Factorization

  2. Graph Isomorphism

  3. Traveling Salesman Problem

  4. Primality Testing


Correct Option: A
Explanation:

Integer Factorization is not known to be in P or NP. There is no known polynomial-time algorithm for factoring large integers, and it is also not known to be NP-Complete or NP-Hard.

What is the relationship between P and NP?

  1. P = NP

  2. P ⊆ NP

  3. NP ⊆ P

  4. P and NP are disjoint


Correct Option: B
Explanation:

P ⊆ NP means that every problem in P is also in NP. This is because any problem that can be solved by a deterministic Turing Machine in polynomial time can also be solved by a non-deterministic Turing Machine in polynomial time.

Which of the following is a famous open problem in computer science?

  1. P = NP?

  2. Goldbach Conjecture

  3. Riemann Hypothesis

  4. Fermat's Last Theorem


Correct Option: A
Explanation:

The P = NP problem is a famous open problem in computer science. It asks whether every problem in NP can be solved by a deterministic Turing Machine in polynomial time. If the answer is yes, then many important problems, such as the Traveling Salesman Problem and the Knapsack Problem, could be solved efficiently.

What is the time complexity of the best known algorithm for Integer Factorization?

  1. O(n log n)

  2. O(n^2)

  3. O(2^n)

  4. O(n!)


Correct Option: C
Explanation:

The best known algorithm for Integer Factorization is the Number Field Sieve algorithm, which has a time complexity of O(2^n).

What is the time complexity of the best known algorithm for the Traveling Salesman Problem?

  1. O(n log n)

  2. O(n^2)

  3. O(2^n)

  4. O(n!)


Correct Option: C
Explanation:

The best known algorithm for the Traveling Salesman Problem is the brute-force algorithm, which has a time complexity of O(2^n).

Which of the following is a famous result in complexity theory?

  1. Cook-Levin Theorem

  2. PCP Theorem

  3. NP-Completeness of the Traveling Salesman Problem

  4. All of the above


Correct Option: D
Explanation:

The Cook-Levin Theorem, PCP Theorem, and NP-Completeness of the Traveling Salesman Problem are all famous results in complexity theory. The Cook-Levin Theorem states that SAT is NP-Complete, which means that many other problems can be reduced to SAT in polynomial time. The PCP Theorem states that there exists a proof system for NP that can be verified in polynomial time. The NP-Completeness of the Traveling Salesman Problem means that it is one of the hardest problems in NP.

- Hide questions