(Java) 12.10 Variant 1

#1

Hi,

I have a question regarding problem 12.10, first variant:
"[…] minimizes the sum of the squares of the distances traveled by the residents".

Do we square the total distance traveled by each resident or do we square each segment (leading to a Manhattan distance) traveled by each resident (going from the building to the mailbox - one segment, coming from the mailbox - one segment) ?

0 Likes

#2

It is the sum of square of each segment. Think this in the other way, if it is the square of the total distance, it makes no difference from the original problem because distance of each segment is nonnegative number.

0 Likes