Edge and vertex intersection of paths in a graph