We are given two sets $A = \{1, 2, 3\}$ and $B = \{a, b, c, d, e\}$. We need to solve the following problems: i) Find the total number of functions from $A$ to $B$. ii) Find the number of injective functions from $A$ to $B$. iii) Find the number of injective functions from $A$ to $B$ such that $f(1) = a$. iv) Find the number of injective functions from $A$ to $B$ such that $f(1) \ne a$ and $f(2) \ne b$.

Discrete MathematicsSet TheoryFunctionsInjective FunctionsCombinatoricsCounting
2025/5/27

1. Problem Description

We are given two sets A={1,2,3}A = \{1, 2, 3\} and B={a,b,c,d,e}B = \{a, b, c, d, e\}. We need to solve the following problems:
i) Find the total number of functions from AA to BB.
ii) Find the number of injective functions from AA to BB.
iii) Find the number of injective functions from AA to BB such that f(1)=af(1) = a.
iv) Find the number of injective functions from AA to BB such that f(1)af(1) \ne a and f(2)bf(2) \ne b.

2. Solution Steps

i) The total number of functions from a set AA with A=m|A| = m to a set BB with B=n|B| = n is nmn^m. Here, A=3|A| = 3 and B=5|B| = 5, so the number of functions from AA to BB is 53=1255^3 = 125.
ii) The number of injective functions from a set AA with A=m|A| = m to a set BB with B=n|B| = n where mnm \le n is given by the formula:
P(n,m)=n!(nm)!P(n, m) = \frac{n!}{(n-m)!}.
In our case, n=5n = 5 and m=3m = 3. So, the number of injective functions is:
P(5,3)=5!(53)!=5!2!=1202=60P(5, 3) = \frac{5!}{(5-3)!} = \frac{5!}{2!} = \frac{120}{2} = 60.
iii) If f(1)=af(1) = a, then we need to find the number of injective functions from the remaining two elements of AA, {2,3}\{2, 3\}, to the remaining four elements of BB, {b,c,d,e}\{b, c, d, e\}. The number of such injective functions is P(4,2)=4!(42)!=4!2!=242=12P(4, 2) = \frac{4!}{(4-2)!} = \frac{4!}{2!} = \frac{24}{2} = 12.
iv) We need to find the number of injective functions from AA to BB such that f(1)af(1) \ne a and f(2)bf(2) \ne b.
First, we compute the total number of injective functions from AA to BB, which is 6060.
We subtract the number of injective functions such that f(1)=af(1) = a, which is 1212.
We subtract the number of injective functions such that f(2)=bf(2) = b. If f(2)=bf(2) = b, then we map the remaining two elements of AA to the remaining four elements of BB. The number of such injective functions is P(4,2)=4!2!=12P(4, 2) = \frac{4!}{2!} = 12.
However, we subtracted twice the number of injective functions such that f(1)=af(1) = a and f(2)=bf(2) = b. If f(1)=af(1) = a and f(2)=bf(2) = b, then we need to find an injective function from the remaining one element of AA, {3}\{3\}, to the remaining three elements of BB, {c,d,e}\{c, d, e\}. The number of such injective functions is P(3,1)=3!(31)!=3!2!=3P(3, 1) = \frac{3!}{(3-1)!} = \frac{3!}{2!} = 3.
Using inclusion-exclusion, we have:
Total injective functions = 60
f(1)=af(1) = a: 12
f(2)=bf(2) = b: 12
f(1)=af(1) = a and f(2)=bf(2) = b: 3
The number of injective functions where f(1)af(1) \ne a and f(2)bf(2) \ne b is:
601212+3=3960 - 12 - 12 + 3 = 39
Another way to solve this is:
There are 5 choices for f(1)f(1). Since f(1)af(1) \ne a, there are 4 choices for f(1)f(1).
Now consider f(2)f(2). There are 5 choices for where f(2)f(2) can be mapped. But f(2)f(1)f(2) \ne f(1) and f(2)bf(2) \ne b.
If f(1)=bf(1) = b, then there are 4 choices for f(2)f(2) since f(2)bf(2) \ne b and f(2)f(1)f(2) \ne f(1).
If f(1)bf(1) \ne b, then there are 3 choices for f(2)f(2) since f(2)bf(2) \ne b and f(2)f(1)f(2) \ne f(1).
Then we have two cases.
Case 1: f(1)=bf(1) = b. In this case, we have 1 choice for f(1)f(1) and 4 choices for f(2)f(2). Then there are 3 choices for f(3)f(3), for a total of 1×4×3=121 \times 4 \times 3 = 12 functions.
Case 2: f(1)bf(1) \ne b and f(1)af(1) \ne a. In this case, we have 3 choices for f(1)f(1), 3 choices for f(2)f(2) since f(2)bf(2) \ne b and f(2)f(1)f(2) \ne f(1). Then there are 3 choices for f(3)f(3), for a total of 3×3×3=273 \times 3 \times 3 = 27 functions.
So, the total number of such injective functions is 12+27=3912 + 27 = 39.

3. Final Answer

i) 125
ii) 60
iii) 12
iv) 39

Related problems in "Discrete Mathematics"

We are given three sets $M$, $N$, and $\mu$. $M$ contains integers $x$ such that $2 \le x \le 6$, $N...

Set TheorySet OperationsComplementIntersection
2025/6/3

From a group of 5 male students and 8 female students who have good performance in writing poems, a ...

CombinatoricsPermutationsCombinationsCounting
2025/5/30

The problem states that there are 5 male students and 8 female students who have good poetry writing...

CombinatoricsCombinationsPermutationsFactorialsCounting Problems
2025/5/30

A restaurant offers meals with the following components: rice/noodle/potatoes, beef/pork/chicken, ve...

CombinatoricsCounting PrinciplesProduct Rule
2025/5/30

We are given the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. We want to form a 4-digit number using th...

CombinatoricsPermutationsCountingNumber TheoryDivisibility Rules
2025/5/28

We are given the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. We want to form a four-digit number using ...

CombinatoricsCountingPermutationsNumber TheoryDivisibility Rules
2025/5/28

We have the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. We want to form a four-digit number with distinct d...

CombinatoricsPermutationsCounting
2025/5/27

The problem states that we have the digits $0, 1, 2, 3, 4, 5, 6, 7, 8, 9$. We want to form four-digi...

CombinatoricsPermutationsCounting ProblemsNumber Theory (Divisibility)
2025/5/27

The problem states that there are 10 students volunteering for community work. The community leader ...

CombinatoricsCombinationsCounting
2025/5/27

The problem describes a survey of investors, where we are given the number of investors in stocks, m...

Set TheoryVenn DiagramsInclusion-Exclusion Principle
2025/5/27