Help Me Find # of Onto Functions from B -> B

  • Thread starter Thread starter James889
  • Start date Start date
  • Tags Tags
    Functions
AI Thread Summary
To determine the number of onto functions from the set B = {1,2,3,4,5} to itself, it's important to note that an onto function must also be one-to-one when the sets are of equal size. There are 55 total functions from B to B, but to be onto, each element in B must map uniquely to every other element. This means that for the first element, there are 5 choices, followed by 4 for the second, and so on, leading to a total of 5! (factorial) onto functions. The discussion clarifies that an element can indeed map to itself, and the function must maintain a one-to-one correspondence to be considered onto. Understanding these principles simplifies the problem of counting onto functions.
James889
Messages
190
Reaction score
1
Hi,

I have a simple question i'd like some help with

let B = \{1,2,3,4,5\}

How many functions from B -> B are onto ?

A kick in the right direction would be nice
 
Physics news on Phys.org
say you have a function defined on
f : a \in A \rightarrow f(a) = b \in B

A function is onto if for every b in B, there exists an a, such that f(a) = b

in this case A = B
f : b \in B \rightarrow f(b) = b' \in B
and there must be a b for every b'

so what else can you say about f?
 
There are, of course, 55 functions from B to B.

In order to be onto, a function from two sets of the same size (which, of course, includes functions from one set to itself) must also be one-to-one. I think that makes the problem simpler.

Choose a number to map "1" to - you have 5 choices. Once that is done, you cannot map anything else to that so you now have 4 choices to map "2" to, 3 to map "3" to, etc. See the point?
 
HallsofIvy said:
There are, of course, 55 functions from B to B.

In order to be onto, a function from two sets of the same size (which, of course, includes functions from one set to itself) must also be one-to-one. I think that makes the problem simpler.

Choose a number to map "1" to - you have 5 choices. Once that is done, you cannot map anything else to that so you now have 4 choices to map "2" to, 3 to map "3" to, etc. See the point?

I see the point, so an element can map to itself?
So is the function also one-to-one ?
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks
Back
Top