Results 1 to 4 of 4

Thread: Solving for a, b and c

  1. #1
    Newbie milkntea's Avatar
    Joined
    Mar 2010
    Posts
    3

    Solving for a, b and c

    Do you know of any algorithm that can solve (look for possible values) for a, b and c in the equation:

    a + b + c = n

    where a, b, c and n are integers and are greater than 0?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    12,028
    Thanks
    848
    Hello, milkntea!

    Do you know of any algorithm that can solve for $\displaystyle a, b, c$ in the equation:

    . . $\displaystyle a + b + c \:=\: n$ . for $\displaystyle a,b,c,n \,\in\, I^+$
    Here's a primitive approach . . .


    Suppse $\displaystyle n = 7$ . . . We have 7 objects.

    Place them in a row with a space between then: .$\displaystyle o\;\_\;o\;\_\;o\;\_\;o\;\_\;o\;\_\;o\;\_\;o$


    Select two of the spaces and insert "dividers".

    So that: .$\displaystyle o\;|\;o\;o\;o\;o\;|\;o\;o$ .represents $\displaystyle 1+4+2$

    . . .And: .$\displaystyle o\;o\;o\;|\;o\;o\;|\;o\;o$ .represents $\displaystyle 3+2+2$


    Hence, there are: .$\displaystyle {6\choose2} \,=\,15$ possible solutions.


    I'll leave it to you to list them . . .
    .
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie milkntea's Avatar
    Joined
    Mar 2010
    Posts
    3
    Quote Originally Posted by Soroban View Post
    Hello, milkntea!

    Here's a primitive approach . . .


    Suppse $\displaystyle n = 7$ . . . We have 7 objects.

    Place them in a row with a space between then: .$\displaystyle o\;\_\;o\;\_\;o\;\_\;o\;\_\;o\;\_\;o\;\_\;o$


    Select two of the spaces and insert "dividers".

    So that: .$\displaystyle o\;|\;o\;o\;o\;o\;|\;o\;o$ .represents $\displaystyle 1+4+2$

    . . .And: .$\displaystyle o\;o\;o\;|\;o\;o\;|\;o\;o$ .represents $\displaystyle 3+2+2$


    Hence, there are: .$\displaystyle {6\choose2} \,=\,15$ possible solutions.


    I'll leave it to you to list them . . .
    .
    Thanks Soroban!

    I am using this for a computer program that looks for

    $\displaystyle a+b+c = 1000$

    where:

    $\displaystyle a^2 + b^2 = c^2$

    I'll try it myself for now, I'll ask more questions later

    Thanks again!
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie milkntea's Avatar
    Joined
    Mar 2010
    Posts
    3
    Quote Originally Posted by milkntea View Post
    Thanks Soroban!

    I am using this for a computer program that looks for

    $\displaystyle a+b+c = 1000$

    where:

    $\displaystyle a^2 + b^2 = c^2$

    I'll try it myself for now, I'll ask more questions later

    Thanks again!
    One thought:

    What if I add another condition?

    $\displaystyle (a>b>c)$
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Solving for x
    Posted in the Algebra Forum
    Replies: 1
    Last Post: Jan 21st 2011, 07:16 AM
  2. help solving for y
    Posted in the Algebra Forum
    Replies: 2
    Last Post: Nov 1st 2009, 10:25 AM
  3. Solving z^n = C
    Posted in the Algebra Forum
    Replies: 2
    Last Post: Apr 23rd 2009, 05:50 AM
  4. Please help with solving for zero
    Posted in the Algebra Forum
    Replies: 1
    Last Post: Feb 12th 2009, 04:46 PM
  5. Replies: 3
    Last Post: Oct 11th 2006, 09:15 PM

Search Tags


/mathhelpforum @mathhelpforum