Proving less or equal than (Hamming code triangle inequality)

654 Views Asked by At

I was given the problem to prove the triangle equality for Hamming Codes, i.e.

$d(x,z) \leq d(x,y) + d(y,z)$

I could construct a proof that $d(x,z) = d(x,y) + d(y,z)$ quite simply.

However I am wondering if it is necessary to also prove that $d(x,z) < d(x,y) + d(y,z)$? (i.e. also prove the less than relation)

I hope this question makes sense, and thank you for your assistance.

1

There are 1 best solutions below

1
On BEST ANSWER

Short answer: No, you don't need to prove anything else. If you can demonstrate that $A=B$, then the statement $A\le B$ is also true. For example, $5\le5$ is a true statement.

Comment: Are you sure your proof of equality is correct, though? If $d(x,z)=d(x,y)+d(y,z)$ for all $x,y,z$ (from the space under consideration), then in particular $\color{red}{d(x,x)=d(x,y)+d(y,x)}$ by letting $z=x$. And that's seems suspicious: if you're talking about the Hamming distance (rather than a Hamming code), then it's indeed a metric. So $d(y,x)=d(x,y)$ by symmetry and $d(x,x)=0$ … and we end up with $d(x,y)=0$ for all $x,y$.