Graph mutation, graph distance, and graph gradient