A method of graph reduction and its applications