1 In order to distinguish the edge direction, we add a direction symbol to each label with ↑ for climbing up along the path, and ↓ for going down.
for the special case of i == j, we use None as the path.