graph energy conservation