Results 1 to 10 of 10

Math Help - Algorithm help

  1. #1
    Newbie
    Joined
    Apr 2009
    Posts
    4

    Algorithm help

    Hello Math Master..

    i need ur help if you have free time..
    i have a question. is it possible to do this.

    question ->

    1+2+3+4 = 10
    from the result (10), i want to get all the plus value(1,2,3,4).
    is it possible?

    thanks for your time and help... appreciate it...
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by oneman View Post
    Hello Math Master..

    i need ur help if you have free time..
    i have a question. is it possible to do this.

    question ->

    1+2+3+4 = 10
    from the result (10), i want to get all the plus value(1,2,3,4).
    is it possible?

    thanks for your time and help... appreciate it...
    It's not possible because you question is incomprehensible, consider rewording it.

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2009
    Posts
    4
    Quote Originally Posted by CaptainBlack View Post
    It's not possible because you question is incomprehensible, consider rewording it.

    CB
    so sorry for the trouble,

    again

    when u plus all the integer for example 1,2,3,4 the result should be 10.
    now i want to get all the integer from the result only.
    meaning when i type 10 and type total digit of 4, i should get 1,2,3,4.
    it can also be 2,3,5 or 6,4 or 7,2,1 as long it is not a repeating number and depending on total digit.

    hope this is clear enough.

    Thanks

    OM
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Feb 2009
    Posts
    125
    Are you programming this? If so you would need a list of valid values.
    beacause you could also have
    -90+100=10.
    -490+500=10.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Apr 2009
    Posts
    4
    sorry for not mention it.. it must be positive value.. i think there is a solution.. but i dont know..
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,693
    Thanks
    1466
    No, that's still not clear. Do you mean, "Given a positive integer N, and another positive integer i, find i (distinct? consecutive?) integers whose some is N"? If so, for many values of N and i, there will be NO such integers while for others there will be many answers.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Apr 2009
    Posts
    6

    n(n+1) / 2 = 10 or have I missed the point ?

    surely this is just a series: n(n+1) / 2 = 10
    therefore n^2 + n - 20 = 0
    solve this quadratic for n ( 4, -5 )
    Obviously 4 is the valid answer here.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,693
    Thanks
    1466
    IF the question was "find n such that 1+ 2+ ...+ n= 10" where the number are integers, start at 1, and are consectutive, yes, it is. But that was never said.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Apr 2009
    Posts
    6

    Ah yes...

    Oops... sorry I jumped to conclusions there.... if the start integer is >1 and the integers summed are consecutive then:

    If the start integer is 'm' then we can sum 1 to n and subtract the sum 1..(m-1)...
    n(n+1)/2 - (m-1)m/2 = k // k = required total of course.
    giving the Diophantine:
    n^2 - m^2 + n + m - 2k = 0 // n.m.k are integers
    And there's a whole lot of interesting stuff on the web about Diophantines.... but I'm not a mathematician, I just like this stuff.....
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Apr 2009
    Posts
    4
    hmm.. nice reply.. still.. i dont understand.. hehe

    ok first need to clear things up..

    a+b+c = z

    where a,b,c > 0

    so i want to get a,b and c.

    that what my question is.
    if i said i want 4 values there will be a,b,c,d and the a,b,c,d must not be the same number

    yes i know it can be any number
    i want all possible number to get z

    for example z=10 and required 2 value

    a+b=z
    1+9=10
    2+8=10
    3+7=10
    4+6=10

    it would not required any start integer... and i dont think diophantine is what im looking for... anyway thanks..

    in programing i find using google.. they said print all possible combination.. similar to what im looking for but its not what i want.. its just if else programing..

    sorry if i misleading u guys.. and thanks for your time..
    Last edited by oneman; April 29th 2009 at 10:27 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. algorithm
    Posted in the Advanced Applied Math Forum
    Replies: 3
    Last Post: January 19th 2010, 02:46 AM
  2. Algorithm
    Posted in the Advanced Math Topics Forum
    Replies: 7
    Last Post: November 22nd 2009, 07:11 AM
  3. algorithm
    Posted in the Math Topics Forum
    Replies: 2
    Last Post: July 16th 2008, 01:29 PM
  4. Algorithm
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: February 27th 2008, 01:02 PM
  5. gcd algorithm
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: December 4th 2007, 11:47 PM

Search Tags


/mathhelpforum @mathhelpforum