Human Control: Definitions and Algorithms