discrete mathematics and algorithms