Exact Solution for a Class of Random Walk on the Hypercube