For those familiar with it, this is a problem as tackled on page 104 of Robert Axelrod's book ``The complexity of cooperation''.
It all boils down to counting all possible partitions of a set.
Below is Latex code. See the enclosed pdf-file for more readable text.
There are $n$ firms in the set $F$. Example: $F$ = \{$A$, $B$, $C$\}, $n$ = 3
An ``alliance'' is a subset of the firms. Example: \{$A$, $B$\} is an alliance.
A partition is a collection of alliances so that every firm is in precisely one alliance.
Example:
\newline \{\{A, B\}, \{C\}\} is a partition,
\newline \{\{A\}, \{B\}, \{C\}\} is a partition,
\newline \{\{A\}, \{A, B\}, \{C\}\} is not a partition (A is in more than one alliance)
\newline \{\{A\}, \{C\}\} is not a partition (B is missing)
Assumption: the set of firms can be divided in two subsets $C$ and $D$, ($C \cap D =
\emptyset$, $C + D = F$). All firms within $C$ are each other’s close rivals, all firms
within $D$ are each other’s close rivals. Moreover, for all firms in $C$, firms in $D$
are distant rivals, and for all firms in $D$, firms in $C$ are distant rivals (more on
the implications of this difference below).
The value of an alliance $A$ to firm $i$ equals
$U_i(A) = \sum_{j \in A} s_j - \left[ \alpha \sum_{j \in D} s_j + (\alpha + \beta)
\sum_{j \in C} s_j \right].$
where $s_j$ is the size of firm $j$, $\alpha$ is a firm's disincentive to ally with any
kind of rival, $\beta$ measures the additional disincentive to ally with close rivals
($\beta > 0$). Usually $\alpha > 0$, but for firms that are not rivals it could be equal
to zero, and for firms that happen to have some incentive to go together, a could be
smaller than zero.
One could rewrite the previous equation as $U_i(A) = \sum_{j \in A} s_j p_ij$ with $p_ij$
the propensity of two firms to ally, which is equal to $1-\alpha$ when $i$ and $j$ are
distant rivals, and equal to $1-(\alpha+\beta)$ when $i$ and $j$ are close rivals.
We want to know, given values for $s_j$, $\alpha$, $\beta$, and given subsets $C$ and
$D$, which possible partitions of $F$ are in equilibrium. That is, which partitions of
$F$ fulfil the requirement that none of the firms has an incentive to unilaterally change
to either another existing alliance or start an own ``one firm alliance''.
... see enclosed pdf for rest of text!
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Visual basic: will consider other readable programming languages