Discrete Math
posted by yengiang .
Let A={0,1,2,3,4}. Define a function f from A to A by f(n)=2n mod 5.
a/ Is f onetoone?
b/ Is f onto?
Could you show me how to solve this problem, please? I have no idea what this function is.
Your help is greatly appreciated.

Discrete Math 
Mgraph
f(0)=2x0=0=0 mod 5
f(1)=2x1=2=2 mod 5
f(2)=2x2=4=4 mod 5
f(3)=2x3=6=1 mod 5
f(4)=2x4=8=3 mod 5,
so f(A)={0,1,2,3,4}
a/ yes
b/ yes 
Discrete Math 
MathMate
The function has been defined already:
f : A > A
where
f(n) = 2n mod 5
To determine if the function is onetoone and onto, we can enumerate the values of x and f(x) and compare with the elements of A = {0,1,2,3,4}.
x f(x)=2n mod 5
0 0 [2*0 mod 5 = 0 mod 5 = 0]
1 2 [2*1 mod 5 = 2 mod 5 = 2]
2 4
3 1 [2*3 mod 5 = 6 mod 5 = 1]
4 3
Recall the definition of "onetoone" is
"A function f from A to B is called onetoone (or 11) if whenever
f (a) = f (b) then a = b. No element of B is the image of more than one element in A."
Since no element in B (=f(x)) can be mapped from more than one element in A, the function is onetoone.
Recall the definition of "onto".
"A function f from A to B is called onto if for all b in B there is an a in A such that f (a) = b. All elements in B are used."
Since every element of set B (=f(x)) maps to an element in A, the function is onto.
Many links are available for the definition and explanation of the two terms, you can try the following as a start, as it explains with clear examples:
http://www.regentsprep.org/Regents/math/algtrig/ATP5/OntoFunctions.htm 
Discrete Math 
yengiang
Thank you so much for your replies.
Could you also verify what I did on this problem please?
The set of course numbers for a collection of math courses is:
M = {0099,1111,1113,2200,2210,2220,2300,2450,2500,3500,4500,4900}
Define a relation R on M by (x,y) in R if course numbers x and y start with the same number.
a/ Verify that R is an equivalence relation
Reflexive: yes, because course number x start with the number itself.
Symmetric: yes, because if x starts with the same number as y, then y also starts with the same number as x.
Transitive: Yes, because for all courses x,y, and z, if x starts with the same number as y and y starts with
the same number as x, then x starts with the same number as z.
R is an equivalence because it is reflexive, symmetric, and transitive.
b/ Describe the distinct equivalence classes of R.
There are 5 equivalence classes:
[1] = {0099}
[2] = {1111, 1113}
[3] = {2200,2210,2220,2300,2450,2500}
[4] = {3500}
[5] = {4500,4900} 
Discrete Math 
MathMate
Looks all good to me!
Respond to this Question
Similar Questions

another college math question
Please teach me. I am completely blank with it. :( Let alpha = (3+sqrt(3))/2 belongs to Q[sqrt(3)]. Show that if x is congruent to 1 mod alpha, then x^3 is congruent to 1 (mod alpha)^3. Similarly, show that if x is congruent to 1 … 
Discrete Math
Let g(x)=3x^2+14x15. Determine if g is one to one or onto. A. g:N>N B. g:R>R If You can help me with this problem showing all work that would be greatly appreciated. Thank You 
Mathematics
I have a question about onto and onetoone.? 
Discrete Math
Congruence True or False: (give reason) _ __ 2 ∈ 18 (mod 8) Can someone please help with this problem? 
math
Which two is true as i'm confused A) 3+7 ß 10 mod 15 17 + 9 ß 4 mod 21 12 + 14 ß 0 mod 26 B) 4+11 ß 2 mod 13 9+7 ß 4 mod 12 13 + 13 ß 1 mod 25 C) 5+9 ß 4 mod 10 16 + 13 ß 3 mod 26 12 + 7 ß 6 mod 14 d)2+7 … 
MATH PLEASE HELP
Given: Let f: X > Y be a function. Then we have an associated function f^(1): P(Y) > P(X), where f^(1) (B)⊂X is the inverse image of B⊂Y. Question: Show that f^(1) is onetoone if and only if f is onto. [Notes: … 
Math
Which Statements of congruence are true and which are false and why? 
math
Which Statements of congruence are true and which are false and why? 
Math
Which Statements of congruence are true and which are false and why? 
DISCRETE MATH
Let Z 5 be the relation of congruence modulo5. If 1 ≤ m, n ≤ 5,we define the product of two classes as [m][n] = [mn]. Explain why [3][4] = [2]. I know 3 x 4 = 12. 5 mod 12 = 2. but i don't know how to explain it. Help with …