  We design new polynomials for representing threshold functions in three
different regimes: probabilistic polynomials of low degree, which need far less
randomness than previous constructions, polynomial threshold functions (PTFs)
with "nice" threshold behavior and degree almost as low as the probabilistic
polynomials, and a new notion of probabilistic PTFs where we combine the above
techniques to achieve even lower degree with similar "nice" threshold behavior.
Utilizing these polynomial constructions, we design faster algorithms for a
variety of problems:
  $\bullet$ Offline Hamming Nearest (and Furthest) Neighbors: Given $n$ red and
$n$ blue points in $d$-dimensional Hamming space for $d=c\log n$, we can find
an (exact) nearest (or furthest) blue neighbor for every red point in
randomized time $n^{2-1/O(\sqrt{c}\log^{2/3}c)}$ or deterministic time
$n^{2-1/O(c\log^2c)}$. These also lead to faster MAX-SAT algorithms for sparse
CNFs.
  $\bullet$ Offline Approximate Nearest (and Furthest) Neighbors: Given $n$ red
and $n$ blue points in $d$-dimensional $\ell_1$ or Euclidean space, we can find
a $(1+\epsilon)$-approximate nearest (or furthest) blue neighbor for each red
point in randomized time near
$dn+n^{2-\Omega(\epsilon^{1/3}/\log(1/\epsilon))}$.
  $\bullet$ SAT Algorithms and Lower Bounds for Circuits With Linear Threshold
Functions: We give a satisfiability algorithm for $AC^0[m]\circ LTF\circ LTF$
circuits with a subquadratic number of linear threshold gates on the bottom
layer, and a subexponential number of gates on the other layers, that runs in
deterministic $2^{n-n^\epsilon}$ time. This also implies new circuit lower
bounds for threshold circuits. We also give a randomized
$2^{n-n^\epsilon}$-time SAT algorithm for subexponential-size $MAJ\circ
AC^0\circ LTF\circ AC^0\circ LTF$ circuits, where the top $MAJ$ gate and middle
$LTF$ gates have $O(n^{6/5-\delta})$ fan-in.
