I have tried to solve them. I would like to know if my answers are correct.
(a)
The total number of functions without any restrictions
##=n^m##
The number of functions such that ##f(x)## is never ##1##
##=(n-1)^m##
The number of functions such that ##f(x)=1## for at least one ##x\in S_m##...