The problem is the following: if there is a set S = {x1, ..., x_n} and a function f: set -> number, which takes a set as an input and returns a number as an output, what is the best possible coalition structure (coalition structure a set of subsets of a S.That is, find the subsets,such that the sum of f(s_i) for every subset s_i in S is maximal). The sets in the coalition should not overlap and their union should be S.
A template is this:
def optimal_coalition(coalitions):
"""
:param coalitions: a dictionary of the form {coalition: value}, where coalition is a set, and value is a number
:return:
"""
optimal_coalition({set(1): 30, set(2): 40, set(1, 2): 71}) # Should return set(set(1, 2))
