A square is divided into 9 identical smaller squares. Now, In how many ways can 5 different balls be placed in them such that every cell has at least 1 ball ?

The mentioned query can have 2 case

**Case I:**

If one row contains 3 balls and the other two rows contain 1 ball each

Then, number of ways of arrangement = ^{3}C_{1} × (^{3}C_{3} × ^{3}C_{1} × ^{3}C_{1}) = 27 ways

**Case II:**

If one row contains 1 ball and the other two rows contain 2 balls each.

Then, number of arrangements = ^{3}C_{1} × (^{3}C_{2} × ^{3}C_{2} × ^{3}C_{1}) = 81.

Hence, total number of arrangements = 27 + 81 = 108

**
**