The process for ranking ligands in Rule 4b is a more complex process than for previous rules, involving a two-stage process. First, the nodes are re-ranked in a way that may cross digraph branches. Second, the nodes are scanned in rank order for auxiliary descriptor similarity to both R and S reference descriptors. The higher priority ligand is the one with the highest score after both of these comparisons are made. We have found the easiest way to conceptualize this algorithmically is to "read" each of the four rankings (two for each ligand) as a series of 0s and 1s, which can be implemented as an integer, an array, or a bit set. In our examples, we will use integers, though our different implementations actually use different representations. The basic idea is to create four lists for each pair of ligands that can be compared together. If there is no winner, we go on to the next rule.