characteristic_func <- c(
1, 2, 0, 3,
3, 1, 4, 2, 5, 3,
3, 6, 4, 5,
15
)
graph_edges <- list(c(1, 2), c(2, 4))
myerson(characteristic_func, graph_edges, method = "exact")
myerson(characteristic_func, graph_edges, method = "appro", n_rep = 1000)
v <- function(S) {
if (length(S) == 2) {
return(1)
}
return(0)
}
n <- 3
graph_edges <- list(c(1, 2))
myerson(v, graph_edges, n_players = n, method = "exact")
myerson(v, graph_edges, n_players = n, method = "appro", n_rep = 2000)
Run the code above in your browser using DataLab