← ProLT course and all lectures

ProLT · Lecture 06 · 6 of 37

What is a distance?

In this lecture

  1. 0:00 · L06.S01 — Distance starts with a question
  2. 0:35 · L06.S02 — Reversing direction and taking a detour
  3. 1:10 · L06.S03 — Count changes in a bit string
  4. 2:08 · L06.S04 — A ball uses a strict inequality
  5. 2:48 · L06.S05 — A measuring interface can hide a difference
  6. 3:52 · L06.S06 — Check what the definition really says

Complete transcript

Show transcript
On a number line, the distance from two to five is three. We ignore direction and count the separation. A metric abstracts useful rules from examples like this, so we can discuss distance even when the points are not positions in a drawing. A metric never gives a negative distance. A point has distance zero from itself, and distance zero occurs only when the two points are the same. This last requirement is called identity of indiscernibles. A metric gives a symmetric distance: reversing the two endpoints leaves the number unchanged. The distance from two to five therefore equals the distance from five to two. Later we will deliberately relax this rule to measure directional loss. A direct distance cannot exceed the total distance of a detour through a third point. On the number line, travelling from zero through two to five costs two plus three, which equals the direct distance five. Replace number-line points with two-bit strings. To move from zero, zero to one, zero, only the first coordinate differs. Counting differing coordinates gives distance one. The coordinates are labelled; rearranging their order silently would change the comparison. From one, zero to one, one, only the second coordinate differs. The two-step route has total cost two. From zero, zero directly to one, one, both coordinates differ, so the direct count is also two. If one coordinate differs between the first and final strings, at least one leg of any two-leg route must change that coordinate. Counting all such coordinates gives the triangle inequality. This is an argument about every route, not just our example. A ball centred at v contains points whose distance from v is strictly less than its radius. A point exactly at the radius is excluded. The word open in this definition concerns the strict inequality, not the appearance of a circle. With our integer-valued bit distance, radius one around zero, zero contains only the centre. Points at distance one are excluded. Radius slightly greater than one also admits one, zero and zero, one. It still excludes one, one, whose distance is two. For the card example, X means dot and Y means stripe. A has only a dot, B both, C only a stripe, and D neither. Their two bits record X, then Y, with one for true and zero for false. A selected observation profile records only the answers to the chosen questions; we call that profile a signature. Return to the four valuations and observe only X. A and B differ in Y, yet their selected one-entry signatures agree. Counting differences in those signatures therefore gives zero between two distinct underlying valuations. This does not make the calculation wrong. It makes the function a pseudometric on valuations: it keeps nonnegativity, symmetry and the triangle inequality, but allows distinct points at distance zero. The measurement has forgotten a distinction present in the full state. With only X selected, can A and B have zero observed distance? Does that prove they are the same complete valuation? Explain the two different objects being compared. Yes, their selected signatures agree, so the measured distance is zero. No, A and B remain different valuations because Y differs. Identifying equal signatures later will turn this pseudometric into a metric on classes. We now have the rules needed to judge later formulas. Weighted disagreement will remain symmetric. Directed loss may be asymmetric. Neither formula should be inferred from how close our state cards happen to lie on the screen.