Exercise solutions I worked out when reading the book ,programming collective intelligence by Toby Segaran