Every ball has two options
⇒4 balls can be put in 24 ways.
As given that boxes are identical so,
arrangement is =12!×24=23
But, above count also includes the one case in which all the balls are put in one box.
⇒ Number of ways =23−1=7
Alternate Solution :
We can divide the balls into two groups : (1,3) and (2,2)
In (2,2), both groups have equal number of balls.
Now, number of ways
=4!1! 3!+4!2! 2!×12!
=4+3=7