PDA

View Full Version : Modulous problem (maths, not programming)



nickname_changed
02-20-2004, 06:22 PM
I have a little problem with a little maths question thats bugging me. We have a test on monday for this stuff so I don't have chance to ask my teacher before the test.

Four computer terminals (A,B,C,D) are located along a wall. A server is located at some point x along the wall and seperate cables go to each computer.

Heres a diagram:


A B C D
-------------------------------------------------------- wall...
-6 -2 0 3 5


(a) Explain why the total length of cable needed is
|x+6| + |x+2| + |x-3| + |x-5|.
(b) Where should the server S be located to minimize the total length of the cable.

I know for (b) I can just draw it on a calculator and find the minimum, but I don't get how in (a) its |x-3| and |x-5|, I would have expected it to be |x+3| because its the length... :confused:

Any explanations would be really appreciated.

alphaoide
02-20-2004, 07:08 PM
Formula: distance = x1 - x2
x1 = server location
x2 = terminal location
Thus,
total length of cable is
= |x-(-6)| + |x-(-2)| + |x-3| + |x-5|
= |x+6| + |x+2| + |x-3| + |x-5|.

nickname_changed
02-20-2004, 07:17 PM
Ohhh of course :p Haha what a silly question.

joshdick
02-20-2004, 10:15 PM
I was expecting a question about modular arithmetic. I'm dissapointed.

nickname_changed
02-21-2004, 01:29 AM
Is that like:
Solve for X
|X - 3X^2 -2X| = |5X+7|?

joshdick
02-21-2004, 06:29 AM
No, modular math is more like
3x = 2 (mod 4)

The answer there is x=2.