1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

This is making think the function is contradicting

  1. Apr 18, 2012 #1
    This is making think the function is contradicting.
    the question is asking me to find a function f : N → Z which is one-to-one and has range Z.
    the problem is the number is integers in Z is bigger than the number of integers in N.

    The only way i can think of is optional function, even that i also have no idea on solving it
     
  2. jcsd
  3. Apr 18, 2012 #2

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Re: Functions

    Try a function which "jumps around". That is: one time a value will be a positive integer, the next time it will be negative.
     
  4. Apr 18, 2012 #3

    chiro

    User Avatar
    Science Advisor

    Re: Functions

    Hey look416.

    Following micromasses suggestion, try thinking about f(N) = (-1)^N [N/2] where [N/2] returns the integer part of N/2.
     
  5. Apr 18, 2012 #4
    Re: Functions

    Thx Chiro, i see how the sequence goes ady. So, we are ignoring the floating point division but instead focusing on the integer division... i see
     
  6. Apr 18, 2012 #5
    Re: Functions

    Now,i got one more question, when n = 0, f[x] = 0, but when n = 1, f[x] = 0 too, this will make my function into a not one to one function ady
     
  7. Apr 18, 2012 #6
    Re: Functions

    How about f(N) = (-1)^(N+1) [(N+1)/2]
     
  8. Apr 18, 2012 #7

    chiro

    User Avatar
    Science Advisor

    Re: Functions

    That should work as well :)
     
  9. Apr 19, 2012 #8
    Re: Functions

    Sorry Chiro I do not understand the 'as well' comment.

    f(N) = (-1)^N [N/2] fails the 1 to 1 condition as f(0)=0 and f(1)=0;

    Whereas for f(N) = (-1)^(N+1) [(N+1)/2]

    f(0) = 0 f(1) = 1 f(2) = -1 f(3) = 2 f(4) = -2 f(5) = 3 f(6) = -3

    f(7) = 4 f(8) = -4 etc
     
  10. Apr 19, 2012 #9

    chiro

    User Avatar
    Science Advisor

    Re: Functions

    Before I answer I should ask whether the function is onto not onto.
     
  11. Apr 19, 2012 #10
    Re: Functions

    look416 set the range as Z so for me that means onto
     
  12. Apr 19, 2012 #11

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: Functions

    Rather than trying to give a specific formula, map odd positive numbers, of the form 2n+1, to -n and even positive numbers, of the form 2n, to n. That is both one to one and onto the set of integers.
     
  13. Apr 19, 2012 #12
    Re: Functions

    I agree HallsofIvy. It is just that if a formula is tried and found not to work but is correctable then does it not behove us to correct it?
     
  14. Apr 19, 2012 #13
    Re: Functions

    i need more clarification of this,
    HallsofIvy, why we are mapping from 2n+1 to -n for odd numbers and 2n to n for even numbers?
     
  15. Apr 20, 2012 #14
    Re: Functions

    Because it works. Did you try it?
    Try writing it out for a few values of N.
     
  16. Apr 20, 2012 #15

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: Functions

    You said you wanted a function that mapped positive integers to all integers. That's what this does.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: This is making think the function is contradicting
  1. Proof by contradiction? (Replies: 12)

  2. Proof by contradiction (Replies: 1)

Loading...