# Thread: Showing a function is one-to-one or onto.

1. ## Showing a function is one-to-one or onto.

Can someone help me understand how to do this problem?

Let F:N -> {0,1} be defined by F(n)= 0 if 3|n or 1 if 3|n

a)Show F is NOT one-to-one.
b)Show F is onto.

2. Originally Posted by matthayzon89
Can someone help me understand how to do this problem?

Let F:N -> {0,1} be defined by F(n)= 0 if 3|n or 1 if 3|n

a)Show F is NOT one-to-one.
b)Show F is onto.

Look carefully at what you wrote after "..be defined by..." : it makes no sense.

Tonio

3. Originally Posted by tonio
Look carefully at what you wrote after "..be defined by..." : it makes no sense.

Tonio
Why does it make no sense? it does make sense....

Let the funtion that MAPS Natural numbers to 0,1 be defined by F(n)= 0 if 3|n or 1 if 3|n

4. Originally Posted by matthayzon89
Why does it make no sense? it does make sense....
Let the funtion that MAPS Natural numbers to 0,1 be defined by F(n)= 0 if 3|n or 1 if 3|n
It still makes no sense.
0 if 3|n or 1 if 3|n.
That reads 0 if three divides n or 1 if three divides n.
That is nonsense.

5. Sorry, but what are you using | to mean?

6. Originally Posted by Plato
It still makes no sense.
0 if 3|n or 1 if 3|n.
That reads 0 if three divides n or 1 if three divides n.
That is nonsense.

SORRY!!
This is what it was suppose to say, I found out that there was a TYPO on the assignment itself...

It is suppose to read 0 if 3(does NOT)|n or 1 if 3|n

7. Originally Posted by matthayzon89
SORRY!!
It is suppose to read 0 if 3(does NOT)|n or 1 if 3|n
Well then:
a) if $F(1)=F(2)$ it is not one-to-one.

b) $F(1)=0~\&~F(3)=0$. So...?

8. Originally Posted by Plato
Well then:
a) if $F(1)=F(2)$ it is not one-to-one.

b) $F(1)=0~\&~F(3)=0$. So...?
So b) is ONTO.

p.S
I need help trying to understand the question and knowing what to look for.... I don't really need help solving it. Hints don't help much either.
Can someone please explain how to approach such a problem and what I need to look for in order to prove something is onto or one-to-one?

9. Originally Posted by matthayzon89
I need help trying to understand the question and knowing what to look for.... I don't really need help solving it. Hints don't help much either.
Can someone please explain how to approach such a problem and what I need to look for in order to prove something is onto or one-to-one?
Any function is a set of ordered pairs.
A function is one-to-one is no two pairs have the same second term.
A function is onto if the range is the same as the co-domain (the final set).

10. So I know the answer b/c I went over it with my prof. but I still dont really understand it, can someone please explain?

Here it is:

F:N -> {0,1}
F(n)= {0 if 3 does not |n, 1 if 3|n)

a) is NOT one-to-one <- I know this is due to having more then one value mapped to the same second value, but I dont understand how this conclusion is figured out given the information of the problem.

Proof:
Consider n(base1)= 1 and n(base2)= 2
Then F(n(base1)=F(n(base2))=0 but n(base1)DOES NOT EQUAL 2.

Also,
Is F onto? YES

Proof:
Let y E {0,1}
if y=0,choose n=1 then, n E N and F(n)=y since F(1)=0

If y=1, choose n-3 then, n E N and F(n)=y since F(3)=1.

Can someone please explain how this proof was reached and the logic behind whats going on in detail so i understand it once and for all?