NTU CSIE MMAI 2012 Homework 2