Representing directed graphs