remove redundant vertex list from graph