Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, the question I have is: How many onto functions [9] --> [7] have only one element mapped to 7?

This is asking how many functions with A having 9 elements and B having 7 elements have only 1 element mapped to 7 I suppose.

Now...I can calculate the total number of onto functions using Sterlings number of the 2nd kind: S(9,7) = 462. Now, to account for the number of ways to assign the sets in the domain to n elements in the codomain we multiply 462 by 7! since there are 7 ways to derive functions from the partitions on the first set, 6 for the next, 5 for the next, and so on. So the total number of onto functions [9]-->[7] = 462*7! = 2,328,480.

Now how would I see how many functions in [9]-->[7] have only 1 element mapped to 7? I'm not sure I really understand what it's asking. Any ideas?

Would it be S(8,6)*7?

Edit: Or perhaps S(9,7)*7! - S(9,6)*6!?

share|cite|improve this question
up vote 0 down vote accepted

Your second paragraph loses the requirement that the function be onto. You can choose the element of $A$ mapped to $7$ in $9$ ways. Leaving aside the elements accounted for, you need an onto function from eight elements into six, which is $S(8,6)6!$, so the final answer is $9S(8,6)6!=1723680$

share|cite|improve this answer
Excellent. I was sort of on the right track. Thank you for the explanation :D – Carl Mar 28 '14 at 5:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.