To convert from a rooted, ordered binary tree to a trivalent tree one first labels all of the vertices with a one. If there is only one vertex, you add three edges and label the endpoints of two of them with zeros. The third endpoint is the root of the trivalent tree. Otherwise, you then add two edges to all vertices that have only one edge connecting to them and one edge to all vertices that have two edges connecting to them. The endpoints of all the edges that you have just added are labeled with a zero.
N means that there is the same number of each.
Because of this, we can say that there are C N trivalent trees of order N . This also means that there are C N binary numbers that fit our criteria. The rook will make 2N moves, of these N will be rightward and N will be upward. If, at any point, the rook has made more upward moves than rightward moves, then the rook will have crossed the main diagonal.