Results 1 to 3 of 3

Math Help - calculating distance between members of a set

  1. #1
    Newbie
    Joined
    Mar 2010
    Posts
    3

    calculating distance between members of a set

    Hi,

    I'm wondering if anyone can help me please, i'm wanting to know the mathematical notation for representing calculating the ditancaes of a set. What i want is a new set with the distances.

    e.g. i have an ordered set X = {1,5,12,15,25}

    the distance would be |Xi - Xi+1|

    how can i represent in mathematical terms a new set that contains the distances of the set X.

    e.g. in pseudo code it would look like

    Set X = new Set{1,5,12,15,25}
    Set Y = new Set() // for the distances

    for(i = 0; i < X.length -1; ++i)
    {
    Y.Add(X[i] - X[i+1])
    }


    What i want would be the math notation for obtaining set Y

    Thanks.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Jun 2008
    From
    Idaho Falls
    Posts
    13
    If |X| represents the number of elements in X and x[i] represents the ith element of X, would Y = {|x[i]-x[i+1]| : i in {1, ..., |X|-1}} work?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Mar 2010
    Posts
    3

    Thanks

    I think thats right, thanks.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 7
    Last Post: June 7th 2012, 05:04 AM
  2. Calculating Distance between 2 circles
    Posted in the Geometry Forum
    Replies: 6
    Last Post: June 20th 2011, 05:47 PM
  3. Replies: 5
    Last Post: May 26th 2010, 06:16 PM
  4. Calculating distance road
    Posted in the Geometry Forum
    Replies: 3
    Last Post: April 21st 2009, 11:31 PM
  5. Formula for calculating the distance....
    Posted in the Geometry Forum
    Replies: 5
    Last Post: September 18th 2007, 08:38 PM

Search Tags


/mathhelpforum @mathhelpforum