# Golden Ticket: Chapter 3

## For Your Enjoyment

## P and NP

- Describe an algorithm for computing the
closest distance between
two people in Frenemy. What is the time complexity of this algorithm?
- Describe an algorithm for verifying that k vertices
are a clique. What is the time complexity of this algorithm?
- Describe an algorithm for finding the largest clique
in a graph. What is the time complexity of this algorithm?
- Describe an algorithm for determining if an
Eulerian
Circuit exists. What is the time complexity of this algorithm?
- Which of the problems above are decision problems?
- How can we turn a non-decision problem into a decision problem?
- Suppose we had an oracle that would tell us the correct answer to
any decision problem. When the answer is yes, the oracle
will show us a solution that we must verify.
Given such an oracle, which of the above
problems can we now solve more efficiently?
- P: Problems that can be solved in polynomial time without an oracle.
- NP: Problems that can be solved in polynomial time with an oracle.
- Which of the above problems are in P?
- Which of the above problems are in NP?
- Does P = NP? No one knows for sure! This is the most important
open question in computer science.
- What would it take to show that P = NP?
- What would it take to show that P ≠ NP?