Suppose we have 4 2's and 2 1's. In how many ways we can form a no contains $(4 + 2)$ digits such that all are different and each no contain at least 2 2's together?
I tried in the following way- Suppose $a=4 $ and $b=2$
- total no of ways=$\binom{6}{2}=15$ ways
- Now according to question at least 2 2's should be together so I assumed 2 2's a single quantity now i have a=3 and b=2 which gives 10 ways
But the correct answer will be 15 because whatever be the arrangement at least 2 2's will always occur together.
Example for more clarification-
if a=2 and b=1
221,212,122 3 ways possible
I just want to know how to find the formula for this type of questions.
When you bundled a pair of $2$'s together, you no longer have two types of objects ($1$'s and $2$'s), you have three: two single $1$'s, two single $2$'s and one bundled "$(22)$", where the parentheses emphasize the bundling. So naively, now, you might arrive at the answer ${5\choose2}\cdot{3\choose2}\cdot{1\choose1}=10\cdot3\cdot1=30$, which, of course, is also wrong, because it's too large (given that $15$ is the correct answer). But the reason why it's wrong (and too large) is easy to see: It counts numbers like $122122$ twice, once as $1(22)122$ and once as $1221(22)$.
It's possible to arrive at the correct answer using this "bundling" approach, but it's a lot of work. You can't just divide by $2$, arguing that everything is being counted twice. Some numbers, like $212212$ get counted only once, while others, like $122221$, get counted three times. For this problem, it seems, the quickest way to get the correct answer is simply to count the number of ways to position the $1$'s and observe that there are always at least two $2$'s next to each other.