Results 1 to 2 of 2
Like Tree2Thanks
  • 2 Post By Gusbob

Math Help - Z --> ZxZ Function

  1. #1
    Vee
    Vee is offline
    Newbie
    Joined
    Apr 2013
    From
    WA
    Posts
    6
    Thanks
    1

    Z --> ZxZ Function

    Hello,

    I would like to define a function from Z --> ZxZ that is both onto and one to one. I think it is going to have to be a piecewise function, but I am totally lost on how to get started. What I do know is that the function can be represented graphically by a spiral where the inputs and outputs look something like this:

    f(0) = (0,0)
    f(1) = (1,0)
    f(2) = (1,1)
    f(3) = (0,1)
    f(4) = (-1,1)
    f(5) = (-1,0)
    f(6) = (-1,-1)
    f(7) = (0,-1)... so on

    I know this is only for positive Z, and this is part of the reason I am stuck. I am also not sure how to represent this info as a function. Any help would be appreciated. This is bugging the crap out of me. Thank you.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Jan 2008
    Posts
    588
    Thanks
    87

    Re: Z --> ZxZ Function

    It may be easier to write a bijection f:\mathbb{Z}\to \mathbb{N}, so that g=(f,f):\mathbb{Z}\times \mathbb{Z} \to \mathbb{N}\times \mathbb{N} is a bijection. For example, take

    f(x)=\begin{cases} 2x, & \text{if }x\geq 0 \\ -2x+1, & \text{if }x<0\end{cases}

    It remains to find a bijection \varphi: \mathbb{N}\times \mathbb{N} \to \mathbb{N}. The standard one is the Cantor pairing function

    \varphi(x,y)= \frac{(x+y+1)(x+y)}{2}+x

    This last function makes precise the usual snake-like enumeration diagram for \mathbb{N}\times \mathbb{N}.

    The function you want is g^{-1} \circ \varphi^{-1} \circ f. Since each function in the composition is a bijection, the result is also a bijection.
    Thanks from topsquark and Vee
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 20
    Last Post: November 27th 2012, 05:28 AM
  2. Replies: 3
    Last Post: September 8th 2012, 04:00 AM
  3. Replies: 0
    Last Post: October 19th 2011, 04:49 AM
  4. Replies: 4
    Last Post: October 27th 2010, 05:41 AM
  5. Replies: 3
    Last Post: September 14th 2010, 02:46 PM

Search Tags


/mathhelpforum @mathhelpforum