coalitions: coalitions

Description Usage Arguments Value Author(s) Examples

Description

This function gives all the coalitions in a binary mode and usual way.

Usage

1

Arguments

n

Number of the involved players

Value

A list with the following components:

Binary

A matrix where each row indicates a binary representation of the coalition in a binary mode. The second one, the usual way.

Classic

A vector with the associated representation of the coalitions.

Author(s)

A. Saavedra-Nieves

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
coalitions(3)
#$Binary
#     [,1] [,2] [,3]
#[1,]    0    0    0
#[2,]    1    0    0
#[3,]    0    1    0
#[4,]    0    0    1
#[5,]    1    1    0
#[6,]    1    0    1
#[7,]    0    1    1
#[8,]    1    1    1
#
#$Classic
#[1] "0"           "'{ 1 }'"     "'{ 2 }'"     "'{ 3 }'"     "'{ 1,2 }'"  
#[6] "'{ 1,3 }'"   "'{ 2,3 }'"   "'{ 1,2,3 }'

Example output

Loading required package: e1071
Loading required package: lpSolveAPI
$Binary
     [,1] [,2] [,3]
[1,]    0    0    0
[2,]    1    0    0
[3,]    0    1    0
[4,]    0    0    1
[5,]    1    1    0
[6,]    1    0    1
[7,]    0    1    1
[8,]    1    1    1

$Classic
[1] "0"           "'{ 1 }'"     "'{ 2 }'"     "'{ 3 }'"     "'{ 1,2 }'"  
[6] "'{ 1,3 }'"   "'{ 2,3 }'"   "'{ 1,2,3 }'"

GameTheoryAllocation documentation built on May 6, 2019, 1:10 a.m.