Let us determine the cardinalities of both sets S1 and S2:
Cardinality of S1:
An n×n matrix contains n2 entries. Each entry can take one of 3 possible values from the set {a,b,c}.
∣S1∣=3n2 Cardinality of S2:
The domain {0,1,2,…,n2−1} has n2 elements and the codomain {0,1,2} has 3 elements.
The number of functions from a domain of size n2 to a codomain of size 3 is:
∣S2∣=3n2
Since ∣S1∣=∣S2∣=3n2 and both sets are finite, there exists a bijection (one-to-one and onto mapping) between S1 and S2.
Because a bijection is both surjective and injective:
(B) is correct: A surjection exists.
(C) is correct: A bijection exists.
(A) and (D) are incorrect because a bijection and an injection both exist.