combinatorial-0.0: Count, enumerate, rank and unrank combinatorial objects

Safe HaskellSafe



Simulation of a game with the following rules:

Players A and B alternatingly take numbers from a set of 2*n numbers. Player A can choose freely from the remaining numbers, whereas player B always chooses the maximum remaining number. How many possibly outcomes of the games exist? The order in which the numbers are taken is not respected.

E-Mail by Daniel Beer from 2011-10-24.



gameRound :: (Set Int, Set Int) -> [(Set Int, Set Int)] Source #

We only track the number taken by player A because player B will automatically have the complement set.