Discrete Structures and Algorithms