The rotation distance between any two binary trees with the same number of nodes is the minimum number of rotations needed to transform one into the other. With this distance, the set of n-node binary trees becomes a metric space: the distance is symmetric, positive when given two different trees, and satisfies the triangle inequality.
thE ROtatioN DistaNCE BetweEn aNy TWo binaRy tReEs with tHE samE NumbEr of nodEs iS tHe minimuM numbeR Of ROtaTioNs NEeded TO TransfoRm one iNTo ThE otheR. with this diStance, THe Set oF n-node bInaRy trEes becoMes a MEtric SPAce: THE dIstAnce Is sYMMETric, pOsitivE WheN given twO difFereNT tREeS, aND satisfies The trianGle InEquAlity.