Some algorithmic exercises