On the Catalan number-- Cartland number

First, the definition:

  Cattleya number is set to meet a number of columns recurrence relation of the following:

      

Second, the deformation:

  First, let h (n) is n + 1, the number of items of Catalan, so that h (0) = 1, h (1) = 1, Catalan a number satisfying the recurrence formula:

    h(n)= h(0)*h(n-1)+h(1)*h(n-2) + ... + h(n-1)*h(0) (n>=2)

  1 may be simplified as order recursive relationship: h (n) = (4n-2) / (n + 1) * h (n-1) (n> = 2)

   Want to prove a point here: https://blog.csdn.net/guoyangfan_/article/details/82888872

  Term formula: 1, h (n) = C (2n, n) / (n + 1)

        2, h (n) = C (2n, n) -C (2n, n-1)

Third, the application model:

  1, the definition of type:

    N number of projections seeking triangular polygon division scheme:

    

 

    N nodes seeking the number of binary tree form:

       Provided f (n) represents the form of binary tree has n number of nodes, f (N) is the answer.

       First, there must be a root node. There are provided left of the root node k, the right has node Nk-1, then f (N) = f (k) * f (Nk-1). Since k can take the 0 ~ N-1,

      To give f (N) = f (0 ) * f (N-1) + f (1) * f (N-2) + ... + f (N-1) * f (0) by the addition principle, in line with Cattleya defined form number, so that F (N) is the number Cattleya h N items.

  2, Term Formula type:

     Stack order:
        A stack (infinity) into the stack of sequence 1,2,3, ..., n, the number of different legal Stack sequence?
          Provided a push operation is '0', a pop operation is '1'.
          Each valid first found out of the stack corresponds to a unique sequence and a legitimate string 01, the string length of 01 2n, with n '0' and n '1'. Consider this series 01 and found that it must meet for each bit, from its open
       Beginning forward number, the number of zeros equal to the number greater than 1. Fill program number n is 0 in the 2n-bit  . From  subtracting the number of program does not meet the requirements of the request is the answer.
          Considered illegal program: sweep from left to right when bound p + 1 st 1, and the p 0s appear on one of first odd bit 2p + 1. Thereafter [2p + 2,2n] 2n- (2p + 1) th bit n-p 0, n-p-1 1-on.
       Should the latter part 2n- (2p + 1) bits 1 and 0 interchanged, making 1-n-p, n-p-1 0, a result obtained by the 1 th and n + 1 n- 0 1 composed of 2n bits, i.e., an illegal program must correspond to a a n + 1
          1 and arranged in a number of n-1 zeros.
           Conversely then, any one of a permutation of n + 1 and the n-1 1 0 composed of, because it must 2p number of ones on the two, and is an even number 2n + 1 in an odd bit number 1 exceeds the number 0 appears. with
       Like the rear portion 1 and 0 interchanged, it becomes 2n bits by n 0 and n-1 thereof. Thus found, each of the illegal program is always only one of the n + 1 and the n-1 zeros are arranged one by one.
           As a result, the number of illegal schemes can be written as: .
           So the answer =

 

     Various modification problems of:

      Looking for change (find half): 2n individuals have lined up to enter the theater. Admission $ 5. Of which only n individuals have a five dollar bill, while only 10 people n dollar bills, no other theater bills, asked how many methods so that as long as people buy tickets 10 yuan, ticket office there is a $ 5 bill change?  

      Ball cartridge problem: min balls of two colors, black and white only n respectively have the same number of boxes and the number of balls, each of which can release a ball box, and must satisfy the constraint that each have a white ball and a black ball pairing, how many kinds of situations?

      Triangular Grid:
          
        Such shaped like a right triangle mesh, from the upper left corner, and can only go right down the road and can only walk the red squares, asked a total of how many moves?
      添加括号:矩阵连乘: ,共有(n+1)项,依据乘法结合律,不改变其顺序,只用括号表示成对的乘积,试问有几种括号化的方案?或者说:有n对括号,可以并列或嵌套排列,共有多少种情况?
     这些题的本质:“n个0和n个1组成一个2n位的2进制数,要求从左到右扫描时,1的累计数始终都小于等于0的累计数,求满足条件的数有多少?”
        画个表格整理一下:
      

 

        同列事件可视为等价,且在题目要求中事件1的次数/大小需要始终大于事件2。像这样的题都可以用卡特兰数的通项公式解。

      

 

 

 

 

 

 

   

 

 

      

Guess you like

Origin www.cnblogs.com/InductiveSorting-QYF/p/11672308.html