Current location - Training Enrollment Network - Mathematics courses - When solving discrete mathematical problems, if a person wants to climb n steps, if he can step one or two steps at a time, how many ways are there?
When solving discrete mathematical problems, if a person wants to climb n steps, if he can step one or two steps at a time, how many ways are there?
Set X-step and Y-step parts; Then x+2y=n,

1.: when n is odd 2k- 1, x is odd, and y=(n-x)/2. Just choose step X from x+y =(n+x)/2 and take the other two steps, including C((n+x)/2, x).

N=C(K, 1)+C(K+ 1,3)+……+C(2k- 1,2k- 1);

2. When n is an even number 2k, X is an even number. Similarly, n = c (k, 0)+c (k+ 1, 2)+c (k+2, 4)+...+c (2k, 2k);