construct the function of linear programming