  This paper presents an adaptive randomized algorithm for computing the
butterfly factorization of a $m\times n$ matrix with $m\approx n$ provided that
both the matrix and its transpose can be rapidly applied to arbitrary vectors.
The resulting factorization is composed of $O(\log n)$ sparse factors, each
containing $O(n)$ nonzero entries. The factorization can be attained using
$O(n^{3/2}\log n)$ computation and $O(n\log n)$ memory resources. The proposed
algorithm applies to matrices with strong and weak admissibility conditions
arising from surface integral equation solvers with a rigorous error bound, and
is implemented in parallel.
