In an examination, a candidate is required to answer 7 questions out of 12, which are divided into two groups, each containing 6 questions. One cannot attempt more than 5 questions from either group. In how many ways can he choose these questions?
There are total 13 questions out of which 10 is to be answered .The student can answer in the following ways:
$\Rightarrow 3$ questions from part $A$ and 4 from part $B$
$\Rightarrow 4$ questions from part $A$ and 3 from part $B$
$\Rightarrow 5$ questions from part $A$ and 2 from part $B$
$\Rightarrow 2$ questions from part $A$ and 5 from part $B$
$\Rightarrow$ total ways in the 1 st case are ${ }^{6} \mathrm{C}_{3} \times{ }^{6} \mathrm{C}_{4}$
$\Rightarrow$ total ways in the 2 nd case are ${ }^{6} \mathrm{C}_{4} \times{ }^{6} \mathrm{C}_{3}$
$\Rightarrow$ total ways in the 3 rd case are ${ }^{6} \mathrm{C}_{5} \times{ }^{6} \mathrm{C}_{2}$
$\Rightarrow$ total ways in the 4 th case are ${ }^{6} \mathrm{C}_{2} \times{ }^{6} \mathrm{C}_{5}$
thus the total of the all the cases would be $={ }^{6} \mathrm{C}_{4} \times{ }^{6} \mathrm{C}_{3}+{ }^{6} \mathrm{C}_{3} \times{ }^{6} \mathrm{C}_{4}{ }^{+6}{ }^{6} \mathrm{C}_{5} \times{ }^{6} \mathrm{C}_{2}+{ }^{6} \mathrm{C}_{2} \times{ }^{6} \mathrm{C}_{5}$
Applying ${ }^{\mathrm{n}} \mathrm{C}_{r}=\frac{\mathrm{n} !}{\mathrm{r} !(\mathrm{n}-\mathrm{r}) !}$
$=780$ ways.