Skip to content

tucoopy.games.bankruptcy

Bankruptcy games.

Bankruptcy games model the division of a limited estate \(E\) among players with claims \(c_i\). The standard characteristic function is:

\[ v(S) = \max\left(0, E - \sum_{i \notin S} c_i\right). \]
See Also

tucoopy.games.savings.savings_game

Examples:

>>> from tucoopy.games.bankruptcy import bankruptcy_game
>>> g = bankruptcy_game(10, [4, 7])
>>> g.value(0b01)
3.0

bankruptcy_game

bankruptcy_game(estate, claims, *, player_labels=None)

Construct a bankruptcy game (TU) as a worth game.

The standard definition of the characteristic function is:

\[v(S) = \max\left(0, E - \sum_{i \notin S} c_i\right)\]

where \(E\) is the estate and \(c_i\) are claims.

Parameters:

Name Type Description Default
estate float

Total estate to be divided.

required
claims Sequence[float]

Claims of each player.

required
player_labels list of str

Optional labels for players.

None

Returns:

Type Description
Game

Cooperative game instance representing the bankruptcy game.

Raises:

Type Description
InvalidParameterError

If fewer than 1 player is provided.

Examples:

>>> from tucoopy.games.bankruptcy import bankruptcy_game
>>> g = bankruptcy_game(10, [4, 7])
>>> g.n_players
2
>>> g.value(1)
3.0
>>> g.value(3)
10.0