
Originally Posted by
Libya
Recall that N is the set of natural numbers, i.e., N = {0, 1, 2, . . .}.
1. Consider the set W of words over the alphabet {a, b, c}, i.e., the set ofall finite non-empty sequences of letters chosen among a, b and c – forexample, aa, babb and bbc are all elements of W.
Let counta be the function from W to N that counts the number oftimes the letter a occurs, i.e., given w ∈ W, counta(w) is the numberof times a occurs in w.
(a) Calculate counta(aa) and counta(bbc).
(b) Is counta injective? Justify your answer.
(c) Is counta surjective? Justify your answer.
ANY HELP WOULD BE GREATLY APPRECIATED, I'M STRUGGLING.