number of ways to arrange

115 Views Asked by At

There are N 1s and N 0s We have to arrange them in a row such that at no position in this row the number of 0s from the beginning exceed the number of 1s from the beginning. Also the number of occasions when a 1 is immediately followed by a 0 should be exactly K. In how many ways can they be arranged?