taking the third problem apart.

defining the constraints of the problem