Suppose X contains m elements and Y contain n elements. The number of functions from X to Y is
nm
nPm
nCm
Let X=x1,x2,…xm and Y=y1,y2,…yn
For each x1(1≤i≤m) we have n possible images. Therefore, the number of functions from X to Y is nm