graph-2-calculation