An urn has N balls, each marked with an integer number from 1 to N. For each number in [1,N], there would be exactly one ball marked in the urn. If we randomly pick n balls with replacement from the urn, then we know that there would be N^n (N power n) possible ways of picking n balls. The question is, how many of such ways we’ll have at least one occurrence of c or more successive picks having consecutive increasing numbers?

Example:

For N=9 (range of numbering 1-9, also the number of balls in the urn is 9), n=7 (number of picks), and c=3(number of successive picks with consecutive increasing numbers)

Some of the sequences that are included for answer to this specific example:

i) 1,2,3,1,2,3,1 (2 occurrences of 3 consecutive numbers)

ii) 1,2,3,3,4,5,6 (1 occurrence of 3 consecutive numbers and 1 occurrence of 4 consecutive numbers)

iii) 8,9,9,9,4,5,6 (1 occurrence of 2 consecutive numbers and 1 occurrence of 3 consecutive numbers)

Some of the sequences that are NOT included for answer:

i) 1,2, 4,5, 7,8, 8 (3 occurrences of 2 consecutive numbers. We need at least one occurrence of c=3 or more consecutive numbers)

More Kausik Ghatak's questions See All
Similar questions and discussions