How many n-bit binary numbers can be formed such that, for every prefix (position) the number of 0's is at least 'x' times than the number of 1's?

48 Views Asked by At

For ex- (1) if n = 5 and x=3 Then 3 such binary nos. are possible, which are- 00000, 00001, 00010 All these nos have no of 0's at least 3 times the no of 1's at any prfix(position)

(2) if n=6 and x=2 Then there are 8 possible binary nos satisfying the given condition- 000000, 000001, 000010, 000011, 000100, 000101, 001000, 001001