Consider the usual "Farey graph", i.e. the 1-skeleton of the (essentially unique) triangulation of the disk by ideal triangles. If one insists that 1/0, 0/1, and 1/1 are vertices of a triangle then the vertices of this graph are naturally in bijective correspondence with the rationals, together with a single point 1/0. Another name for this is the "Hatcher-Thurston complex", or "pants complex" or "curve complex" associated to simple, closed, unoriented curves on a torus (or punctured torus, or four-punctured sphere, with appropriate modifications to the definitions).
Is there a reference for a formula for the (combinatorial) distance function d(p/q, r/s) in this graph? There seem to be plenty of references to connections to continued fractions and intersection numbers, but I've been unable to locate an explicit statement with a formula.