Then, I wrote a little comparator function for any two letters, X and Y. It makes a directed graph, and then determines how many total paths there are from X to Y, and from Y to X. For the above data, it finds these paths:
[['A', 'B', 'C', 'D', 'E'], ['A', 'B', 'E'], ['A', 'C', 'D', 'B', 'E'], ['A', 'C', 'D', 'E'], ['A', 'E']]
[['E', 'C', 'D', 'A']]
Note that there are 4 "real" paths and 1 "bad" path from A to E, and only one "bad" path from E to A. I use the sum of path lengths to compare.