The number of Onto functions, f:{a, b, c, d} to {p, q, r} , is
If A and B are two sets having m and n elements respectively such that 1≤n≤m then number of onto function from A to B is
∑ (-1)n-r nCr rm r vary from 1 to n
No of elements of A = 4
No of elements of B = 3
usint this formula ∑ (-1)n-r nCr rm r vary from 1 to n
{[(-1)^(3-1)]*3C1*1^4} + {[(-1)^(3-2)]*3C2*2^4{ +{ [(-1)^(3-3)]*3C3*3^4}
= 1*3*1 + (-1)*3*16 + 1*1*81
= 3-48+81
=36