Combinatorics & Counting

Answer & solution
Answer: C_n = binom(2n,n) − binom(2n,n−1) = binom(2n,n)/(n+1). (no official key was published)
Interpret a zero as a +1 step and a one as a −1 step. A balanced string gives a walk from height 0 to height 0 in 2n steps. The prefix restriction asks that the height never become negative. There are binom(2n,n) balanced strings before imposing the restriction.
Count the bad strings by reflection. A bad walk has a first step reaching height −1. Swap zeros and ones in the segment from the beginning through that first visit. Originally that segment has one more one than zero; after the swap it has one more zero than one. Consequently the transformed entire string has n+1 zeros and n−1 ones and ends at height +2.
Conversely, any string with n+1 zeros and n−1 ones must first reach height +1. Reflect its prefix through that first visit. The resulting balanced walk first reaches −1 there, so it is bad. These two operations invert each other, establishing a bijection. The number of bad strings is therefore binom(2n,n−1), choosing the positions of its n−1 ones after reflection.
Subtracting gives binom(2n,n)−binom(2n,n−1). Since binom(2n,n−1)=n·binom(2n,n)/(n+1), the result is Cn=binom(2n,n)/(n+1), the nth Catalan number. For n=0, the empty string contributes one; for n=2, the valid strings are 0011 and 0101, agreeing with C2=2.