Lab2, Ex5: Now solved the problem without recourse constraint