Queue up for money when buying tickets for cinemas.

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.