First two problems in homework 4.
Third problem in homework 4.