This is a very beautiful sample problem from ISI MStat PSB 2013 Problem 3 based on Counting principle . Let’s give it a try !!

**Problem**– ISI MStat PSB 2013 Problem 3

- Suppose integers are formed by taking one or more digits from the
- following \( 2,2,3,3,4,5,5,5,6,7 \) . For example, 355 is a possible choice while 44 is not. Find the number of distinct integers that can be formed in which
- (a) the digits are non-decreasing;
- (b) the digits are strictly increasing.

**Prerequisites**

Basic Counting Principle

## Solution :

(a) To find the number of integers with non-decreasing digits we will go by this way

First see that the position of given digits are fixed as they have to form non-decreasing digits what can be do is to select number of times the particular digit occurs .

For example 223556 in an integer With non-decreasing digits so here 2 occurs

2 times, 3 occurs 1 times, 4 doesn’t occurs any times, 5 occurs 2 times, 6 occur 1 time and finally 7 which doesn’t occur any number of times.

So, here we have (0,1,2) possible choices of occurrence of 2 ,(0,1,2) possible choices of occurrence of \( 3, \cdots,\) (0,1) possible choices of occurrence of 7 .

Hence, number of such integers \(=3 \times 3 \times 2 \times 4 \times 2 \times 2-1\).

We are subtracting 1 to exclude the case where no digits has occur any number of times.

(b) To find the number of integers with increasing digits we can go by above method. Here there is only one restriction that a digit must be greater than it’s preceding digits.so, no consecutive digits can be equal. Hence every digits has two choices (0,1) of occurrence . Therefore number of such integers = \( 2^{6}-1\) .

We are subtracting 1 to exclude the case where no digits has occur any number of times.

## Food For Thought

A number is chosen randomly from all the 5 digited numbers.Find out the probability that the digits form a non decreasing sequence.

Hint 1 : Find what is invariant here .

Hint 2 : Use the non-negative integer solutions of a equation formula .

Google