Key idea: This is a counting-functions question, recognisable because the options ask about functions with a given image size, injective functions, and surjective functions with restrictions.
Step 1: Understand the sets.
The domain has 4 elements: {1,2,3,4}.
The codomain has 3 elements: {1,2,3}.
A function assigns each of the 4 domain elements to one of the 3 codomain elements.
Step 2: Check option A.
We need functions whose image has exactly 2 elements.
First choose the 2 codomain elements that will appear:
(23)=3.
For a fixed 2-element image, the function must use both chosen values.
Total functions into those 2 values:
24=16.
The only functions that do not use both values are the two constant functions.
So the number of onto functions onto the chosen 2-element set is:
24−2=14.
Therefore the number of functions with image size exactly 2 is:
3⋅14=3⋅(24−2).
Option A is true.
Step 3: Check option B.
We need functions whose image has exactly 3 elements.
Since the codomain itself has 3 elements, this is exactly the number of surjective functions from a 4-element set to a 3-element set.
Use inclusion-exclusion.
Total functions:
34.
Subtract functions missing at least one codomain element.
Choose the missing element in (13)=3 ways, and map into the remaining 2 elements:
3⋅24.
Add back functions missing two codomain elements.
Choose the two missing elements in (23)=3 ways, and map into the remaining 1 element:
3⋅14=3.
Thus the number is:
34−3⋅24+3.
Option B is true.
Step 4: Check option C.
An injective function must send distinct domain elements to distinct codomain elements.
The domain has 4 elements, but the codomain has only 3 elements.
By the pigeonhole principle, two domain elements must share the same value.
Therefore no injective function exists.
The number of injective functions is 0.
Option C says this number is nonzero, so option C is false.
Step 5: Check option D.
We need surjective functions with f(1)=1 and f(2)=2.
Since 1 and 2 are already in the image, surjectivity only requires that 3 appears at least once among f(3) and f(4).
The values of f(3) and f(4) can each be chosen from {1,2,3}.
Total unrestricted choices:
32=9.
Count the bad choices where 3 does not appear.
Then both f(3) and f(4) must be chosen from {1,2}:
22=4.
Hence the number of valid surjective functions is:
9−4=5.
Option D is true.
Answer: Options A, B and D are true; option C is false.
Common trap: treating “image has exactly 2 elements” as “choose any 2 values and map freely”. The function must actually hit both chosen values, so constant maps must be removed.