The Multiple Partners Game

There are two sets of agents which we may think of as firms and workers. For each pair (f, w) there is a non-negative number a fw representing the amount of income which the pair (f, w) can generate if they work together. The natural economic question is then to determine (A) which partnerships would be formed and (B) if a partnership (f, w) is formed how should the income a fw be divided between the partners.