S1 : All the elements in A are mapped to B , therefore f is a valid function (S1 is true)
S2 : All the elements in B are not mapped to C, therefore g is not a valid function (S2 is false)
S3 : f(g(1)) cant be found because g(1) has no mapping therefore f 0 g is not valid ( S3 is false)
S4: g(f(1)) = g(2) = 0 (since f(1) =2 g(f(1)) becomes g(2) )
g(f(2)) = g(3) = 1
g(f(3))=g(4) =1
A mapping is obtained for all elements , therefore g o f is valid (S4 is true)