Computer Science, asked by annie95, 1 year ago

compute the euclidean distance City block distance chessboard distance for the point p and q where p is 2, 3, 7 and q is 2, 3, 2​

Answers

Answered by harsheys26
1
In Question is the first word compute
For me it is showing complete
Pls comment if it is compute
Answered by baldevsandhu367
0

Answer:

euclidean distance=5,

city distance=5,

chessboard distance=5

Explanation:

Given p(2,3,7), q(2,3,2)

Euclidean formula:-

    \sqrt{ {(x2 - x1)}^{2} +  {(y2 - y1)}^{2 } + {(z2 - z1)}^{2}   }

where p(x1,y1,z1) and q(x2,y2,z2)

 \sqrt{ {(2 - 2)}^{2} +  {(3 - 3)}^{2}   +  {(2 - 7)}^{2} }   \\  \sqrt{25}  = 5

hence 5 is euclidean distance.

city distance:-

( |x1 - x2|  +  |y1 - y2|  +  | z1 - z2 | )

( |2 - 2|  +  |3 - 3|  +  |7 - 2| ) \\  = 5

hence 5 is city distance.

chessboard distance:-

d=Max(|x1-x2|,|y1-y2|,|z1-z2|)

where d is the chessboard distance

d=Max(|2-2|,|3-3|,|7-2|)

d= Max(0,0,5)

d=5

hence 5 is the chessboard distance

Similar questions