Theory of Graph Traversal Edit Distance, Extensions, and Applications