the conditions are not sufficient to ensure that the map $d:X\times X \to\mathbb{R}$ is a metric on the set $X$ Show that the conditions:   
(i) $d(x,y)=0$ iff $x=y(x,y\in X)$ and
(ii) $d(x,z)\le d(x,y)+ d(y,z), \forall x,y,z\in X$   
are not sufficient to ensure that the map $d:X\times X \to\mathbb{R}$ is a metric on the set $X$

Can someone provide me the answer please.I am completely stuk onit.
 A: By the definition of a metric on the set $X$ it lacks the axiom:
$$d(x,y)=d(y,x)\ \forall x,y\in X\tag{*}$$
so we prove by a counterexample that the given axioms in the question don't imply the axiom $(*)$.
Let $X=\{a,b\}$ and $d$ defined by
$d(a,a)=d(b,b)=0$ and $d(a,b)=1, d(b,a)=2$ so $d$ verify the axiom (i) and (ii) but not the axiom $(*)$.
A: A more natural example: Let $\Gamma$ be a finite weighted oriented multigraph. If $x, y\in \Gamma$ are two vertices, we may define $d(x,y)$ as the length of the shortest oriented path between $x$ and $y$. 


*

*If all weight is positive then $d(x,y)=0$ iff $x=y$.

*$d(x,y) \leq d(x,z)+d(z,y)$ for all vertices $x,y,z \in \Gamma$.

*If $e,f$ are two edges of different weights between two vertices $x,y \in \Gamma$, $d(x,y) \neq d(y,x)$.


For example, such graphs can be used to classify hiking trails with respect to their difficulties. (And clearly, it is easier to go down a hill rather than to climb it, so the "distance" is not symmetric.)
A: Another example on $\mathbb{R}$: $$\delta(x,y)= \left\{ \begin{array}{cl} |x-y| & \text{if} \ x \leq y \\ \frac{1}{2}|x-y| & \text{if} \ x>y \end{array} \right. .$$
You can verify that $\delta(x,y)=0$ iff $x=y$ and $\delta(x,y) \leq \delta(x,z)+\delta(z,y)$. However, $\delta(x,y)= \delta(y,x)$ iff $x=y$.
