Let A a1a2a3 a4 and B b1 b2b3b4b5 so that A 4 and B 5 Ho
Solution
total number of required cases will be =(number of injective functions when f(a1)=b1)+ (number of injective functions when f(a2)=b2)- (number of injective functions when f(a1)=b1 and f(a2)=b2) ...(i)
-------------
number of injective functions when f(a1)=b1
when f(a1)=b1 then a2 can be associated with any of b2,b3,b4 or b5 so that can be done in 4 ways
then a3 can be associated with any of remaining 3 letters
then a4 can be associated with any of remaining 2 letters
so number of ways =4x3x2 when a2 starts choosing
same way we can start with a3 or a4
so total number of injective functions when f(a1)=b1 is 3(4x3x2)
----------------------------------
number of injective functions when f(a2)=b2
when f(a2)=b2 then a1 can be associated with any of b1,b3,b4 or b5 so that can be done in 4 ways
then a3 can be associated with any of remaining 3 letters
then a4 can be associated with any of remaining 2 letters
so number of ways =4x3x2 when a2 starts choosing
same way we can start with a3 or a4
so total number of injective functions when f(a2)=b2 is 3(4x3x2)
----------------------------------
number of injective functions when f(a1)=b1 and f(a2)=b2
when f(a1)=b1 and f(a2)=b2 then a3 can be associated with any remaining 3 letters of b
then a4 can be associated with any of remaining 2 letters
so number of ways =3x2 when a3 starts choosing
same way we can start with a4
so total number of injective functions when f(a1)=b1 and f(a2)=b2 is 2(3x2)
----------------------------------
now plug these into formula (i)
we get total number of injective functions =3(4x3x2)+3(4x3x2)-2(3x2)
=126
Hence final answer is 126
