Results 1 to 6 of 6

Math Help - integer distribution help

  1. #1
    Newbie
    Joined
    Feb 2011
    Posts
    4

    integer distribution help

    not sure if this is the right place to put this however my problem is as follows.

    I have n points
    and a space with n size in which to distribute my points.

    example 100 points

    and a space of 800 pixels

    start point would be 0 and end point would be 800 in our space available
    how do I distribute the remaining 98 points evenly across the available space.

    What area of math is this in so that I may do the proper research.

    Thanks for any help in advance.

    `Baker
    Follow Math Help Forum on Facebook and Google+

  2. #2
    -1
    e^(i*pi)'s Avatar
    Joined
    Feb 2009
    From
    West Midlands, England
    Posts
    3,053
    Thanks
    1
    It is the space left divided by the points you need to distribute evenly

    In your case each would be \dfrac{800-0}{98} apart.


    In general it is \dfrac{s_f - s_i}{n} where s_f is the end point, s_i the start point and n the number of dots
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Feb 2011
    Posts
    4
    wow that was crazy fast. perhaps you could elaborate on another issue for me say the num points was greater than the available space. I would then want to scale the shown points.

    example if every 10 points had a different color when scaled then every 100 or 20 or whatever amount would be colored different. how would i determine the scale factor.

    I hope this makes sense.

    thanks again in advance
    `Baker
    Follow Math Help Forum on Facebook and Google+

  4. #4
    -1
    e^(i*pi)'s Avatar
    Joined
    Feb 2009
    From
    West Midlands, England
    Posts
    3,053
    Thanks
    1
    \dfrac{s_f - s_i}{n} \times \dfrac{a}{s_f-s_i} = \dfrac{a}{n}

    Where a is the new distance


    edit: I should point out the scale factor is given by the new length divided by the old length so your scale factor is \dfrac{a}{s_f-s_i}
    Last edited by e^(i*pi); February 23rd 2011 at 02:12 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Feb 2011
    Posts
    4
    I am not sure what you mean by new distance... if there are more points than can be displayed I would like to draw some main grid points.
    Essentially having the same number of points displayed but the line would still represent the same num points 0-1000 for example and our available space would stay the same. like our previous example 0-800 is available space our num points is 1000. however we can only display a maximum of 800 points how do i determine these point while still representing the entire list 0-1000 points.

    I really appreciate your help btw.
    `Baker
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Feb 2011
    Posts
    4
    I am still having trouble with this problem, because I am using an integer based system I cannot use precision numbers to calc these new positions. I usually end up with a number too high or too low of the last point. usually a remainder of + or - 40 units.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: May 12th 2011, 03:43 PM
  2. Replies: 13
    Last Post: August 3rd 2010, 03:16 AM
  3. Integer roots of integer polynomials
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: December 3rd 2009, 12:39 PM
  4. Raise integer to positive integer power
    Posted in the Algebra Forum
    Replies: 2
    Last Post: May 21st 2009, 12:20 PM
  5. [SOLVED] even integer and odd integer
    Posted in the Algebra Forum
    Replies: 2
    Last Post: October 1st 2008, 08:35 PM

Search Tags


/mathhelpforum @mathhelpforum