coalitions: Coalitions for a given numbers of players 'n'.

Description Usage Arguments Value Author(s) Examples

View source: R/coalitions.R

Description

This functions gives all the coalitions, including the empty coalition, for a number of players n.

Usage

1

Arguments

n

Number of players.

Value

A list with the following components:

Binary

Matrix where each row is a binary representation of the coalition.

Usual

Vector with the usual configurations of the coalitions.

Author(s)

D. Prieto

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Number of players:
n <- 3
# Associated coalitions:
coalitions(n)

# $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
# 
# $Usual
# [1]   0   1   2   3  12  13  23 123

coopProductGame documentation built on Aug. 25, 2018, 5:04 p.m.