A function is called as ONTO if every element in the co-domain has a pre-image in the domain.
A) It is an ONTO function.
Every even number in the co-domain can be made to have a pre-image by giving n = 0 and appropriate values for m. Ex: m=1,n=0 will have f(m,n) = 2 . similiarly,m=2,n=0 f(m,n) = 4 .....so on.
Every odd number in the co-domain can be made to have a pre-domain by giving n = 1 and appropriate values for m. Ex: m =1 ,n =1 will give f(m,n) = 1. m =2 ,n =1 will give f(m,n) = 3 ...and so on.
similairly we can also find pre-image for negative numbers in the codomain. Ex : m = 0,n =1 will give f(m,n) = -1 and so on.
So whatever element in the codomain we will be able to find a pre-image.so this function is ONTO.
B) It is not ONTO function as 6 in the co-domain will not have a pre-image.(no two square numbers are at a distance of 6....as 32-22 = 5 , 42-32 = 7 , 52-42 = 9 .....)
C) it is an ONTO function as we can give n = -1 and values for m to get the co-domain elements. ex : if we want to find the pre-image for 1,then n= -1 and m = 1. If we want pre-image for 2, then n =-1 and m = 2 ... and so on.
D) It is an ONTO function as we can give values n = 0 and appropriate values for m to get all positive numbers and m = 0 and appropriate values for n to get all negative numbers. so any given number in co-domain we can find a pre-image. ex : if we want to find pre-image for 2 in co-domain then m = 2 and n = 0 will map to 2 in codomain.
E) NOT AN ONTO FUNCTION as we dont have pre-image for 1 in co-domain.