Learn R Programming

GameTheoryAllocation (version 1.0)

coalitions: coalitions

Description

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

Usage

coalitions(n)

Arguments

n
Number of the involved players

Value

A list with the following components: A list with the following components:

Examples

Run this code
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 }'

Run the code above in your browser using DataLab