Exam 1

  1. Question

    Given two points p=(2,4) and q=(4,4) in a Cartesian coordinate system:
    1. What is the Manhattan distance d1 (p,q)?
    2. What is the Euclidean distance d2 (p,q)?
    3. What is the maximum distance d (p,q)?

    Solution

    The distances are visualized below in green ( d1 ), red ( d2 ), and blue ( d ).
    dist2-002.png

    1. d1 (p,q)= i | pi - qi |=|2-4|+|4-4|=2.
    2. d2 (p,q)= i ( pi - qi )2 =(2-4 )2 +(4-4 )2 =2.
    3. d (p,q)= maxi | pi - qi |=max(|2-4|,|4-4|)=2.