An output encoding problem and a solution technique
Introduction to Algorithms