graph implementations and protocol for graphs related to tsp