0

I'm trying to solve a specific question and I've reached an answer which I believe is incorrect.

Given $|A| = 7$ and $|B| = 10$, how many onto functions are there from B to A?

So, my attempt: $\frac{10!}{3!}$ options for the first $7$ items. the next $3$ items are "free" - the function is onto, so $\frac{10!}{3!} * 10^3.$ Now, the "free" items can be anywhere, and this is my issue - do i multiply by $3^{10}$ or something else? Thank you!

Phicar
  • 14,827
Omri. B
  • 141

2 Answers2

0

You are overcounting. So i guess the $\frac{10!}{3!}$ is $\binom{10}{7}7!$ which is picking $7$ elements of the domain $B$ and sending them injectively to the codomain $A$. Then, when you make the other guys go to whatever(i.e., $10^3$ which should be instead $7^3$) you might be counting twice if you choose the element of the domain in the ones that you send injectively or in the other ones. To avoid this, instead you can partition your domain in $7$ blocks and then associate each block to an element in the codomain. The way to partition a set of cardinality $n$ in $7$ blocks is counted by ${n\brace 7},$ the Stirling numbers of the second kind and then by multiplying $7!$ you are permuting this blocks in the codomain. So the answer is ${10\brace 7}7!=29635200 $

Phicar
  • 14,827
0

There are $7^{10}$ functions that map from $B$ to $A$ (not necessarily surjective)

There are $7$ functions that map $B$ onto one element in $A$ There are ${7\choose 2}2^{10} - 7$ functions that map $B$ onto 2 elements in $A$ There are ${7\choose 3}3^{10} - ({7\choose 2}2^{10} - 7)$ functions that map $B$ onto $3$ elements in $A$

This is an inclusion-exclusion problem

${7\choose 7}7^{10} - {7\choose 6}6^{10} + {7\choose 5}5^{10} -{7\choose 4}4^{10}+{7\choose 3}3^{10}-{7\choose 2}2^{10}+{7\choose 1}1^{10}$

user317176
  • 12,247