Reduce graph