GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 1.3

Separated ones in binary strings

Discrete Mathematics · Combinatorics & Counting · Full GATE CSE 1999 paper

GATE 1999, Q1.3 1 mark · MCQ
Report issue

Combinatorics & Counting

Question 1.3, GATE 1999: Count strings containing n zeros and k ones with no adjacent ones. The listed binomial choice A is C(n+1,k).
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

First place the n zeros in their fixed order. They create n+1 gaps: before the first zero, between consecutive zeros, and after the last zero. A valid string uses at most one 1 in each gap, otherwise two ones would be adjacent. Choose exactly k of those gaps, giving C(n+1,k). Conversely every such choice creates one valid string, so this is a bijection rather than merely an upper bound. When k>n+1 the count is zero.

Original paper, page 1