The Impossibility of Perpetual Motion Machines