In this paper we produce complexity and impossibility results and develop algorithms for a task allocation problem that needs to be solved by a group of autonomous agents working together. In particular, each task is assumed to be composed of several subtasks and involves an associated predetermined and known overall payment (set by the task's owner) for its completion. However, the division of this payment among the corresponding contributors is not predefined. Now to accomplish a particular task, all its subtasks need to be allocated to agents with the necessary capabilities and the agents' corresponding costs need to fall within the preset overall task payment. For this scenario, we first provide a cooperative agent system designer with a practical solution that achieves an efficient allocation. However, this solution is not applicable for non-cooperative settings. Consequently, we go on to provide a detailed analysis where we prove that certain design goals cannot be ach...