mycroft holmes
Last Activity: 14 Years ago
Label the people who have Rs. 5 with them as A and those with Rs.10 as B. You need a sequence of length 2n composed of n A's and n B's such that number of B's never exceeds the number of A's at any segment of the sequence taken from the initial point. That is called in combinatorics as a Dyck Sequence.
The number of such sequences is the nth Catalan Number given by
This is out of your syllabus, but of your interested you can consult the wiki article http://en.wikipedia.org/wiki/Catalan_number