Counting Surjective functions without using the formula

114 Views Asked by At

Ok, so suppose I have a Domain set A with 5 elements {1,2,3,4,5} that maps to CoDomain set B with 3 elements {A,B,C}

How do I find how many surjective functions there are?

My intuition was to take all the functions: 3^5 and subtract it from

functions of range 2 (only map to 2 elements): 3(2^5)

functions of range 1 (only map to 1 element): 1

To equal 3^5-((3*2^5)+1)

all the solutions i've seen online seem to not take into account for range 1, I'm just wondering why