Algorithm to find the minimum (additional) popular votes to win the electoral college
Here's a hint (and a sketch).
I believe the problem is NP-hard and that it is equivalent to Subset Sum.
Reducing from Subset Sum:  Suppose your instance has sum $S$ and values $v_1, v_2, \dots, v_n$.
Create $n+1$ states, one with $S$ electorals that Party $A$ is guaranteed to win.  The remaining $n$ states is such that $i$ has $v_i$ electorals.  These cost Party $B$ $v_i$ to win.
Now, the optimum solution is $S$ which exists if and only if you have a yes instance for Subset Sum.