P versus NP, reductions, SAT, classic NP-complete problems, approximation algorithms and undecidability.
35 cards · basic cards · AI-written, checked twice. Edit anything.
- What is the P class in computational complexity?
Show answer
The set of decision problems solvable by a deterministic Turing machine in polynomial time.
- What is the NP class in computational complexity?
Show answer
The set of decision problems verifiable by a deterministic Turing machine in polynomial time, given a certificate.
- Is every problem in P also in NP?
Show answer
Yes. If a problem is solvable in polynomial time, it is also verifiable in polynomial time (ignore the certificate).
- What is the P versus NP problem?
Show answer
The unsolved question of whether P equals NP (whether every polynomial-time verifiable problem is also polynomial-time solvable).
- What does it mean for a problem to be NP-complete?
Show answer
A problem is NP-complete if it is in NP and every problem in NP can be reduced to it in polynomial time.
- What is a polynomial-time reduction from problem A to problem B?
Show answer
An algorithm that transforms any instance of A into an instance of B in polynomial time, preserving the answer (yes-instance maps to yes-instance).
- What is the Boolean satisfiability problem (SAT)?
Show answer
Given a Boolean formula in conjunctive normal form, determine if there exists an assignment of variables that makes it true.
- Why is SAT the canonical NP-complete problem?
Show answer
The Cook-Levin theorem proves SAT is in NP and NP-hard, with every NP problem reducing to SAT in polynomial time.
- What is 3-SAT?
Show answer
The satisfiability problem restricted to formulas in conjunctive normal form where each clause contains exactly 3 literals.
- What is the clique problem?
Show answer
Given a graph and integer k, determine if the graph contains a complete subgraph (clique) of size at least k.
- What is the vertex cover problem?
Show answer
Given a graph and integer k, determine if there exists a set of at most k vertices such that every edge has at least one endpoint in the set.
- What is the independent set problem?
Show answer
Given a graph and integer k, determine if there exists a set of k vertices with no edges between them.
- What is the Hamiltonian path problem?
Show answer
Given a graph, determine if there exists a path that visits every vertex exactly once.
- What is the Traveling Salesman Problem (TSP)?
Show answer
Given n cities and distances, find the shortest tour that visits each city exactly once and returns to the start.
- What is the subset sum problem?
Show answer
Given a set of integers and a target sum, determine if there is a subset that sums to the target.