Number of injections, of functions

  • Thread starter Thread starter geoffrey159
  • Start date Start date
  • Tags Tags
    Functions
Click For Summary
The discussion focuses on calculating the number of injections from a finite set E to another finite set F, establishing that the number of injections is given by the formula n!/(n-p)!. The participant demonstrates a bijection between the set of injections and arrangements of elements, confirming the correctness of this approach. Additionally, they explore the number of functions from E to F, concluding that it equals (n+1)^p when including a distinct element not in F. A clarification is made regarding the distinction between functions defined on the entire set E versus those defined only on a subset. The analysis effectively addresses the homework problem's requirements.
geoffrey159
Messages
535
Reaction score
72

Homework Statement


Show that the number of injections from ##E \rightarrow F ##, ##E,F## finite sets, ## p = \#E ,\ n = \#F,\ p\le n ##, is ##\frac{n!}{(n-p)!} ##
Then, find the number of functions from ##E \rightarrow F ##.

Homework Equations



## A = \{ \text{injections from }E \rightarrow F \} ##
## B = \{ \text{arrangements of } p \text{ elements among } n \} ##
## C = \{ \text{functions from }E \rightarrow F \} ##
## D = (F \cup \{a\}) \times ...\times (F \cup \{a\})##, ## p ## times , ## a \notin F ##

The Attempt at a Solution



Hello, I have to solve this problem for my homework. It took me a while but I think I have found it. Is it correct ?

a) I want to prove that there is a bijection from ##A## to ##B## so that ##\# A = \#B = \frac{n!}{(n-p)!} ##.
I define the mapping ## h: A \rightarrow B ## by ## h(f) = (f(x_1),...,f(x_p)) ##.

We have ##h(f)\in B## because ##f## is injective.

##h## is injective because for all ##f,g\in A##, ## h(f) = h(g) \Rightarrow \forall i=1...p,\ f(x_i) = g(x_i) \iff f = g ##.

For any arrangement ##(y_1,...,y_p)\in B##, I define ##f## such that for all ##i = 1...p##, ## f(x_i) = y_i ##. Then ##f## is necessarily injective because if we had ## f(x_i) = f(x_j)## and ## x_i \neq x_j ##, then we would have ## y_i = y_j ##, which contradicts the definition of an arrangement. So ## f\in A ## and ##h## is a surjection.

So ## h ## is a bijection

b) Same kind of problem.
I define the mapping ## h: C \rightarrow D ## by ## h(f) = (y_1, ..., y_p)## where
\begin{equation}
y_i =
\left\lbrace
\begin{array}{ccc}
f(x_i) & \mbox{if} & x_i\in \cal D(f)\\
a & & \mbox{otherwise} \\
\end{array}\right.
\end{equation}

Injectivity is shown the same way as above.

For any tuple ##(y_1,...,y_p)\in D##, I define ##f## by ## f(x_i) = y_i \iff y_i \neq a ##. Clearly ##f## belongs to ##C## and h is surjective .

Then h is bijective and ##\# C = \#D = (\#(F \cup \{a\}))^p = (n+1)^p ## (because ##\{a\}## and ##F## disjoint)
 
Last edited:
Physics news on Phys.org
a) seems correct to me

b) You seem to also count the functions that have as domain any subset of E. Why you doing that? Otherwise the answer should be ##n^p##.
 
Hello, thank you for proofreading.
Concerning your question, the difference between a function ##f## and a mapping ##g## both from ## E \rightarrow F ##, is that ##{\cal D}(f)\subset E## while ##{ \cal D}(g) = E ##. There are functions that are not defined on ##E## entirely (ex: ##E = \mathbb{R},\ f(x) = \frac{1}{x},\ {\cal D}(f) = E - \{0\}## )
 

Similar threads

Replies
4
Views
4K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K