Results 1 to 4 of 4

Thread: NeedFormula so results in decimal part < .25

  1. #1
    Nov 2009

    NeedFormula so results in decimal part < .25

    I hope I'm posting in the correct forum as I am not a mathematician and believe perhaps
    this is where I should post this question:

    This may not be possible but I'm looking for a mathematical formula
    such that the sum of any set of numbers in any combination will always
    produce a result in which the decimals are less than .25

    The initial values of the numbers that are being summed are set, BUT
    the formula can modify them to produce the necessary result.

    Take for example a series of values in distances:

    1.25 miles
    14.80 miles
    7.72 miles

    the sum is now 23.77

    I would like a formula that when applied against the numbers for miles,
    modifies those numbers such that any combination of them will result in
    a number whose decimal portion is always less than or equal to .25

    So 1.25, 14.80 and 7.72 needs to be adjusted with the formula so that
    when you add any combination, i.e., 1.25 + 7.72 the sum will have a
    decimal part that is less than or equal to .25

    FYI: the formula WILL adjust the mile number, again in the above
    example (1.25 and 7.72) so that their sum will have a decimal part
    that is less than or equal to .25, like 1.25 stays the same but 7.72
    would change to 7.80 so that the decimal part now has a value of 9.05

    Is this possible?

    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Apr 2009
    Atlanta, GA
    Hmm... I understand if you are not a mathematician, but your question does need to be a bit more specific. Are 1.25, 14.80, 7.72 the only data you need this to work for? Can you substitute these three for different values? What about negative numbers? More than three?

    Given an arbitrary finite list of numbers $\displaystyle x_1,x_2,x_3,...,x_n$, the following two formulas will guarantee a decimal part smaller than .25:

    $\displaystyle f(\vec{x})=.05+\lfloor x_1\rfloor+\lfloor x_2\rfloor+...+\lfloor x_n\rfloor$ (add up the numbers each rounded to the nearest integer)

    $\displaystyle g(\vec{x})=\frac14\sin(x_1+x_2+...+x_n)$ (sine is always between -1 and 1, so dividing by 4 gets you a number between -.25 and .25)

    I cannot see the first possible use of these formulas in the "real" world, so I perhaps am misunderstanding your question.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Nov 2009
    Media_Man thank you so much for your help. Indeed, I am not a mathematician but thought about this some more and realize that it cannot be done in the following scenario but correct me if I'm wrong.

    One real world application, if it could work, is to guarantee to a buyer that for any given purchase of something under, say $10.00 would always give the purchaser at least .75 cents back. If I could price my 30 items at a certain number, then any combination of them would produce a result in which the change given back to a customer always results in at least .75 cents returned. But I see that it is just not possible unless the numbers could be changed during the purchase which I doubt any normal buyer would accept. But in a board game..... hmmm... that is something to think about!

    But then again I see in your forumula that you are suggesting an arbitrary finite list of numbers. So then could it work?

    Current Price list:

    Soda: .75
    Coffee: 1.75
    Sandwich: 3.25
    Cookie: .75

    I need to change the prices of the items so that any combination would result in .75 cents or greater always being returned to the purchaser.

    Would your formula work here?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Apr 2009
    Atlanta, GA


    Again, the simpler scenarios get you. What if someone buys only a single item? Then to satisfy your constraint, every item on the price list must have a decimal part <.25. If any two items are both priced with decimal parts between .13 and .25, then again, if the customer buys those two items, your constraint is violated. The only feasible way to do it is pricing everything at only .01 or .02, with the logic that if they buy over 25 items, then you no longer care about the constraint. But why do that when you can sell everything at even dollar amounts and avoid the whole mess?

    I understand what it is you're looking to do, but in this exact formulation, no solution seems feasible, at least of the type you are looking for. This is similar to the coin problem. We demarcate our coins at 1,5,10,25, but these numbers are arbitrary. It is actually an extremely complex problem of finding the optimal demarcation -- that is, the one that requires on average the fewest number of coins to give exact change, and therefore requires less output of the mint.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: Dec 1st 2011, 09:21 AM
  2. Use the results of part c to show that B=1
    Posted in the Calculus Forum
    Replies: 3
    Last Post: Jan 8th 2011, 09:32 AM
  3. Replies: 25
    Last Post: Jan 15th 2010, 03:53 AM
  4. Sum of a part arithmatic and part geometric sequence
    Posted in the Pre-Calculus Forum
    Replies: 4
    Last Post: Oct 25th 2009, 10:53 PM
  5. [SOLVED] Increasing decimal places in Matlab results
    Posted in the Math Software Forum
    Replies: 1
    Last Post: Jul 30th 2009, 05:53 AM

Search Tags

/mathhelpforum @mathhelpforum