P: Polynomial time. Problems that can be solved "efficiently." Here, efficiently means in polynomial time.
NP: Non-deterministic polynomial time. Problems for which a candidate solution can be verified efficiently.
NP-hard: A problem is NP-hard if every problem in NP can be reduced to that problem in polynomial time.
NP-complete: A problem is NP-complete if it is both in NP and it is NP-hard.
NP-complete problems are the hardest problems in NP. If you can solve one efficiently, you can solve all NP problems efficiently.
To prove a problem is NP-complete, you have to do two things: show it is in NP, and show it is NP-hard.
Showing $X \in NP$:
Showing $X$ is NP-hard:
If you have a known NP-complete problem $Y$, you construct a function $f$ that maps instances of $Y$ to instances of $X$ efficiently.
$f$ must preserve the answer:
If this works, solving $X$ solves $Y$, so $X$ is at least as hard as $Y$.
Some common NP-complete problems that you can use as starting points:
First, what is Double SAT?
Input: A boolean formula $\phi$ in CNF (conjunctive normal form).
Question: Are there at least two distinct satisfying assignments for $\phi$?
To show this is in NP, we must show that a candidate solution can be verified in polynomial time.
Candidate solution: two assignments $A_1$ and $A_2$.
Verification algorithm:
Each check is polynomial time, because evaluating a CNF formula is linear in the size of the formula, and comparing two assignments is linear in the number of variables.
Therefore, Double SAT $\in$ NP.
We do this by reducing a known NP-complete problem to Double SAT. We'll use 3-SAT as the known NP-complete problem.
Given a 3-SAT formula $\phi$, we want to create a formula $\phi\prime$ such that:
If we can do this, then solving Double SAT on $\phi\prime$ tells us whether $\phi$ is satisfiable.
Explanation of the formula from 3:
Case 1: $\phi$ is unsatisfiable
In this case, $\phi\prime$ is also unsatisfiable $\implies$ zero satisfying assignments.
Case 2: $\phi$ is satisfiable
If $\phi$ has a satisfying assignment $A$, then $\phi\prime$ can be satisfied by $A \cup { y = True }$ and $A \cup { y = False } \implies$ two distinct satisfying assignments.
Thus, $\phi$ is satisfiable $\implies \phi\prime$ has $\geq 2$ solutions, and $\phi$ is unsatisfiable $\implies \phi\prime$ has 0 solutions.
From step two, we can see that adding a new variable and a single tautology clause is clearly polynomial in time and size.
Since we have shown that Double SAT $\in$ NP and 3-SAT $\leq_p$ Double SAT, Double SAT is NP-complete.