Power System States and Contingency Analysis