Math Problem: You have 2 pipes...

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Lord Evermore

Diamond Member
Oct 10, 1999
9,558
0
76
I thought I wouldn't stop till I solved it, but then I managed to remove all but one instance of A and it still didn't work. So now I quit.

I failed various grades of math and algebra. Then for some reason I aced Algebra for about two years and did Pre-Calculus pretty well. But that was, damn, 9 years ago now. And of course I haven't used most of it since.
 

RandomCoil

Senior member
Feb 22, 2000
269
0
0
The brute-force search space can be reduced by recognizing that A and B must either both be even numbers or both be odd numbers. This just comes out of both pipe lengths being odd values and the final distance being even.
 

Daishiki

Golden Member
Nov 9, 2001
1,943
36
91
hopefully this'll help you guys out. the first step is that the number of A pipes and number of B pipes must add up to a multiple of 10, otherwise the length won't be a nice integer like 212. However, we don't know what multiple of 10 it'll be. So we'll find the largest multiple that it could be. So let's assume the answer consists of only the shortest pipe, A.

212 / 3.9 = 54.358974358974358974358974358974

going by the 3.9a + 5.9b = 212,

assume: a + b = 50

by substitution:
3.9a + 5.9(50-a) = 212
83 = 2x

well that can't be it, since x has to be an integer. so we'll go down from 50 to 40.

assume: a + b = 40

3.9a + 5.9(40-a) = 212
24 = 2a
a = 12

so we got 12 a-pipes and (40-12) = 28 b-pipes.
 

Chaotic42

Lifer
Jun 15, 2001
34,885
2,044
126
This looks like a max/min problem. I messed with it for a bit, but I got a weird equation and didn't feel like taking the derivative of it. :)
 

Mermaidman

Diamond Member
Sep 4, 2003
7,987
93
91
I think we need a second relationship. Are you sure the teacher didn't say that A+B=40?

If we had two equations:
3.9A+5.9B=212
A+B=40

Then it's much easier :D
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
Originally posted by: xUCIxDaiSHi
hopefully this'll help you guys out. the first step is that the number of A pipes and number of B pipes must add up to a multiple of 10, otherwise the length won't be a nice integer like 212. However, we don't know what multiple of 10 it'll be. So we'll find the largest multiple that it could be. So let's assume the answer consists of only the shortest pipe, A.

212 / 3.9 = 54.358974358974358974358974358974

going by the 3.9a + 5.9b = 212,

assume: a + b = 50

by substitution:
3.9a + 5.9(50-a) = 212
83 = 2x

well that can't be it, since x has to be an integer. so we'll go down from 50 to 40.

assume: a + b = 40

3.9a + 5.9(40-a) = 212
24 = 2a
a = 12

so we got 12 a-pipes and (40-12) = 28 b-pipes.

:beer:
 

Chaotic42

Lifer
Jun 15, 2001
34,885
2,044
126
Originally posted by: BigJ
:beer:
That's fine and all, but I think he needs to actually find a formula that works for all numbers. You can't sit there and guess forever.

 
Jan 31, 2002
40,819
2
0
Originally posted by: Mermaidman
I think we need a second relationship. Are you sure the teacher didn't say that A+B=40?

If we had two equations:
3.9A+5.9B=212
A+B=40

Then it's much easier :D

No, it's solvable without it.

I've been sitting on a proof without "guess the integer" as well, but I'd like to see if ndee can do his own damned homework first. :p

- M4H
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
Originally posted by: Chaotic42
Originally posted by: BigJ
:beer:
That's fine and all, but I think he needs to actually find a formula that works for all numbers. You can't sit there and guess forever.

Yea but this is the most substantial thing anyone has posted in the thread so far. So I gave him a :beer: for the effort.
 
Jan 31, 2002
40,819
2
0
Originally posted by: Chaotic42
Originally posted by: BigJ
:beer:
That's fine and all, but I think he needs to actually find a formula that works for all numbers. You can't sit there and guess forever.

Fine, here's my proof. It's just a rough outline, but I'll clarify anything asked.

-----
3.9A + 5.9B = 212m

Assume that no A-pipes are used. With only B-pipes, you can use 36 and get a length of 212.4m. Since the A-pipes are smaller, you can reduce the length to 212 by substituting them. Also works backwards by starting with the A-pipes and increasing, but I chose this way.

The key is seeing the relation between the pipe lengths. Note that 3.9 is almost 4 and 5.9 is almost 6. Common factor to 12.

3 A-pipes = 11.7
2 B-pipes = 11.8

Every time you remove 2B and add 3A, you lose 0.1m in overall length.

Repeat 4x, and you get 36 - (2x4) = 28 B-pipes, and 0 + (3x4) 12 A-pipes.
-----

:p

Edit - Spelling.

- M4H
 

Daishiki

Golden Member
Nov 9, 2001
1,943
36
91
Originally posted by: Chaotic42
Originally posted by: BigJ
:beer:
That's fine and all, but I think he needs to actually find a formula that works for all numbers. You can't sit there and guess forever.

well... there isn't much guess work for this problem. a + b could only be 50 or 40 by the contraints. it had to be a multiple of 10. more than 60 or more would yield too much length. 30 or less wouldn't make the pipe long enough. since it wasn't 50, logically it was 40. if the lengths didn't both have .9 at the end, this problem would have been a different story.

btw: i hope that was a guinness. cheers
 
Jan 31, 2002
40,819
2
0
Originally posted by: BigJ
Originally posted by: Chaotic42
Originally posted by: BigJ
:beer:
That's fine and all, but I think he needs to actually find a formula that works for all numbers. You can't sit there and guess forever.

Yea but this is the most substantial thing anyone has posted in the thread so far. So I gave him a :beer: for the effort.

I concur. It's not bulletproof, but if I were a teacher I'd accept it. :)

:beer:

- M4H
 

morkinva

Diamond Member
Nov 16, 1999
3,656
0
71
39 x2 + 59 xy - 2120 x = 0
by Dario Alejandro Alpern

x = 0
y = t

and also:
x = 12 - 59 t
y = 28 + 39 t


The above isn't my solution, is from this page

First, I multiplied both sides by x trying to get a quadratic, so I get:
x(3.9x+5.9y)=x(212)
3.9x^2 + 5.9xy = 212x or
3.9x^2 -212x +5.9y = 0

since his fields dont seem to accept numbers after the decimal point, I multiplied each side by 10

So plug the following numbers into his fields and you get x=12 and y=28. There's got to be an easier way of doing this:

39x^2 -2120x +59xy = 0
 

ndee

Lifer
Jul 18, 2000
12,680
1
0
Originally posted by: MercenaryForHire
Originally posted by: Mermaidman
I think we need a second relationship. Are you sure the teacher didn't say that A+B=40?

If we had two equations:
3.9A+5.9B=212
A+B=40

Then it's much easier :D

No, it's solvable without it.

I've been sitting on a proof without "guess the integer" as well, but I'd like to see if ndee can do his own damned homework first. :p

- M4H

As I told you, I got the answers, it's not about solving the problem, it's about the way to get there. I don't grasp that. Told ya you couldn't do it... TARD BOY! :p
 

Chaotic42

Lifer
Jun 15, 2001
34,885
2,044
126
Originally posted by: ndee
As I told you, I got the answers, it's not about solving the problem, it's about the way to get there. I don't grasp that. Told ya you couldn't do it... TARD BOY! :p
Do you have any work you can post? I have no idea how to solve the problem.

 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
The only second equation I can see is the equation to force A+B a multiple of ten. Otherwise you'll never get an integer sum.
 
Jan 31, 2002
40,819
2
0
Originally posted by: ndee
Originally posted by: MercenaryForHire
Originally posted by: Mermaidman
I think we need a second relationship. Are you sure the teacher didn't say that A+B=40?

If we had two equations:
3.9A+5.9B=212
A+B=40

Then it's much easier :D

No, it's solvable without it.

I've been sitting on a proof without "guess the integer" as well, but I'd like to see if ndee can do his own damned homework first. :p

- M4H

As I told you, I got the answers, it's not about solving the problem, it's about the way to get there. I don't grasp that. Told ya you couldn't do it... TARD BOY! :p

Try scrolling up. :roll:

- M4H
 

tyim

Senior member
Jan 1, 2002
807
0
0
Originally posted by: MercenaryForHire
Oi.

I have one word for you all. The BS-callers, those insulting my intelligence, and those trying to solve it via conventional algebra. Just one word.

GRAPH.

Thank you.

- M4H

agreed. Graphing takes me about 20 seconds to find the answer, but the graphing tables seem to be technically a form of brute forcing. However, since there are so few possibilities, this seems to be the most simple solution, albeit perhaps not the most elegant.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
M4H has solved it in an elegant manner. WINNAR!

Fine, here's my proof. It's just a rough outline, but I'll clarify anything asked.

-----
3.9A + 5.9B = 212m

Assume that no A-pipes are used. With only B-pipes, you can use 36 and get a length of 212.4m. Since the A-pipes are smaller, you can reduce the length to 212 by substituting them. Also works backwards by starting with the A-pipes and increasing, but I chose this way.

The key is seeing the relation between the pipe lengths. Note that 3.9 is almost 4 and 5.9 is almost 6. Common factor to 12.

3 A-pipes = 11.7
2 B-pipes = 11.8

Every time you remove 2B and add 3A, you lose 0.1m in overall length.

Repeat 4x, and you get 36 - (2x4) = 28 B-pipes, and 0 + (3x4) 12 A-pipes.
 

konakona

Diamond Member
May 6, 2004
6,285
1
0
The problem assumes you WILL get 212 meters by combining 3.9m pipes and 5.9 pipes. 212 meters can be factored out to be 212*4. To remove the decimal part, you need a multiple of ten for the combined number of two types of pipes (i.e., the answer is 12+28=40=4*10). For the problem to be solvable, you are guaranteed to come up with a combination of 3.9A and 5.9B that equals 53. the ratio comes out to be 3:7. multiply both by 4 and you get 12 and 28.

edit : 666 views on the thread :eek:
 

HonkeyDonk

Diamond Member
Oct 14, 2001
4,020
0
0
Originally posted by: ndee
Originally posted by: MercenaryForHire
Originally posted by: Mermaidman
I think we need a second relationship. Are you sure the teacher didn't say that A+B=40?

If we had two equations:
3.9A+5.9B=212
A+B=40

Then it's much easier :D

No, it's solvable without it.

I've been sitting on a proof without "guess the integer" as well, but I'd like to see if ndee can do his own damned homework first. :p

- M4H

As I told you, I got the answers, it's not about solving the problem, it's about the way to get there. I don't grasp that. Told ya you couldn't do it... TARD BOY! :p

Doesn't "solving" = "the way to get there" ?
:confused:
 
Jan 31, 2002
40,819
2
0
Originally posted by: HonkeyDonk
Originally posted by: ndee
Originally posted by: MercenaryForHire
Originally posted by: Mermaidman
I think we need a second relationship. Are you sure the teacher didn't say that A+B=40?

If we had two equations:
3.9A+5.9B=212
A+B=40

Then it's much easier :D

No, it's solvable without it.

I've been sitting on a proof without "guess the integer" as well, but I'd like to see if ndee can do his own damned homework first. :p

- M4H

As I told you, I got the answers, it's not about solving the problem, it's about the way to get there. I don't grasp that. Told ya you couldn't do it... TARD BOY! :p

Doesn't "solving" = "the way to get there" ?
:confused:

Apparently he sucks at reading as well as math. ;)

- M4H
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Originally posted by: BigJ
Wheres DrPizza when you need him.

I'm right here. I looked at the problem for a few moments... had a brain fart.
For those of you claiming it's an easy problem, other than brute force, it's a difficult problem.
I believe it falls under Diophantine equations... been wayyy too long for me to recall. But, I do recall it's got something to do with relatively prime...

Good luck on the explanation... I'm just taking a time out from writing a paper, otherwise I'd read enough to recall how to do these. BTW, to those claiming these problems are easy, NDEE, why don't you give them a similar problem to solve...

Incidentally (since I'm not reading through all the idiots calling other people idiots in this thread) I'd like to point out that since they both end in .9, to have an integral length, there needs to be a multiple of 10 total pipes. Thus, for those looking for a 2nd equation, you could have A+B=30, A+B=40, A+B=50, etc.


Hmmm... someone above DID provide a link to 1st order Diophantine equations... I followed the link, it all came back to me :) Well, some of it.

NDee, follow the link
Reasonably simple explanation.