Key idea: This is a problem of counting injective functions with forbidden positions (a variation of Derangements). We use the Principle of Inclusion-Exclusion (PIE).
Step 1: Total Injective Functions.
The number of injective functions from a set of size 5 to a set of size 6 is P(6,5).
P(6,5)=(6−5)!6!=6!=720.
Wait, P(n,k)=n(n−1)...(n−k+1).
P(6,5)=6×5×4×3×2=720.
Step 2: Apply Inclusion-Exclusion.
Let S be the set of all injective functions from A to B. ∣S∣=720.
Let Pi be the property that f(i)=i.
We want to find the number of functions that satisfy none of the properties P1,P2,P3,P4,P5.
Formula:
N(none)=∑k=05(−1)k(k5)Nk
where Nk is the number of injective functions where at least k specific elements map to themselves (i.e., f(i)=i for k specific indices).
Step 3: Calculate Nk.
If we fix k elements to map to themselves (e.g., f(1)=1,...,f(k)=k), these k mappings are fixed.
The remaining 5−k elements of A must map injectively into the remaining elements of B.
The remaining elements in B are B∖{1,...,k}.
Size of remaining domain: 5−k.
Size of remaining codomain: 6−k.
The number of ways to map the remaining 5−k elements injectively into the remaining 6−k elements is P(6−k,5−k).
So, Nk=(k5)×P(6−k,5−k).
Let's compute term by term:
k=0: (05)P(6,5)=1×720=720.
k=1: (15)P(5,4)=5×(5×4×3×2)=5×120=600.
k=2: (25)P(4,3)=10×(4×3×2)=10×24=240.
k=3: (35)P(3,2)=10×(3×2)=10×6=60.
k=4: (45)P(2,1)=5×2=10.
k=5: (55)P(1,0). Note: P(n,0)=1.
(55)×1=1×1=1.
Step 4: Sum with alternating signs.
Result = 720−600+240−60+10−1.
Calculation:
720−600=120
120+240=360
360−60=300
300+10=310
310−1=309.
Wait, let me re-check P(1,0).
Definition: P(n,k)=(n−k)!n!.
P(1,0)=1!1!=1. Correct.
Let me re-check the arithmetic.
k=0:720
k=1:600
k=2:240
k=3:60
k=4:10
k=5:1
720−600=120
120+240=360
360−60=300
300+10=310
310−1=309.
Is the answer 309?
Let's check a smaller case.
A={1,2},B={1,2,3}. Injective, f(i)=i.
Total Inj: P(3,2)=6.
k=0:(02)P(3,2)=6.
k=1:(12)P(2,1)=2×2=4.
k=2:(22)P(1,0)=1×1=1.
Result: 6−4+1=3.
Manual check for small case:
Functions from {1,2} to {1,2,3}:
(1,1) No (not inj)
(1,2) No (f(2)=2)
(1,3) Yes (f(1)=1? No f(1)=1. Wait. f(1)=1,f(2)=3. f(1)=1 violates f(i)=i. So No.)
(2,1) Yes (f(1)=2=1,f(2)=1=2). OK.
(2,2) No (not inj)
(2,3) Yes (f(1)=2=1,f(2)=3=2). OK.
(3,1) Yes (f(1)=3=1,f(2)=1=2). OK.
(3,2) No (f(2)=2).
Valid: (2,1), (2,3), (3,1). Count is 3. Matches.
So the formula is correct.
Let's re-calculate the main sum carefully.
720−600=120
120+240=360
360−60=300
300+10=310
310−1=309
Answer: 309
Wait, I wrote 2640 in the answer field initially. Where did that come from?
Maybe I confused it with D6 or something?
D5=44.
D6=265.
Let's check if I made a mistake in P(6,5).
6×5×4×3×2=720. Correct.
Let's check N1.
Fix 1 element. 5 choices.
Remaining 4 elements map to remaining 5 elements injectively.
P(5,4)=5×4×3×2=120.
5×120=600. Correct.
Let's check N2.
Fix 2 elements. 10 choices.
Remaining 3 elements map to remaining 4 elements injectively.
P(4,3)=4×3×2=24.
10×24=240. Correct.
Let's check N3.
Fix 3 elements. 10 choices.
Remaining 2 elements map to remaining 3 elements injectively.
P(3,2)=3×2=6.
10×6=60. Correct.
Let's check N4.
Fix 4 elements. 5 choices.
Remaining 1 element maps to remaining 2 elements injectively.
P(2,1)=2.
5×2=10. Correct.
Let's check N5.
Fix 5 elements. 1 choice.
Remaining 0 elements map to remaining 1 element.
P(1,0)=1.
1×1=1. Correct.
Sum: 309.
Why did I think 2640?
2640=11×240.
Maybe I calculated P(6,5) wrong? No.
Maybe I used B={1..6} and A={1..6}?
If A=B={1..6}, Derangement D6=265.
Okay, the answer is 309.
Answer: 309