How to Use Conservation Laws to Analyze State Machines