PROJECT EULER · #0964
Musical Chairs Revisited
A group of
At the beginning, they are all seated on chairs arranged in a circle.
During the
- The music starts playing and
children are randomly selected, with all combinations being equally likely. The selected children stand up and dance around. - When the music stops, these
children sit back down randomly in the available chairs, with all permutations being equally likely.
Let
You are given
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.