Objective:If there is several solutions find that one which use the minimum
number of values.
If there is no solution minimize the cost function according to the following 
coefficients:


             a1 = 1000
             a2 =  100
             a3 =   10
             a4 =    1
             b1 =    0
             b2 =    0
             b3 =    0
             b4 =    0