DSA Combinatorics homework