It's very funny because my little brother asked me this question;

What are the possibilities of a, b, and c ?

Could any body help me,
1st) What topic in math is this that I should look upon?
2nd) Step by step how to solve it (the way)...?
3rd)... your kindness....

Somebody outthere give me short explaination meanwhile, I need to erase my stupidity because of not aware of this calculation in my head. Anyway here is the words

But here, my concern is... why 2^9 could be 2^4 + 2^3 + 2^2 instead of 2^4 x 2^3 x 2^2 for that solving case?

Solving uniquely for three variables takes three linear equations, but abc = 1536 is not linear. I remember one branch of math where you could optimize one formula based on an insufficient number of linear equations. I believe it was called linear programing, though it had nothing to do with computers.

In any case, that's not what you're doing here. You're looking for a fast way to find the integer solution to these equations. Factoring 1536 into 3 * 2^9 is a good way to start because it gives you all the factors that will make up a, b, and c. It's a bit hard to explain if that doesn't click for you. 2^9 of course doesn't equal 2^4 + 2^3 + 2^2, but you will build up a, b, and c by multiplying one 3 with nine 2s. That gives you a quick way to limit your search for a solution.

When I just did it on paper, I started with a = 6 (3x2), and b = 16 (2x2x2x2), which left four of our nines 2s so c was forced to be 16. (I'm finding it difficult to explain what I mean by "left four of nine 2s". I think you'll either get it, or you won't.) Anyway, that meant the sum of a,b, and c was 38, almost right but not quite. So I thought to bring one of those 2s over to a, making it 12, and taking it away from b, making it 8. That kept c at 16. So, I got the answer in two guesses.

The technique of making a guess, and comparing its results to the true solution, and then adjusting, is called regula falsi. I don't know a name for the rest of what I did. Maybe we can call it JFM?

Why is abc = 1536 non-linear? I assume it means a * b * c = 1536.

A linear equation is an algebraic equation in which each term is either a constant or the product of a constant and (the first power of) a single variable.

each variable is a first power, and the constant is 1 in each case...

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors

Combinatorics? The brute force approach involves generating all possible combinations of three factors, and then checking the second condition.

Here's one pattern you could follow:
Of course, you can instantly rule out any combinations with 2^6 and above, or 3x2^4 and above, as they instantly exceed the target.

(All assuming we're talking positive integers, of course)

fred rosenberger wrote:Why is abc = 1536 non-linear? I assume it means a * b * c = 1536.

Because you're multiplying variables together. It doesn't satisfy the "single variable" part of that definition.

duh...sorry.

J. Insi
Ranch Hand

Joined: Aug 11, 2010
Posts: 90

posted

0

Marimuthu Madasamy wrote:Taking the brute force approach and to have some fun with Haskell:

which returned [(8,12,16),(8,16,12),(12,16,8)]

waaah, I never calculate in this manner.... guys, are you all taking math class right now?

Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 3007

9

posted

0

Not really. It's a program in the Haskell programming language. Personally I was learning about it as part of reading Seven Languages in Seven Weeks, which we had as a reading group at work. (By the way, if you do this: I recommend taking more than seven weeks. Maybe fourteen weeks. You can learn a lot if you work through all the problems, but it can take a lot of time.) I don't know if I will ever program in Haskell professionally, but it's a really good way to stretch your brain.

Though Mathematical skills would help in programming, the above code is straightforward, taking the brute force approach. Further I also have been learning Haskell for one month and really love the language. Learning Haskell would definitely improve your programming skills and your way of thinking in programming.

J. Insi
Ranch Hand

Joined: Aug 11, 2010
Posts: 90

posted

0

Mike Simmons wrote:Not really. It's a program in the Haskell programming language. Personally I was learning about it as part of reading Seven Languages in Seven Weeks, which we had as a reading group at work. (By the way, if you do this: I recommend taking more than seven weeks. Maybe fourteen weeks. You can learn a lot if you work through all the problems, but it can take a lot of time.) I don't know if I will ever program in Haskell professionally, but it's a really good way to stretch your brain.

waw.... i've never involved in what that haskell thing....
great Mike, keep it up! is it difficult than our programming language or ....