Results 1 to 7 of 7

Math Help - [SOLVED] need help: uniquely encode two vectors from R^n into one vector in R^n

  1. #1
    Newbie
    Joined
    Dec 2007
    Posts
    14

    [SOLVED] need help: uniquely encode two vectors from R^n into one vector in R^n

    Hello,


    first of all, Im not very experienced with mathematics, so please forgive me if I make statements which are unclear or not totally mathematical solid

    my problem:
    uniquely encode two vectors from R^n into one vector in R^n

    After spending a lot of time in searching for possible solutions, I came up with the following:

    let x,y be two vectors in R^n with x=(x1, x2, ..., xn) and y=(y1, y2, ..., yn)

    the function f: R^n x R^n -> R^n , takes two vectors as parameters like this: f(x,y) and returns a new vector in R^n like this: f(x,y) = z

    where z = (z1, z2, ..., zn)
    every element of z is calculated using the following approach:

    let zi be an element of z (with 1 <= i <= n), zi is created as a number in the open interval (0 ,1) by interleaving xi and yi
    ---> 0.xiyi

    an example in R^2 would be:

    x = (1 , 2)
    y = (3 , 4)

    z = (z1, z2)
    z1 = 0.13 (created from x1 and y1)
    z2 = 0.24 (created from x2 and y2)


    so the question is: does this solution make sense ? is there a problem I dont see ?

    thank you,
    Andreas
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Dec 2007
    From
    Anchorage, AK
    Posts
    276

    Problems

    I can see several problems:
    First, what if x_i and y_i are multidigit integers?
    What if y_i is zero, or has trailing zeros:
    x_i=1,~y_i=2,
    x_i=1,~y_i=20,
    x_i=1,~y_i=200

    All become the same number z_i=0.12.

    Both x_i=1,~y_i=2 and x_i=12,~y_i=0 become 0.12

    Third, what if x_i and/or y_i are negative?
    Lastly, what if x_i and y_i are not integers?


    --Kevin C.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Dec 2007
    Posts
    14
    Hi Kevin,

    thank you for your feedback.

    The points you mentioned are totally correct.
    A possible solution to the problems would be to modify f like this:

    xi and yi must be transformed into the open interval (0,1), before they are interleaved.

    so basically the vectors x and y from R^n must be transformed into (0,1)^n and the function f looks now as followed:

    f: (0,1)^n x (0,1)^n -> (0,1)^n


    how about this modification? Any issues here ?

    kind regards,
    Andreas
    Last edited by sirandreus; December 6th 2007 at 08:51 AM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Dec 2007
    Posts
    14
    Hi,

    what about the following extension:

    f: (0,1)^n, ...., (0,1)^n -> (0,1)^n
    so f does no longer take two parameters, but any number of parameters

    an example with three parameters:

    having let x,y,k be three vectors in R^n with x=(x1, x2, ..., xn) , y=(y1, y2, ..., yn) and k=(k1, k2, ...., kn)

    z = 0.x1y1k1x2y2k2....


    does this work as well ?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    Quote Originally Posted by sirandreus View Post
    what about the following extension:

    f: (0,1)^n, ...., (0,1)^n -> (0,1)^n
    so f does no longer take two parameters, but any number of parameters

    an example with three parameters:

    having let x,y,k be three vectors in R^n with x=(x1, x2, ..., xn) , y=(y1, y2, ..., yn) and k=(k1, k2, ...., kn)

    z = 0.x1y1k1x2y2k2....


    does this work as well ?
    Yes, I can't see any problem with that. Of course, to decode it, you'll need to know p (the number of parameters), and also the value of n. If these are not known to the person doing the decoding, you could encode them by an integer (for example 2^p3^n) and put that before the decimal point.

    Then a number such as z = 72.a_1a_2a_3a_4... would be decoded as 72 = 2^3\times3^2, so there are three vectors in R^2, namely x = (0.a_1a_7a_{13}\ldots,\,0.a_4a_{10}a_{16}\ldots), y = (0.a_2a_8a_{14}\ldots,\,0.a_5a_{11}a_{17}\ldots), k = (0.a_3a_9a_{15}\ldots,\,0.a_6a_{12}a_{18}\ldots).
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    10
    Quote Originally Posted by Opalg View Post
    If these are not known to the person doing the decoding, you could encode them by an integer (for example 2^p3^n) and put that before the decimal point.
    .
    I really have no idea what you are talking about over here. But when you wrote 2^p*3^n did you mean as a sum of those numbers? Because there is a simple Erdos theorem that says such a representation is always possible. Maybe that helps? Or did you mean to say that?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Dec 2007
    Posts
    14

    efficient implementation

    Hi all,

    thanks again for your helpful feedback.

    Things are getting more interesting right now

    In practice, the function f can be implemented easily, by using an high precision arithmetical library (such as GMP for C, or apfloat for Java). The values of the vectors, which are the arguments of the function f could be "usual" doubles / floats and the output values (the interleavings) would be BigDoubles (an arbitrary precision floating point implementation from the using library)

    However, the real problem is how to work efficiently with numbers which are generated by f (reminder: as we know, f can take many vectors (not just 2))
    Because if we have numbers with several thousands or even millions of digits, every basic operation such as add, mult or div, (not to mention exp, sqrt, ...) will run very slow.


    So the question is, how to modify the function f, so that the numbers of the result vector are in an efficient practical format. The results must not be exact, but the smaller the errors the better.

    any ideas ?

    kind regards,
    Andreas
    Last edited by sirandreus; December 17th 2007 at 08:48 AM. Reason: added reminder
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Does this uniquely determine G?
    Posted in the Advanced Algebra Forum
    Replies: 6
    Last Post: October 9th 2011, 01:28 PM
  2. Resolving a vector into a sum of two vectors
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: April 6th 2011, 07:03 AM
  3. Replies: 4
    Last Post: February 2nd 2010, 12:22 PM
  4. Vectors and Vector Spaces
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: October 25th 2009, 05:50 AM
  5. Can the product and sum of a set of digits identify them uniquely?
    Posted in the Math Challenge Problems Forum
    Replies: 3
    Last Post: November 26th 2007, 12:56 PM

Search Tags


/mathhelpforum @mathhelpforum