The function ; defined by = the highest prime factor of , is :
- Option A: both one-one and onto
- Option B: one-one only
- Option C: onto only
- Option D: neither one-one nor onto
Solution
Core idea. One counterexample settles a failure of one-one, and one missed value settles a failure of onto.
Concept refresher. A function is one-one when
forces , and onto when its range is the whole of .
Picture the situation. The function sends each natural number greater than 1 to its largest prime factor. Powers of the same prime, and many other numbers, share a largest prime factor. The outputs are always primes, while the codomain is all of .
Approach. Give one pair of inputs with equal outputs and one number with no pre-image.
Step 1: Not one-one
Both 2 and 4 have highest prime factor 2, so and is not one-one.
Step 2: Not onto
Every value of is a prime, so the numbers 1 and 4 of the codomain are never values, and is not onto.
Answer. (D) neither one-one nor onto
Sanity check. For example and as well, and no has .
Why the other options are wrong
- (A) Neither holds: , and a composite number such as 4 is never an output.
- (B) The function is not one-one, since .
- (C) The function is not onto , since its outputs are primes and 4, for example, is never reached.
Key takeaway
The trap. The codomain, not the set of primes, decides whether the function is onto.
How toppers think. They test the smallest inputs first.
Remember.