throws VertexNotFoundException {
if (matrix.keySet().contains(firstVertex) && matrix.keySet().contains(secondVertex)) {
matrix.get(firstVertex).remove(secondVertex);
matrix.get(secondVertex).remove(firstVertex);
} else if (!matrix.keySet().contains(firstVertex))
throw new VertexNotFoundException(firstVertex);
else
throw new VertexNotFoundException(secondVertex);
}