  We propose a simple iterative algorithm to construct the optimal
multi-configuration approximation of an $N$-fermion wave function. That is,
$M\geq N $ single-particle orbitals are sought iteratively so that the
projection of the given wave function in the $C_M^N$-dimensional configuration
subspace is maximized. The algorithm has a monotonic convergence property and
can be easily parallelized. The significance of the algorithm on the study of
entanglement in a multi-fermion system and its implication on the
multi-configuration time-dependent Hartree-Fock (MCTDHF) are discussed. The
ground state and real-time dynamics of spinless fermions with nearest-neighbor
interactions are studied using this algorithm, discussing several subtleties.
