Using graphs to find values