# Modulous problem (maths, not programming)

• 02-20-2004
nickname_changed
Modulous problem (maths, not programming)
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:
Code:

```  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.
• 02-20-2004
alphaoide
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|.
• 02-20-2004
nickname_changed
Ohhh of course :p Haha what a silly question.
• 02-20-2004
joshdick
I was expecting a question about modular arithmetic. I'm dissapointed.
• 02-21-2004
nickname_changed
Is that like:
Solve for X
|X - 3X^2 -2X| = |5X+7|
?
• 02-21-2004
joshdick
No, modular math is more like
3x = 2 (mod 4)

The answer there is x=2.