do you know how many onto functions are there from a set A to set B of cardanility m and n respectively ?
Yes I know.
lol let see what james and zarkon say
This one is well known for a any combinatorics student.
Lets say if you have 12 pieces of distinct candies and 3 children, in how many ways can you distribute them if each get at-least one ?
btw easy one: how many injection is possible ?
and what about bijection ?
if n<m and under a function each element of A can map to only one element of B, there can be no onto functions. I think
yep, but n>m
It's the opposite, I think, because you're mapping from A to B. A elements have to be more than B.
n^m i think
Or equal*.
i think n>m is a lot harder to think for me
n and m don't have any restrictions do they? You can have everything map to the same value, or you can have some values unmapped if m is smaller.
no,Mr.Math myin is right, if \( f:A \to B \) cardnality of B should be greater than or equal to A
Fool: why? f(anything) mapping to 6.32 is still a valid function, even though cardinality of A is infinite and cardinality of B is 1.
Well, I don't give easy problems to men-i-naya ;) :D
if n = m we have a bijection...
ktk you are counting onto functions, assume finite sets.
we are*
are you saying with finite sets it's not legal to have more than one value map to the same value?
@ktklown: I am not talking about anything else outside this precise problems with precise constraints.
So B has m elements and the first element of A can map to any the elements in B. The second can map to any of the remaining m-1 elements in B. Third can map to any of the m-2 elements in B. and so on... So the total number of onto functions is m(m-1)(m-2)...(3)(2)(1)=m!
but for the last case needs more thinking
myin your analysis is right for bijection
I still think that cardinality of A has to be greater than equal than B. Can you find a surjection from \((1,2)\to (a,b,c)\)?
yes, we can Mr.Math
m<n here there are no onto functions
wait no i had my cardinalities mixed up
|A|=m |B|=n
The condition should be \(m\ge n\).
I'm confused now. Its bed time.
lol
|A|=m; and |B|=n and 1<= n <=m, then the number of onto functions form A to B is ?
I blame fool and mr. math for all of my confusion. Fool for asking a hard problem this late and mr. math for being there.
lol, :D
Give yourself an applause.
lol, that's what I've been saying @fool :D
look at Stirling numbers of the second kind
yes there goes Zarkon!
I'm sorry myin, but you've been having the wrong condition :P
but not exactly \( \left\{\begin{matrix} m \\ n \end{matrix}\right\} \) though.
i got my m and n mixed up for the sets earlier
you will need an n! too.
yep! \[ n! \times \left\{\begin{matrix} m \\ n \end{matrix}\right\} \]
btw Zarkon, do you know the inclusion-exclusion approach for this one ?
if m=n: So B has n elements and the first element of A can map to any the elements in B. The second can map to any of the remaining n-1 elements in B. Third can map to any of the n-2 elements in B. and so on... So the total number of onto functions is n(n-1)(n-2)...(3)(2)(1)=n!
Join our real-time social learning platform and learn together with your friends!