if (FALSE) {
get_max_n_coalitions_causal(list(1:10)) # 2^10 = 1024 (no causal order)
get_max_n_coalitions_causal(list(1:3, 4:7, 8:10)) # 30
get_max_n_coalitions_causal(list(1:3, 4:5, 6:7, 8, 9:10)) # 18
get_max_n_coalitions_causal(list(1:3, c(4, 8), c(5, 7), 6, 9:10)) # 18
get_max_n_coalitions_causal(list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) # 11
}
Run the code above in your browser using DataLab