MDP-Based Budget Allocation for Efficient Cooperative Task Solving