Does $d(q,p) = \#\{j :x_j \neq y_j\}$ define a metric on $X = S^4$?

49 Views Asked by At

Let $X =S^4$ where $S$ can be any non-empty set. For all $q = (x_1,x_2,x_3,x_4) \in X$ and $p = (y_1,y_2,y_3,y_4) \in X$ set

$$d(q,p) = \#\{j: x_j \neq y_j \},$$

the number of components in which $p$ and $q$ differ.

Is $d$ a metric on $X$?

I think I solved this problem with discrete metric space proof approach, but if $q,p,t\in X$, I don't know how to prove the triangle Inequality

$$ d(q,p) \le d(q,t) + d(t,p).$$

2

There are 2 best solutions below

0
On BEST ANSWER

Your $d$ is a metric. All properties except the triangle inequality are easy to verify.

Let $p = (p_1, p_2, p_3, p_4), q = (q_1, q_2, q_3, q_4), t = (t_1, t_2, t_3, t_4)$.

If $p_i \ne q_i$ then certainly $p_i \ne t_i$ or $q_i \ne t_i$ because otherwise we would have $p_i = t_i = q_i$. Therefore

$$\{i : p_i \ne q_i\} \subseteq \{i : p_i \ne t_i\} \cup \{i : q_i \ne t_i\}$$ so taking cardinalities it follows $$d(p,q) \le d(p,t) + d(t,q)$$

0
On

The given $d$ can be expressed as $d(q, p) = \sum_{i=1}^4 d_i(q_i, p_i)$ where each $d_i$ is the discrete metric on $S$. It follows that $d$ is a metric.