Cattleya number and variants thereof

Face questions

Determine n th left parenthesis, right parenthesis all sequences of n consisting of m have exactly the total number of sequences that do not match.

analysis

A Solution

By meterHe played 2.5 hours, with several autistic

Solution two

Easy to know that the answer is 0, i.e., m is a number Cattleya, then the question becomes extended sequence number of legal issues.

Recalling number Cattleya proof, consider the fold line, starts at the origin meets the oblique left parenthesis Videos, diagonally downward right parenthesis met drawing, all the lines are in any case beyond the last (2n, 0) (since the same number of times up and down ), the total number that is from the origin to (2N, 0) of the program number C (2n, n) (2n step either take on the n moving towards), m = about 0 requires parentheses exact match, then the fold lines never cross the x-axis ( there is no right parenthesis too much left parenthesis matching, undesirable). The number of legal requirements may be considered legitimate sequence = Total - not legal. Analysis of the x-axis have just crossed the line is not valid and not valid lines will intersect with the y = -1, set y = -1 and the first intersection point k is, regarding the future fold line k y = -1 symmetric certainly has (2n, 0) corresponds to (2n, -2), the number of programs is not legitimate Switch from the origin to (2n, -2), i.e. equivalent to less than the right bracket 2 when the total number of programs left parenthesis C (2n, n-1) (total number of still 2n, but the n-1 left parenthesis, n + 1 th right parenthesis).

Promotion by: analytically known up to m of illegal = Total - at least m + 1 do not legitimate,
then the requirements just the m = Total - at most m -. 1 on - at least m + 1 pair,
is C (2n, n) - (C (2n, n) - C (2n, nm)) - C (2n, nm-1);

recommend

Cattleya number of proof (catalan) of the dogleg method - Combinatorics

Guess you like

Origin www.cnblogs.com/Thomastine/p/11778713.html