Learn R Programming

CoopGame (version 0.2.2)

divideTheDollarGame: Construct a divide-the-dollar game

Description

Create a list containing all information about a specified divide-the-dollar game: Returns a divide-the-dollar game with n players: This sample game is taken from the book 'Social and Economic Networks' by Matthew O. Jackson (see p. 413 ff.). If coalition S has at least n/2 members it generates a value of 1, otherwise 0. Note that divide-the-dollar games are always simple games.

Usage

divideTheDollarGame(n)

Arguments

n

represents the number of players

Value

A list with two elements representing the divide-the-dollar game (n, Game vector v)

References

Jackson M.O. (2008) Social and Economic Networks, Princeton University Press, p. 413

Examples

Run this code
# NOT RUN {
library(CoopGame)
divideTheDollarGame(n=3)

# }
# NOT RUN {
#Example with four players
library(CoopGame)
(vv<-divideTheDollarGame(n=4))
#$n
#[1] 4

#$v
#[1] 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab