Question: There are 2n individuals queuing up for the cinema, with a fare of 50 cents. Of these 2n individuals, n individuals were only 50 cents and the other n individuals had $1 (paper tickets). The Stupid movie theater started selling tickets at 1 cents. Q: How many queueing methods make it possible for a movie theater to have 50 cents every time a ticket is bought for $1?
Note: $1 = 100 cents a person with 1 dollars, with a paper money, can't break into 2 50 cents
Resolution: Conforms to the number of Cattleya (Catalan), so the answer can be reached directly: (2n)/(n!* (n+1)!).
Catalan number Related: Make h (0) =1,h (1) = 1;
1, Catalan number to meet the recursive type:
H (N) = h (0) *h (n-1) +h (1) *h (n-2) + ... + h (n-1) H (0) (n>=2)
For example: H (2) =h (0) *h (1) +h (1) *h (0) =1*1+1*1=2
H (3) =h (0) *h (2) +h (1) *h (1) +h (2) *h (0) =1*2+1*1+2*1=5;
2, alternative recursion type:
H (N) =h (n-1) * (4*n-2)/(n+1);
3, the solution of the recursive relationship is:
H (N) =c (2n,n)/(n+1) (n=0,1,2,...)
The alternative solution to the recursive relationship is:
4, h (n) =c (2n,n)-C (2n,n+1) (n=0,1,2,...)
Queue up for money when buying tickets for cinemas.