JEEOlympiad

A sequence of 12 steps is formed, each step being +1 or -1. The…

Question

A sequence of 12 steps is formed, each step being +1 or -1. The sequence starts at height 0, and every partial sum (the height after each step) must be greater than or equal to 0. The final height after all 12 steps must equal 2. How many such sequences are there?

✓ Verified answer: 297checked by our engine — not a guess

Step-by-step solution

With 12 steps and final height 2, we need u up-steps (+1) and d down-steps (-1) with u+d = 12 and u-d = 2, so u = 7, d = 5.

We count lattice paths with 7 up and 5 down steps from height 0 to height 2 that never go below 0.

By the reflection principle (ballot-type), the number of paths from 0 to k in n steps that stay >= 0 equals C(n, (n+k)/2) - C(n, (n+k)/2 + 1), where the subtracted term reflects paths touching -1.

Here n = 12, k = 2, so (n+k)/2 = 7. Number = C(12,7) - C(12,8) = 792 - 495 = 297.

Final answer297

Stuck on a problem like this?

Paste any JEE or NEET question — verified working, a confidence %, and an honest “not sure” instead of a bluff.

Solve my doubt →

More Combinatorics solutions