answers to coursera algorithms course, week 1 assignment: percolation theory.